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: allow tag removal in provisioner upsert#14187

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
f0ssel merged 2 commits intomainfromf0ssel/allow-tag-removal
Aug 6, 2024

Conversation

f0ssel
Copy link
Contributor

@f0sself0ssel commentedAug 6, 2024
edited
Loading

If you start a provisioner with a tag and then restart it at some later time without that tag, the app returns a500 error. This change fixes the issue by allowing provisioner tags to be added and removed freely.

The included test can be ran againstmain to demonstrate the issue:

t.go:102: 2024-08-06 15:14:32.459 [erro]  coderd: create provisioner daemon  name=pPxKaqhVKPQjumKlJTA8RgvADF4oZTNODNixI9aHrC7JDSfbd3kJOfBFtpQncGw  provisioners=[echo]  tags={"owner":"","scope":"organization"}  request_id=8e77bf9b-dcd0-4748-b9af-e48b683ffb17  error="sql: no rows in result set"    t.go:99: 2024-08-06 15:14:32.459 [warn]  coderd: GET  host=localhost:40747  path=/api/v2/organizations/28ccf372-3006-4c4c-b65c-cce806813dd4/provisionerdaemons/serve  proto=HTTP/1.1  remote_addr=127.0.0.1  start="2024-08-06T15:14:32.449511657Z"  took=9.90056ms  status_code=500  latency_ms=9  request_id=8e77bf9b-dcd0-4748-b9af-e48b683ffb17 ...        response_body= {                        "message": "Internal error creating provisioner daemon.",                        "detail": "sql: no rows in result set"                       }    provisionerdaemons_test.go:382:                 Error Trace:    /home/coder/coder/enterprise/coderd/provisionerdaemons_test.go:382                Error:          Received unexpected error:                                GET http://localhost:40747/api/v2/organizations/28ccf372-3006-4c4c-b65c-cce806813dd4/provisionerdaemons/serve?id=a8966410-8bb6-4e84-ba0e-e3b144560342&name=pPxKaqhVKPQjumKlJTA8RgvADF4oZTNODNixI9aHrC7JDSfbd3kJOfBFtpQncGw&provisioner=echo&tag=scope%3Dorganization&version=1.1&version=1.1: unexpected status code 500: Internal error creating provisioner daemon.                                        Error: sql: no rows in result set                Test:           TestProvisionerDaemonServe/ChangeTags

I've also changed the unique index to include the organization_id so that names between orgs will not collide.

Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

I don't think this change in behavior is breaking since it allows more functionality (removing tags) then the previous.

@f0sself0ssel merged commitfab1960 intomainAug 6, 2024
31 checks passed
@f0sself0ssel deleted the f0ssel/allow-tag-removal branchAugust 6, 2024 15:38
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 6, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@EmyrkEmyrkEmyrk approved these changes

Assignees

@f0sself0ssel

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@f0ssel@johnstcn@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp