Skip to content

Commit

Permalink
fix: e2e MODULE.bazel.lock conflicts and repo name in copy.sh script (#…
Browse files Browse the repository at this point in the history
…87)

* 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.

* fix: repo name in copy.sh script

PR #73 added the `_resolve` and this breaks the buildozer fix / autofix

* fix: remove dead locks

It seemed like 75afff9 in #47 added the new locks but as new files, that
is, the old ones were left behind.
  • Loading branch information
jjmaestro authored Oct 28, 2024
1 parent b7e2655 commit 70c14c0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9,863 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# ignoring e2e MODULE.bazel.lock for the time being
# see https://github.com/bazelbuild/bazel/issues/20369
e2e/smoke/MODULE.bazel.lock
bazel-*
.bazelrc.user
.idea/
Expand Down
8 changes: 4 additions & 4 deletions apt/private/resolve.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ def _deb_resolve_impl(rctx):
rctx.file(
"copy.sh",
_COPY_SH_TMPL.format(
# TODO: don't assume the canonical -> apparent repo mapping character, as it might change
# https://bazelbuild.slack.com/archives/C014RARENH0/p1719237766005439
# https://github.com/bazelbuild/bazel/issues/22865
name = rctx.name.split("~")[-1],
# NOTE: the split("~") is needed when we run bazel from another
# directory, e.g. when running e2e tests we change dir to e2e/smoke
# and then rctx.name is 'rules_distroless~~apt~bullseye'
name = rctx.name.split("~")[-1].replace("_resolve", ""),
label = locklabel,
workspace_relative_path = (("%s/" % locklabel.package) if locklabel.package else "") + locklabel.name,
),
Expand Down
Loading

0 comments on commit 70c14c0

Please sign in to comment.