-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add a producer kind to oximeter metric producers #4497
Conversation
57dc5b4
to
10ce1f2
Compare
0fc13f8
to
e7c9283
Compare
This whole dance requires a sequence of updates, laid out in the PR description. There are currently a few other revisions that need to be orchestrated between Crucible, Propolis, and Omicron, so I'm going to wait until those are through the pipeline before starting on this sequence. |
e7c9283
to
af5ec52
Compare
Friendly ping on this @davepacheco, I'd like to tie this off before the holiday, during a quiet few days, if possible. |
- Adds the `kind` enum to metric producer information, including DB schema, model, and various client parameter types. This records the supported types of metric producers, and is intended to aid debugging and future work around updates and instance lifecycle management. Note that this is currently a nullable / optional value, to aid schema upgrades with other clients outside the repo. A follow-up commit will make this required in the API call and `NOT NULL` in the database. - Add schema update files which create the DB enum type and add it as a column to the `metric_producer` table. This currently _drops_ the existing table and recreates it with the new column, rather than adding the column using `ALTER TABLE`. That is intended to remove old entries in bulk, since nothing previously removed the records for Propolis servers when their instance was stopped. Review feedback Fixup OpenAPI specs Rebase fixup Move schema update files to next version
af5ec52
to
f73e352
Compare
I think the change is fine and I'm just trying to work through the sequence of PRs to make sure we aren't going to accidentally break something. Sorry to be tedious about it but every time I don't spell it out like this I get it wrong and break stuff.
By contrast, I asked offline what would happen if we skipped the "optional" phase altogether. If we did, then in step 1, if you built and deployed the TUF repo, you'd get a Nexus that requires the parameter and a Propolis that doesn't provide it and that would not work. |
Update: Steps 1-4 have been completed. Omicron has support for the optional parameter, as well as the 3 out-of-tree consumers. I haven't yet pointed Omicron at those updated commits. |
#4571 is up for review now, which takes this through step 5. |
kind
enum to metric producer information, including DB schema, model, and various client parameter types. This records the supported types of metric producers, and is intended to aid debugging and future work around updates and instance lifecycle management.metric_producer
table. This currently drops the existing table and recreates it with the new column, rather than adding the column usingALTER TABLE
. That is intended to remove old entries in bulk, since nothing previously removed the records for Propolis servers when their instance was stopped.This is the initial PR in a sequence that will eventually make this field required in both the database and API requests. As there are consumers of this API outside of the Omicron repository, this field needs to start as optional, to avoid introducing a commit with incompatible clients. Here are the planned steps:
kind
field into themetric_producer
table andProducerEndpoint
registration request body