-
Notifications
You must be signed in to change notification settings - Fork 27
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
refactor: improve copy.sh #92
Open
jjmaestro
wants to merge
8
commits into
GoogleContainerTools:main
Choose a base branch
from
jjmaestro:refactor-improve-copy-sh
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor: improve copy.sh #92
jjmaestro
wants to merge
8
commits into
GoogleContainerTools:main
from
jjmaestro:refactor-improve-copy-sh
Conversation
This file contains 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
See bazelbuild/bazel#20369 While working on refactoring, I kept hitting rebase conflicts due to issues with the MODULE lock. I guess it's because the Bazel version in e2e tests is much lower than the current one with the fix (7.2) but still, I don't think it adds much to have the lock in e2e testing.
PR GoogleContainerTools#73 added the `_resolve` and this breaks the buildozer fix / autofix
It seemed like 75afff9 in GoogleContainerTools#47 added the new locks but as new files, that is, the old ones were left behind.
Add support for MODULE.bazel to the lock script and avoid printing an unnecessary (and annoying 😅) error when building in a "modern repo".
Add a `nolock` attribute to avoid getting annoying DEBUG messages for repos that we explicitly want to run without a lock.
* make apt/tests more readable by factoring out the parameters * add a "test suite macro" in each test file that group all of the unit tests in the file and prepends a "test suite prefix". IMHO this is better than using `unittest.suite` because we provide better naming than the automated `_test<NUMBER>` plus these better names are actual targets that can be executed one-by-one by name.
Add other nolock tests to exercise the package repos (the templates, etc).
* separate the script into a template file so it's easier to shellcheck and syntax highlight in editors. * shellcheck the script and remove all SC2086 warnings ("Double quote to prevent globbing and word splitting") * improve the buildozer help messages in the copy.sh script: * reduce duplication of buildozer command * add a more clear autofix bazel run command that can be easily copy-pasted * change some of the variable names in the copy.sh template for longer, easier to understand names (repo_name >> name, lock_label >> label) * move repo_name and workspace_relative_path into variables to reduce line length and improve readability
jjmaestro
force-pushed
the
refactor-improve-copy-sh
branch
from
September 22, 2024 18:43
17862ed
to
0afb5dc
Compare
@thesayyn could you continue reviewing the stack of PRs? 😅 🙏 this one and the previous 3 PRs in the stack (87, 88, and 91) should be very easy to review, they add a few things before the larger refactors. Thanks!! |
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.
Note
Stacked on top of #91
refactor: improve the lock copy.sh script
separate the script into a template file so it's easier to shellcheck and syntax highlight in editors.
shellcheck the script and remove all SC2086 warnings ("Double quote to prevent globbing and word splitting")
improve the buildozer help messages in the copy.sh script:
change some of the variable names in the copy.sh template for longer, easier to understand names (repo_name >> name, lock_label >> label)
move repo_name and workspace_relative_path into variables to reduce line length and improve readability