-
Notifications
You must be signed in to change notification settings - Fork 54
fix: handle default arch in Select #256
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a080409
bugfix: cut does not infer the architecture properly
letFunny 2fb3c32
add test showcasing behavior
upils 53fe075
fix: Detect cycles with v3-essential
upils c80bc7b
fix: arch specific slice installed if no arch provided
upils 4ce1609
fix: Select error out if empty arch
upils 7796bfc
style: improve error message and align with code conventions
upils 842070c
style: improve quoting
upils f1ffee3
refactor: simplify setting default on test.arch
upils 9b8ace6
refactor: handle empty arch in Select
upils 79e047d
test: Invalid arch received by Select
upils 2b506e8
test: invalid and empty arch for Select
upils 032536a
test: check Select output
upils 1863441
test: split test to clarify intent
upils File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
magic value. should be a constant imo.
these are tests, so its maybe less important here, but nonetheless it does introduce a notion of a default architecture. maybe we should define that and the return it here:
https://github.com/canonical/chisel/pull/256/changes#diff-8867bd2aaddbb2642dd6d8fee78a80c836af5eaabbd059da7fe716a378603203R65 ??
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.
I do not think it introduces the notion of a default architecture from the point of view of
setup.Slice().Here in the test we use a value coherent with our tests cases. We set
amd64because that was previously the implicit value for the test cases.The behavior of falling back to inferring the arch is consistent with how the release is inferred in
obtainRelease. There is no "default value" but a heuristic to get a value from the building environment if none was explicitly provided (I see a nuance here, let me know if this is not clear).