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

fix(coderd): only allow untagged provisioners to pick up untagged jobs#12269

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
johnstcn merged 4 commits intomainfromcj/provisionerd_acquire_untagged
Feb 22, 2024

Conversation

johnstcn
Copy link
Member

@johnstcnjohnstcn commentedFeb 22, 2024
edited
Loading

Alternative solution to#6442

Modifies the behaviour ofAcquireProvisionerJob and adds a special case for 'un-tagged' jobs such that they can only be picked up by 'un-tagged' provisioners.

Also adds comprehensive test coverage forAcquireJob given various combinations of tags.

This solves the issue described in#6442 without the need for another configuration knob.
The approach in#12244 needs some additional supporting work and potentially some input from customers before we go ahead and build it properly.

This is a behavioural change for sure, but there doesn't seem to be any scenario in which the previous behaviour would be warranted.

Comment on lines +348 to +353
{
name: "tagged provisioner and untagged job",
provisionerJobTags: map[string]string{"scope": "organization", "owner": ""},
acquireJobTags: map[string]string{"scope": "organization", "owner": "", "foo": "bar"},
expectAcquire: false,
},
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

review: this is the behaviour that changes

AND nested.tags <@ @tags :: jsonb
AND CASE
-- Special case for untagged provisioners: only match untagged jobs.
WHEN nested.tags :: jsonb = '{"scope": "organization", "owner": ""}' :: jsonb
Copy link
Member

Choose a reason for hiding this comment

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

When we assign @ tags, will it always containscope = organization when untagged and used live?

Copy link
MemberAuthor

@johnstcnjohnstcnFeb 22, 2024
edited
Loading

Choose a reason for hiding this comment

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

We make sure to callprovisionersdk.MutateTags before serializing tags, so it will always containscope andowner keys.

mafredri reacted with thumbs up emoji
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

👍

@johnstcnjohnstcn merged commit53e8f9c intomainFeb 22, 2024
@johnstcnjohnstcn deleted the cj/provisionerd_acquire_untagged branchFebruary 22, 2024 15:04
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 22, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@mtojekmtojekmtojek approved these changes

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@johnstcn@mafredri@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp