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: upsertcoder_app resources in case they are persistent#18509

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
dannykopping merged 2 commits intomainfromdk/upsert-app
Jun 23, 2025

Conversation

dannykopping
Copy link
Contributor

@dannykoppingdannykopping commentedJun 23, 2025
edited
Loading

#18487 was merged, meaningcoder_app IDs generated by the provider are used to insert into the database.

Consequently:

coder_app resources may be defined as persistent resources (i.e. not definingcount = data.coder_workspace.me.start_count) means that the ID for these will not change across workspace builds, therefore we need to upsert instead of insert.


Disclaimer: this change was mostly implemented by Claude Code.

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
@dannykoppingdannykopping marked this pull request as ready for reviewJune 23, 2025 16:53
_, err := a.Database.InsertWorkspaceApp(ctx, database.InsertWorkspaceAppParams{
ID: uuid.New(),
_, err := a.Database.UpsertWorkspaceApp(ctx, database.UpsertWorkspaceAppParams{
ID: uuid.New(), // TODO: we may need to maintain the app's ID here for stability, but for now we'll leave this as-is.
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit: This is a note rather than a todo, or if I'm wrong, consider opening an issue. (Committed todo's are where todo's go to die, etc etc.)

dannykopping reacted with thumbs up emoji
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
@dannykoppingdannykoppingenabled auto-merge (squash)June 23, 2025 18:40
@dannykoppingdannykopping merged commit4699393 intomainJun 23, 2025
34 checks passed
@dannykoppingdannykopping deleted the dk/upsert-app branchJune 23, 2025 18:50
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 23, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@EmyrkEmyrkAwaiting requested review from Emyrk

Assignees

@dannykoppingdannykopping

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@dannykopping@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp