-
Notifications
You must be signed in to change notification settings - Fork 195
Refactor snapshot to sqlc #1140
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ae8f5f8 to
6cc139b
Compare
b147684 to
698ecf7
Compare
|
@jakubno, is this PR just a reference for the SQLC rewrite? |
|
I will be returning to this very soon |
0ff4d46 to
4f8922e
Compare
719d6a2 to
7ce2e34
Compare
| metadata = @metadata, | ||
| sandbox_started_at = @started_at, | ||
| origin_node_id = @origin_node_id, | ||
| auto_pause = @auto_pause, | ||
| config = @config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use metadata = excluded.metadata here instead of putting the value here again.
sitole
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Note
Switch snapshot creation to a new sqlc
UpsertSnapshotand update orchestrator to use it, with added tests and removal of legacy Ent-based code.UpsertSnapshot: Add SQL and generated code to upsert snapshots and create correspondingenv_builds(packages/db/queries/snapshots/create_new_snapshot.sql, generatedcreate_new_snapshot.sql.go).upsert_snapshot_test.gocovering new, existing, and repeated upserts; include raw SQL test helpers inpackages/db/client/tests.go.pause_instance.goto callsqlcDB.UpsertSnapshot, pass structured params, and use returnedtemplate_id/build_idfor snapshotting and status update.SnapshotInfo,NewSnapshotBuild) frompackages/shared/pkg/db/snapshot.go.Written by Cursor Bugbot for commit fbd8432. This will update automatically on new commits. Configure here.