Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Add provisioner force-cancel flag#4947

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

mtojek
Copy link
Member

@mtojekmtojek commentedNov 8, 2022
edited
Loading

Fixes:#4586

This PR adds a new flag to configure the force-cancel interval for provisionerd. It also increases the default value.

@mtojekmtojek self-assigned thisNov 8, 2022
@mtojekmtojek requested a review froma teamNovember 8, 2022 10:39
@mtojekmtojek marked this pull request as ready for reviewNovember 8, 2022 10:39
@mtojekmtojek requested a review froma team as acode ownerNovember 8, 2022 10:39
@mtojekmtojek requested review fromKira-Pilot and removed request fora teamNovember 8, 2022 10:39
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Looks great! I'm approving with the caveat that I think changing the config structure a bit would be appropriate.

@@ -359,6 +359,14 @@ func newConfig() *codersdk.DeploymentConfig {
Flag: "user-workspace-quota",
Enterprise: true,
},
Provisionerd: &codersdk.ProvisionerdConfig{
Copy link
Member

Choose a reason for hiding this comment

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

We have another config calledProvisionerDaemons. I think it would be sensible to unify these underProvisioner.Daemons andProvisioner.ForceCancelInterval?

Should be a non-breaking change as well since the flag/env translate to the same.

Copy link
MemberAuthor

@mtojekmtojekNov 8, 2022
edited
Loading

Choose a reason for hiding this comment

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

I assumed that this would be a breaking change if there is a customer who uses theProvisionerDaemons. I'm for unification, but a bit concerned about disturbing somebody's environment.

Copy link
Member

Choose a reason for hiding this comment

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

I think it should be fine. Neither flag or env should break (wasPROVISIONER_DAEMONS and will be the same in the new structure, please correct me if I’m wrong@f0ssel).

The only breakage I can think if is when used as part ofserver.yaml. But it’s a recent addition and not widely used yet AFAIK.

There may be even more breaking changes to this in the future as we split out provisionerd servers from the coderd server.

mtojek reacted with thumbs up emoji
@@ -65,7 +65,7 @@ func New(clientDialer Dialer, opts *Options) *Server {
opts.UpdateInterval = 5 * time.Second
}
if opts.ForceCancelInterval == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

A thought/musing: Do we want to support disabling this by setting it to0? Or do we just ask users to raise it to areally high number ™️?

(No change necessary here, the latter is fine.)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good question, Mathias. I wouldn't recommend setting it to infinite as it can be problematic for some cases (stuck forever). I guess that it implicates the latter option.

Copy link
Member

Choose a reason for hiding this comment

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

That’s a very good point. So yeah, let’s not allow our users to create a deadlock with all provisioners waiting forever 😄

mtojek reacted with thumbs up emoji
Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresma left a comment

Choose a reason for hiding this comment

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

The types look good! 👍

mtojek reacted with hooray emoji
@mtojekmtojek changed the titlefeat: Add provisionerd force cancel flagfeat: Add provisioner force-cancel flagNov 8, 2022
@mtojekmtojek merged commit16384f8 intocoder:mainNov 8, 2022
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 8, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

@Kira-PilotKira-PilotAwaiting requested review from Kira-PilotKira-Pilot was automatically assigned from coder/ts

Assignees

@mtojekmtojek

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Failed cancellation of workspace build may leave orphan resources behind
3 participants
@mtojek@mafredri@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp