Add SOCI CLI root flag#1563
Merged
austinvazquez merged 2 commits intoMay 19, 2025
Merged
Conversation
Contributor
Author
|
I have a few different motivations here. Let me chop it up some more. |
The unit tests which asserts artifact db initialization failures will result in errors was failing likely for previous good initialization of the database. Signed-off-by: Austin Vazquez <macedonv@amazon.com>
d241f33 to
5db7784
Compare
Contributor
Author
|
Okay split this across two commits. The first commit fixes a flaky unit test, and the second adds the root flag to the soci command. |
Kern--
reviewed
May 13, 2025
Kern--
reviewed
May 13, 2025
This change adds --root flag for the soci command and refactors common code with the snapshotter grpc for similar logic. Signed-off-by: Austin Vazquez <macedonv@amazon.com>
5db7784 to
f4fc1fe
Compare
Kern--
approved these changes
May 15, 2025
sondavidb
approved these changes
May 16, 2025
Contributor
sondavidb
left a comment
There was a problem hiding this comment.
LGTM just one small thing I'd want considered for the unit test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
When running unit tests on my local system, I regularly hit test failures for
TestArtifactDB_DoesNotExist. I found the test setup could be more robust by ensuring db initialization fails to assert the desired behavior.Description of changes:
This change 1) fixes the flaky unit test by ensuring the db initialization will fail during setup and 2) adds the
--rootglobal flag for the soci command along with refactoring common code betweensociandsoci-snapshotter-grpccommands.Testing performed:
Added unit tests.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.