Git Product home page Git Product logo

javajon / katacoda-solver Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 10.17 MB

Solver is a command-line interface (CLI) that helps authors create O'Reilly Challenges. The Solver utility helps authors organize the verifications, the myriad of hints, and provides an enhanced solutions mechanism for rapid testing. Solver is not required, but it can shorten your time for producing quality Challenges.

Home Page: https://katacoda.com/scenario-examples/courses/challenges

License: MIT License

Kotlin 2.06% Java 93.92% Shell 4.02%
o-reilly cli challenges java picocli gradle graal quarkus

katacoda-solver's Introduction


โ˜๏ธ I'm an independent software architect and fascinated with the wide array of innovations for delivering cloud native based solutions. My favorite connections are finding those "ah-ha!" moments to help your career move forward with the cloud native ecosystem.

katacoda-solver's People

Contributors

javajon avatar spkane avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

spkane kubz

katacoda-solver's Issues

Implement "solver lint"

At least for authoring mode the "solver lint" command should check for problems.

Added to upcoming release.

CI/CD improvements

  • Move most CI work to stages in dockerfile and have actions pull binary from the container to publish on the release page.
  • Move gradlew build to inside dockerfile stage rather than at GitHub action level
  • Simplify the readme for build instructions
  • Remove UPX as a GitHub action step and substitute with Quarkus UPX switch.
  • Consider other high availability options for CLI tool download

Allow the working directory to be configured for all commands

First thing Jonathan, great work on this tool. It looks like it will be very helpful!

I am running into an issue using it in my environment, however.

I am trying to use solver on a Mac while I am developing a challenge and I have run into a few issues when running it inside a container.

The Katacoda documents here: https://www.katacoda.community/challenges/challenges-solver.html

recommend that you use it by setting alias solver="docker run --rm ghcr.io/javajon/solver:0.4.1

However, running a command like this would fail solver create --archetype=linux --destination=. --force

I figured that this was because it was running inside the container, so I removed the alias and replaced it with a bash function that looks like this:

solver ()
{
    docker run --rm -v `pwd`:/output ghcr.io/javajon/solver:0.4.1 "$@"
}

This then allowed me to run solver create --archetype=linux --destination=/output --force without an issue.

However, when I got done with the challenge and then wanted to encrypt the solutions, I ran into another problem. I see no way to tell solver where to find the solutions, which means that I can't point it at the mounted directory.

Running solver solutions -e, claims to have done something (which surprises me a bit), but once again this is likely happening inside the container filesystem.

It seems like the tool really needs an option to specific the working directory, for most, if not all commands. This should allow users on Windows and Mac to use it reasonably easily, and would definitely help me out.

Let me know if there is anymore information or testing that I can do, which would be helpful!

Bug: In testing a challenge, run decrypt command BEFORE running solver view, next, all, and until

There is a mild bug in solver which will be fixed in the next revision.

However, in the meantime just be sure to run the decrypt command BEFORE running solver view, next, all, and until. Running some commands before the decrypt creates a bogus file. If you happen to run a command before the decrypt command or encounter this problem again just delete the file:

rm /tmp/solutions-sourcer.sh

The command "solver view 1" was also producing the message: "Solutions not found for requested task 1"

You can clear out the bug with:

rm /tmp/solutions-sourcer.sh
solver sol -d K0MS1DPSEK833Q13
solver view 1

And you will see the solution appear as expected. At this point solver next, all, and until will work..

The simple thing to remember is just do the decrypt command first just after the scenario starts.

Some shell commands in verifications.sh can fail silently

When a command like curl fails silently in validations.sh the command solver verify can in some cases report true, yet the framework still fails to advance to the next task. More can be done to trap and detect these quiet failures.

For each hint allow hint reveal delay based on seconds

There is currently a fixed 3-second delay on each hint. (in SubcommandRequestHint.java, taskUptime > 3). Typically the 3 seconds is shorter than when the learner reveals the hint. In the next version, it with be an optional adjustment by the author, set to a short default, perhaps 0,1, or 2 based on testing. A slight delay of ~1 second rather than 0, may still be wanted more for performance reasons.

  1. Overall there will be a global delay setting defaulted to 0, this global default setting may be adjusted by the author.
  2. In the markdown for each hint, there will be an optional time delay.

Units are in seconds.

Overall time delays are not encouraged as time is very subjective based on each learner's speed, distractions, hardware, skills, and accessibility.

These details will be added to the challenge documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.