Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate resultsdb with the backend #101

Closed
12 tasks done
ralphbean opened this issue Oct 11, 2014 · 4 comments
Closed
12 tasks done

Integrate resultsdb with the backend #101

ralphbean opened this issue Oct 11, 2014 · 4 comments
Labels
Critical We can't go on living in this sqalor, drop everything and fix it!

Comments

@ralphbean
Copy link
Contributor

This comes in two places I think:

  • Check resultsdb at the time a user requests an update be pushed to stable
  • Again at mash time when things are being pushed to stable.

We should check resultsdb for the update and have a list of resultsdb tasks that we keep in the database per update. If any of them are not PASSED or INFO, then the request should be denied and the user should be informed. For instance, we could not deny requests if rpmlint fails but we could deny requests if depcheck fails.

We need to keep the configurable list of required testcases per update so that we can handle the future where certain packages have automated test cases that no other packages have. Package X might want to require that their package-x-foobar testcase passes before anything goes to stable.

  • Keep a configurable list of required testcases per update in the database (depcheck by default and other future ones).
  • Eventually we'll need a way for package maintainers to add their own special test case requirements for their own packages. (Do we let them disable depcheck or other "site-required" ones?)

If depcheck has not even been run yet, perhaps we should deny as well.

For the check during the request-for-stable, we can just

  • tell the user the request was denied in the web UI
  • tell the user the request was denied via the bodhi client

For the check during mash time, it would need to do something more complicated like:

  • remove the request
  • take it out of the mash
  • unlock the update
  • and whatever other stuff needs to happen to keep things in a good state.

Do we stop the mash if the resultsdb is unavailable or giving 500s?

  • We need a way to override it for all updates in the case where resultsdb has gone pear-shaped so we can still get updates out.
  • We also need a way to override it per-update in the case where say we have a critical update like bash that needs to go out and it is failing some resultsdb check but we humans know better or something.
@ralphbean ralphbean added the Critical We can't go on living in this sqalor, drop everything and fix it! label Oct 11, 2014
@ralphbean
Copy link
Contributor Author

SIMPLICIO: In the DB, that set of testcases required for an udpate to pass? We should keep them associated with a particular update -- with the updates table.

SALVIATI: Ah, but then our friend Sagredo the avid packager would have to re-enter his requirements every time he creates a new update.

SIMPLICIO: Huh. Ok, then we should keep them associated with packages. When a new update is created for a certain package, all the testcases normally required for that package are required for the update. Multi-build updates require the union of their packages' required testcases.

SALVIATI: But then every time Sagredo becomes the maintainer of a new package, he would have to specify the test cases for each new package.

SIMPLICIO: Then we can keep the set of test cases required for an update associated with the packages' stack. Every new package added to the stack inherits all the required test cases. If a multi-build update is composed of packages from more than one stack, it inherits all the required test cases of all the stacks of all the packages of all the builds that make it up.

SALVIATI: But then, what about all the packages that are not part of a stack? One-offs?

SIMPLICIO: This is hard.

SALVIATI: 🚲

@ralphbean
Copy link
Contributor Author

Maybe a cascading system would be the most flexible:

  • If a stack has requirements defined and no other requirements are defined, then those apply to the update.
  • If a package has requirements defined, then those override the stack's requirements for that update.
  • But a packager can also specify requirements on the update itself, overriding both package requirements and stack requirements. The stack/package requirements are simply presented as defaults when the update is created. The packager can edit the update at a later time to change the requirements if something comes up.

This way, say the packager knows an update is truly exceptional, they can override all other requirements for that update so that it will get pushed. (Similarly, a site admin or releng group member could login and change the requirements on a stuck but important update if it needs to get through.)

We could also have site requirements defined in config or something, to provide defaults to updates that have no others defined -- a baseline.

This seems really flexible to me. Coding the check would be pretty straightforward, but it would require a good bit of UI work to let people tweak requirements at all these different levels (stack, package, and update).

@lmacken
Copy link
Contributor

lmacken commented Oct 29, 2014

The cascading approach sounds sane to me. I wonder if we can just create a Mako function for the UI widget that can be re-used for stacks/packages/updates.

@ralphbean
Copy link
Contributor Author

OK - a bunch of progress going on now in the feature/resultsdb-requirements branch.

Current status:

  • when a stack is created
  • when a package is created
  • when an update is created
  • write tests for all that cascading stuff
  • do hub checks at push time to make sure required bits are happy
  • write tests for hub check
  • do app checks at request-for-stable time to make sure required bits are happy too
  • write tests for request-for-stable check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical We can't go on living in this sqalor, drop everything and fix it!
Projects
None yet
Development

No branches or pull requests

2 participants