-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
sqlite: complete Pod methods #17615
sqlite: complete Pod methods #17615
Conversation
[NO NEW TESTS NEEDED] - the sqlite backend is still in development and is not enabled by default. Signed-off-by: Valentin Rothberg <[email protected]>
Otherwise we'll fail immediately as the schema version is returned as 0. Signed-off-by: Valentin Rothberg <[email protected]>
The base table was missing, so we caused a syntax error. Signed-off-by: Valentin Rothberg <[email protected]>
Signed-off-by: Valentin Rothberg <[email protected]>
The value of -1 is used when we do not _yet_ know the exit code of the container. Otherwise, the DB checks would error. There's probably a smarter than allowing -1 but for now, that will do the trick and let the tests progress. Signed-off-by: Valentin Rothberg <[email protected]>
Signed-off-by: Valentin Rothberg <[email protected]>
"TABLE" should refer to the actual table. Signed-off-by: Valentin Rothberg <[email protected]>
The state has been unmarshalled into the config which surfaced in wrong states. Signed-off-by: Valentin Rothberg <[email protected]>
Allow to replace existing exit codes. A container may be started and stopped multiple times etc. Signed-off-by: Valentin Rothberg <[email protected]>
As expected by the system tests. Signed-off-by: Valentin Rothberg <[email protected]>
A number of fixes for pod creation and removal. The important part is that matching partial IDs requires a trailing `%` for SQL to interpret it as a wildcard. More information at https://www.sqlitetutorial.net/sqlite-like/ Signed-off-by: Valentin Rothberg <[email protected]>
To return the error message expected by the system tests. Signed-off-by: Valentin Rothberg <[email protected]>
Requires the trailing `%` to work correctly, see https://www.sqlitetutorial.net/sqlite-like/ Signed-off-by: Valentin Rothberg <[email protected]>
Requires the trailing `%` to work correctly, see https://www.sqlitetutorial.net/sqlite-like/ Signed-off-by: Valentin Rothberg <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Note that I'll be buried in meetings until the end of the day. Feel free to take over this PR if needed. |
// Set up tables | ||
if err := sqliteInitTables(state.conn); err != nil { | ||
return nil, fmt.Errorf("creating tables: %w", err) | ||
} | ||
|
||
if err := state.migrateSchemaIfNecessary(); err != nil { |
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.
@mheon there's probably a better way but this change unblocked me.
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.
Hm. It needs to happen before table init to be safe, so we'll probably have to figure out how to ignore the table-does-not-exist error.
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.
Can do that later though
code lgtm, couple of nits |
Code LGTM |
@mheon feel free to merge and take over the comments. I won't find time today. |
/lgtm |
@mheon @baude PTAL
This PRs completes the Pod methods and adds a number of fixes. I was chasing the failure in
test/system/220-healthcheck.bats
but ran out of time. Many system and e2e tests are passing, so it's now in a state where we can play on the CLI.Does this PR introduce a user-facing change?