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

Make oximeter producer kind required #4571

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Conversation

bnaecker
Copy link
Collaborator

  • Pulls in updated Dendrite, Propolis, and Crucible deps, which include the new producer kind enum in metric registration requests. From their perspective, this is still an optional parameter, but it is supplied.
  • Make the kind a required field in API requests.
  • Make the kind a required column in the database, and remove any rows with a NULL value.
  • Update OpenAPI documents and internal consumers to reflect the required parameter.

- Pulls in updated Dendrite, Propolis, and Crucible deps, which include
  the new producer kind enum in metric registration requests. From their
  perspective, this is still an optional parameter, but it is supplied.
- Make the kind a required field in API requests.
- Make the kind a required column in the database, and remove any rows
  with a NULL value.
- Update OpenAPI documents and internal consumers to reflect the
  required parameter.
@bnaecker
Copy link
Collaborator Author

Just a note, it looks like #4559 is also targeting a schema version of 15, so I'll change this one to 16 if that merges first.

Copy link
Contributor

@leftwo leftwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we bump Crucible rev here, but use a propolis that has the previous
rev, do things work as expected? I think this may be the first time we tried
this after the work Patrick did to support it.

package-manifest.toml Outdated Show resolved Hide resolved
@bnaecker
Copy link
Collaborator Author

If we bump Crucible rev here, but use a propolis that has the previous rev, do things work as expected?

I'm not sure, but I think it depends on how old the Propolis revision is. If it's prior to the addition of the optional parameter, then the metric registration request will fail. After that, things should be OK.

@leftwo
Copy link
Contributor

leftwo commented Nov 29, 2023

If we bump Crucible rev here, but use a propolis that has the previous rev, do things work as expected?

I'm not sure, but I think it depends on how old the Propolis revision is. If it's prior to the addition of the optional parameter, then the metric registration request will fail. After that, things should be OK.

I looks like current propolis that Omicron is using is:
54398875a2125227d13827d4236dce943c019b1c

That is before your Add kind field to metric registration request (#568) PR.
However. I took your bits and put them on my bench gimlet, and I believe things
are working. I can't SSH into my instance, but I'm able to stop/start instances,
see output on the console, and see metrics change value after I boot/reboot my
instance, so it looks like my concern is unwarrented.

@leftwo
Copy link
Contributor

leftwo commented Nov 29, 2023

If we bump Crucible rev here, but use a propolis that has the previous rev, do things work as expected?

I'm not sure, but I think it depends on how old the Propolis revision is. If it's prior to the addition of the optional parameter, then the metric registration request will fail. After that, things should be OK.

I looks like current propolis that Omicron is using is: 54398875a2125227d13827d4236dce943c019b1c

That is before your Add kind field to metric registration request (#568) PR. However. I took your bits and put them on my bench gimlet, and I believe things are working. I can't SSH into my instance, but I'm able to stop/start instances, see output on the console, and see metrics change value after I boot/reboot my instance, so it looks like my concern is unwarrented.

Oh, wait, the propolis version here is also updated, so my concern is not warranted.
I don't know why I was thinking something different here.

@bnaecker
Copy link
Collaborator Author

Oh, wait, the propolis version here is also updated, so my concern is not warranted.

Ok this explains the confusion! For the history books: this PR updates all of Crucible, Propolis, and Dendrite to versions which provide the producer kind parameter in metric registration requests. Those out-of-tree consumers think the value is optional, because it is optional in the OpenAPI documents in the Omicron main against which they're built. But because an optional and required value look the same on the wire, both sides should be happy. In other words, we're at step 5 @davepacheco's list above.

@bnaecker bnaecker merged commit 75ccdad into main Nov 29, 2023
21 checks passed
@bnaecker bnaecker deleted the make-producer-kind-required branch November 29, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants