bazel-watcher icon indicating copy to clipboard operation
bazel-watcher copied to clipboard

chore: upgrade bazel to 7.4.1

Open janwinkler1 opened this issue 8 months ago • 8 comments

strongly inspired by #703 with three important distinctions:

  • we upgrade bazel version to 7.4.1 but do not enable bzlmod (yet) , #712 will do that
  • actively disabling three e2e tests on macos darwin CI build steps (override_repository_test, many_dirs_test, and symlink_dir_test)
  • add an ANSI stripper because ANSI sequences were causing issues in ExpectNoError

IMO at this stage this might be the way to go since CI is causing issues and the project seems to be stuck in a catch22 (even though #710 fixed CI issues, some new ones emerged upgrading bazel)

thus i suggest a pragmatic approach.

#714 and #715 address tasks to be done once we have upgraded the bazel version and have a passing CI

janwinkler1 avatar Mar 21 '25 17:03 janwinkler1

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Mar 21 '25 17:03 google-cla[bot]

@chickenandpork, do you use a m1 or intel macbook? currently CI is failing for the following e2e tests (darwin macos buildstep):

  • //internal/e2e/override_repository:override_repository_test
  • //internal/e2e/many_dirs:many_dirs
  • //internal/e2e/symlink_dir:symlink_dir_test

and macos legacy

  • //internal/e2e/stream:stream_test

janwinkler1 avatar Apr 04 '25 09:04 janwinkler1

@chickenandpork, do you use a m1 or intel macbook? currently CI is failing for the following e2e tests (darwin macos buildstep):

  • //internal/e2e/override_repository:override_repository_test
  • //internal/e2e/many_dirs:many_dirs
  • //internal/e2e/symlink_dir:symlink_dir_test

and macos legacy

  • //internal/e2e/stream:stream_test

I have one of each plus some older intel.

I’ll take a look.

chickenandpork avatar Apr 04 '25 15:04 chickenandpork

@chickenandpork, do you use a m1 or intel macbook? currently CI is failing for the following e2e tests (darwin macos buildstep):

  • //internal/e2e/override_repository:override_repository_test
  • //internal/e2e/many_dirs:many_dirs
  • //internal/e2e/symlink_dir:symlink_dir_test

@janwinkler1 are you essentially seeing this in your logs?

external/zlib/zutil.h:163:11: warning: 'OS_CODE' macro redefined [-Wmacro-redefined] ... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected ')' 318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen)); | ^

I've solved this on my end, but I wanted to ensure this is your obstacle. I can't see your logs from here.

chickenandpork avatar Apr 04 '25 17:04 chickenandpork

@chickenandpork hmm no it looks different, f.e. before disabling stream test the logs looked like:


exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //internal/e2e/stream:stream_test
-----------------------------------------------------------------------------
--- FAIL: TestSimpleTest (31.38s)
    stream_test.go:38: ibazel invoked as: /private/var/tmp/_bazel_buildkite/d6d6089463d59ed34c17023e2070e15d/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/internal/e2e/stream/stream_test_/stream_test.runfiles/_main/cmd/ibazel/ibazel_/ibazel --bazel_path=/Users/buildkite/Library/Caches/bazelisk/downloads/sha256/52dd34c17cc97b3aa5bdfe3d45c4e3938226f23dd0bfb47beedd625a953f1f05/bin/bazel --log_to_file=/tmp/ibazel_output.893164837.log --graceful_termination_wait_duration=1s test --bazelrc=/dev/null //single:stream
    stream_test.go:41: Expected iBazel output after 30s to be:
        Wanted [TestSimpleTest1], got []
    stream_test.go:41: Stderr: [$TEST_TMPDIR defined: output root default is '/private/var/tmp/_bazel_buildkite/d6d6089463d59ed34c17023e2070e15d/execroot/_main/_tmp/36d23a18c7734b42890523ea7f90b472' and max_idle_secs default is '15'.
        Loading: 0 packages loaded
        Loading: 12 packages loaded
            currently loading: @@bazel_tools//third_party/def_parser ... (2 packages)
        Loading: 15 packages loaded
        
        $TEST_TMPDIR defined: output root default is '/private/var/tmp/_bazel_buildkite/d6d6089463d59ed34c17023e2070e15d/execroot/_main/_tmp/36d23a18c7734b42890523ea7f90b472' and max_idle_secs default is '15'.
        Loading: 0 packages loaded
        
        $TEST_TMPDIR defined: output root default is '/private/var/tmp/_bazel_buildkite/d6d6089463d59ed34c17023e2070e15d/execroot/_main/_tmp/36d23a18c7734b42890523ea7f90b472' and max_idle_secs default is '15'.
        Computing main repo mapping: 
        Loading: 
        Loading: 0 packages loaded
        Analyzing: target //single:stream (0 packages loaded, 0 targets configured)
        Analyzing: target //single:stream (77 packages loaded, 219 targets configured)
        Analyzing: target //single:stream (78 packages loaded, 530 targets configured)
        Analyzing: target //single:stream (78 packages loaded, 530 targets configured)
        ]
        iBazelStderr: [[96miBazel [1:06PM][0m: Querying for files to watch...
        [96miBazel [1:06PM][0m: Testing //single:stream
        ]
FAIL

janwinkler1 avatar Apr 04 '25 18:04 janwinkler1

@janwinkler1 while I'm poking at the timing issue on macOS/intel, I've pushed a commit (https://github.com/janwinkler1/bazel-watcher/pull/1) as a PR to your branch in your fork to address the M1 build issue that I had, I suspect you might have.

chickenandpork avatar Apr 04 '25 20:04 chickenandpork

@achew22 as discussed in #712 I'm OK accepting the obligation to make e2e work on macos after this lands. Alternatively, I'm willing to pre-land required changes to allow this to merge and unblock #712.

I'm out of work right now, I have the time.

chickenandpork avatar Apr 17 '25 17:04 chickenandpork

hey @achew22 I don't mean to harass overly, but @janwinkler1 and I are trying to find ways to move forward, and you seem busy. Can we discuss more generally over Slack (https://bazelbuild.slack.com/archives/C014ZBRBHPD) ?

chickenandpork avatar May 01 '25 17:05 chickenandpork

closed bc merging #712

janwinkler1 avatar Jun 27 '25 19:06 janwinkler1