Skip to content

feat: Add option to dump and load database snapshots, while keeping relationships on foreign tables.#1873

Draft
alanpeixinho wants to merge 1 commit intokernelci:mainfrom
profusion:feat/snapshot_command
Draft

feat: Add option to dump and load database snapshots, while keeping relationships on foreign tables.#1873
alanpeixinho wants to merge 1 commit intokernelci:mainfrom
profusion:feat/snapshot_command

Conversation

@alanpeixinho
Copy link
Copy Markdown
Contributor

Include a command to dump and load database snapshots.

@alanpeixinho alanpeixinho force-pushed the feat/snapshot_command branch from 3278ffd to 57707a2 Compare April 23, 2026 17:03
Copy link
Copy Markdown
Collaborator

@MarceloRobert MarceloRobert left a comment

Choose a reason for hiding this comment

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

looks ok, I'll test later

Comment on lines +239 to +240
f"""Unknown table '{table}'.
Valid options are: issues, checkouts, builds, tests, incidents."""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You could make a template string and reuse between commands. You can save something like myvar = "table is %(tablename)s" and then use as print(myvar % {"tablename": "issues"})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is a copy/paste from the existing error message. But I plan to refactor regardless

] + self.origins

with self.kcidb_connection.cursor() as kcidb_cursor:
with connection.cursor() as kcidb_cursor:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

prefer connections['default']

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

also other occurrences in the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants