Skip to content

PB-133: feature flag for job reservation support#644

Merged
zhming0 merged 1 commit into
mainfrom
ming/pb-133
Jul 9, 2025
Merged

PB-133: feature flag for job reservation support#644
zhming0 merged 1 commit into
mainfrom
ming/pb-133

Conversation

@zhming0
Copy link
Copy Markdown
Contributor

@zhming0 zhming0 commented Jul 7, 2025

This feature flag currently does nothing, but it will de-risk our incoming job reservation related changes to k8s stack.

Also, hopefully this gently conveys a message that we are doubling down our investment in our k8s stack offering 🙂

@zhming0 zhming0 requested review from a team, DrJosh9000 and moskyb July 7, 2025 06:02
@zhming0 zhming0 requested a review from a team as a code owner July 7, 2025 06:02
Copy link
Copy Markdown
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

I have a can of worms over the flag description, but LGTM

"experimental-job-reservation-support": {
"type": "boolean",
"default": false,
"title": "Please contact us before enabling this flag. This feature enables job reservation support: Better job observability, scalable job fetching!",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Contact us how? Email to support, file an issue?
  2. Contact us why? Currently the flag does nothing, and in future when it does do something, it's marked as "experimental". It's better for us if users want to try it, and "contact us before enabling" is a roadblock to that. But we definitely want to know if they try it and hit a bug.

I'm not sure how best to phrase it, but:

Suggested change
"title": "Please contact us before enabling this flag. This feature enables job reservation support: Better job observability, scalable job fetching!",
"title": "Experimental - may contain bugs or cause breakage. This experiment enables job reservation support for better job observability and scalable job fetching. If you try it, please let us know about your experiences by filing an issue on https://github.com/buildkite/agent-stack-k8s",

Copy link
Copy Markdown
Contributor

@moskyb moskyb Jul 8, 2025

Choose a reason for hiding this comment

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

i suspect the initial motivation for "contact us before using" is on the proviso that using the job reservation endpoint will be feature flagged on the backend, but... now that i'm thinking about it, it's probably worth thinking about not feature-flagging the endpoint (on the backend). any use of it will be opt-in, either by using this flag, or by just choosing to call the endpoint, so all of the caveats have more or less been emptor'd at that stage.

feature flags are useful for backend stuff where the user doesn't have much choice over what's presented to them, but the utility of a feature flag is diminished when a user has to actively choose to use something anyway -- it's just more busywork for us turning it on and off for people.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@moskyb yeah, I am not very worried about the backend feature flag either. I just am conscious that there will be a period of time when calling "reserved" api means a dead job, so I was thinking if we should de-risk -- only allow such invocation internally. But it's quite a small risk for sure.

@DrJosh9000 I like your version, with a small modification: Experimental - does not fully function yet.. I think at this stage of the project, we want to be clear that this is not working. We can later come back and change that when we are almost ready.

@zhming0 zhming0 enabled auto-merge July 9, 2025 04:38
@zhming0 zhming0 merged commit 3577d86 into main Jul 9, 2025
1 check passed
@zhming0 zhming0 deleted the ming/pb-133 branch July 9, 2025 05:00
cmd.Flags().Bool(
"experimental-job-reservation-support",
false,
"Please contact us before enabling this flag. This feature enables job reservation support: Better job observability, scalable job fetching!",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah... I had meant to remind you to update this text to be consistent with the JSON schema.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops quick follow up: #647

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.

3 participants