-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Refactor all extendable code into ext/ #305
Conversation
This removes the `types` package instead moving the contents to the top-level clair package. This change also renames the `Priority` type to `Severity` in order to reduce confusion. This change also removes the IsValid method and replaces it with a safe constructor to avoid the creation of invalid values. Many docstrings were tweaked in the making of this commit.
This change also adds a dependency check at startup, rather than runtime.
My thoughts on naming: ext/vulnsrc => ext/erratasrc (because it actually pulls the entire errata list including security, bugfix and enhancements) Though, I'm not going to die on a hill for any of them. :) |
Is errata common vocab in this space? I haven't noticed it.
I think the vocab among the project is vulnerability because we don't want to limit the scope to just "CVEs".
We've been calling these features because you could hypothetically use Clair to detect vulnerabilities via file hashes and not necessarily just packages. |
We use errata as the term for updates to the OS, whether security, bugfix or enhancement. The same term is used by our upstream vendor and their other downstream distributions. It may not be commonly used by Debian (-based) distros, though. |
This puts config in its relevant location and moves functions around loading config files into the main package. As a side effect of removing cyclic imports for the API config, the context library is no longer used.
This PR is more than welcome appreciated. Few comments:
I am not strongly against the word errata and I understand it is used by many vendors. However I'd like to keep our vocabulary consistent across the project / code. If we start calling a package |
I'm totally open to better suggestions for names. You have to consider both the name of the package and the interface, though.
I've tried this in a few other projects and found it counter-intuitively hurts discoverability of documentation. This is my anecdote. We should also strive to follow CoreOS OSS standards with our
I absolutely think it should be, but right now there are definitely implicit dependencies on Postgres implementation. I don't feel confident telling people they really could swap out the database at this point.
I think that clairctl should exist in cmd/ and a Kubernetes integration should exist outside of this repository. I honestly like to delete |
This is a WIP PR to move everything into one flat directory of extensions. This should make it easier for programmers to discover everything customizable with Clair. It also vastly simplifies the structure of the codebase.
My goals are as follows:
I'm completely open to discussion around naming (naming is hard) and further refactors to simplifying the structure of the project. This is a big change, so navigating the branch directly might be easier to understand at a high-level than the GitHub diff.