Git Product home page Git Product logo

Comments (3)

adibrastegarnia avatar adibrastegarnia commented on August 19, 2024

@kuujo
I think implementation of this feature should be straightforward but we should decide what is the best way to define history commands. Here some of my ideas for the history commands. What do you think?

// Get the status of all tests that are finished successfully.
onit history --status --phase="Succeeded"

// Get the status of all "Failed "tests
onit history --status --phase="Failed"

// Get the status of all tests in kube-test namespace (i.e. without filtering on phase)
onit history --status

// Get the status of one specific test
onit history --status -n <Test-pod-name>

// Get logs of a specific test
onit history --logs -n <Test-pod-name>

from onos-test.

kuujo avatar kuujo commented on August 19, 2024

There is also going to be a differentiation between test history and benchmark history. Benchmarks and logs are where this becomes a really useful feature.

I think we probably want different commands for different types of output. The output for the history of tests (pass/fail) will be different from the output of the history of benchmarks (throughput/latency) will be different from the logs. I think this is a good reason to have separate commands for each of those outputs to ensure command output format is deterministic (e.g. for parsing).

Thinking about how this could work, the log command will have to take the name of a node for which to output the logs. I think before a namespace is torn down, we should store all its logs in a ConfigMap keyed by node ID. In order to get the logs, the client has to know which nodes were running for a test (which keys are in the CM), so we’ll need some command to get that information. And we’ll also want a command to download all the logs from a test run.

Finally, I think we should try to stick with the CLI patterns used by kubectl and formalized in that GopherCon talk:

  • Use onit verb noun
  • Use flags rather than variadic arguments for optional arguments

So here could be an alternative:

  • onit get history
  • onit get test history
  • onit get benchmark history
  • onit get test config
  • onit get benchmark config
  • onit get test logs --test=x --pod=y
  • onit get benchmark logs --benchmark=x --pod=y

from onos-test.

adibrastegarnia avatar adibrastegarnia commented on August 19, 2024

@kuujo
Good points. Agreed. I was thinking about get command but I thought it would be better to make the commands shorter but you are right, we should use onit verb noun pattern.

from onos-test.

Related Issues (20)

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.