Skip to content
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
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Sep 22, 2024

  1. fix: MODULE.bazel.lock conflicts

    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.
    jjmaestro committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    3675db4 View commit details
    Browse the repository at this point in the history
  2. fix: repo name in copy.sh script

    PR GoogleContainerTools#73 added the `_resolve` and this breaks the buildozer fix / autofix
    jjmaestro committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    bf9b27a View commit details
    Browse the repository at this point in the history
  3. fix: remove dead locks

    It seemed like 75afff9 in GoogleContainerTools#47 added the new locks but as new files, that
    is, the old ones were left behind.
    jjmaestro committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    22ba9e5 View commit details
    Browse the repository at this point in the history
  4. feat: add support for MODULE.bazel to the lock copy.sh script

    Add support for MODULE.bazel to the lock script and avoid printing an
    unnecessary (and annoying 😅) error when building in a "modern repo".
    jjmaestro committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    eff7b9f View commit details
    Browse the repository at this point in the history
  5. feat: avoid DEBUG messages for lockless repos

    Add a `nolock` attribute to avoid getting annoying DEBUG messages for
    repos that we explicitly want to run without a lock.
    jjmaestro committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    540a7cb View commit details
    Browse the repository at this point in the history
  6. refactor: apt/tests

    * 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.
    jjmaestro committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    c789aad View commit details
    Browse the repository at this point in the history
  7. test: add a bullseye_nolock package to the tests

    Add other nolock tests to exercise the package repos (the templates,
    etc).
    jjmaestro committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    c038d26 View commit details
    Browse the repository at this point in the history
  8. 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:
      * 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 committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    0afb5dc View commit details
    Browse the repository at this point in the history