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

Enable Bzlmod in shell integration tests #19785

Closed

Conversation

meteorcloudy
Copy link
Member

No description provided.

@meteorcloudy meteorcloudy marked this pull request as draft October 10, 2023 16:03
@meteorcloudy meteorcloudy changed the title Enable Bzlmod in Java integration tests Enable Bzlmod in shell integration tests Oct 10, 2023
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. labels Oct 10, 2023
@meteorcloudy
Copy link
Member Author

meteorcloudy commented Oct 10, 2023

https://buildkite.com/bazel/bazel-bazel-github-presubmit/builds/17881#018b1aa5-3ad2-4297-bee7-843640094ebd

Failing shell tests after enabling Bzlmod:

  • //src/main/starlark/tests/builtins_bzl:cc_builtin_tests (bzlmod disabled)
  • //src/test/shell/bazel/remote:remote_execution_http_test
  • //src/test/shell/bazel/remote:remote_execution_test
  • //src/test/shell/bazel:bazel_coverage_hermetic_py_test (bzlmod disabled)
  • //src/test/shell/bazel:bazel_coverage_java_jdk11_toolchain_head_test
  • //src/test/shell/bazel:bazel_coverage_java_jdk11_toolchain_released_test
  • //src/test/shell/bazel:bazel_coverage_java_jdk17_toolchain_head_test
  • //src/test/shell/bazel:bazel_coverage_java_jdk17_toolchain_released_test
  • //src/test/shell/bazel:bazel_coverage_java_test
  • //src/test/shell/bazel:bazel_example_test
  • //src/test/shell/bazel:bazel_hermetic_sandboxing_test
  • //src/test/shell/bazel:bazel_java17_test (bzlmod disabled)
  • //src/test/shell/bazel:bazel_test_test
  • //src/test/shell/bazel:bazel_with_jdk_test
  • //src/test/shell/bazel:bazel_workspaces_test
  • //src/test/shell/bazel:cc_flags_supplier_test
  • //src/test/shell/bazel:cc_integration_test
  • //src/test/shell/bazel:check_external_files_test (bzlmod disabled)
  • //src/test/shell/bazel:cross_repository_test
  • //src/test/shell/bazel:execroot_test
  • //src/test/shell/bazel:external_correctness_test
  • //src/test/shell/bazel:local_repository_test
  • //src/test/shell/bazel:platform_mapping_test
  • //src/test/shell/bazel:platforms_test
  • //src/test/shell/bazel:python_version_test
  • //src/test/shell/bazel:runfiles_test
  • //src/test/shell/bazel:starlark_git_repository_test
  • //src/test/shell/bazel:starlark_repository_test
  • //src/test/shell/bazel:workspace_test (bzlmod disabled)
  • //src/test/shell/integration:aquery_test (bzlmod disabled, partially)
  • //src/test/shell/integration:aspect_test
  • //src/test/shell/integration:bazel_aquery_test
  • //src/test/shell/integration:bazel_java_test
  • //src/test/shell/integration:build_event_stream_test
  • //src/test/shell/integration:configured_query_test (bzlmod disabled)
  • //src/test/shell/integration:cpp_test (bzlmod disabled, partially)
  • //src/test/shell/integration:discard_graph_edges_test (bzlmod disabled)
  • //src/test/shell/integration:runfiles_test
  • //src/test/shell/integration:sandboxing_test
  • //src/test/shell/integration:target_compatible_with_test
  • //src/test/shell/integration:toolchain_test

@meteorcloudy meteorcloudy force-pushed the java_integration_bzlmod branch from 4abadb8 to 3d35da4 Compare October 10, 2023 18:53
@meteorcloudy meteorcloudy force-pushed the java_integration_bzlmod branch 2 times, most recently from 5d38a2d to b464079 Compare October 12, 2023 15:02
@meteorcloudy
Copy link
Member Author

@fmeum Can you help check why test_incompatible_tool_system_classpath from //src/test/shell/bazel:bazel_java17_test doesn't work when Bzlmod is enabled? The expected error message wasn't printed somehow.

@meteorcloudy meteorcloudy force-pushed the java_integration_bzlmod branch from b464079 to 418a01d Compare October 12, 2023 20:12
@fmeum
Copy link
Collaborator

fmeum commented Oct 12, 2023

@fmeum Can you help check why test_incompatible_tool_system_classpath from //src/test/shell/bazel:bazel_java17_test doesn't work when Bzlmod is enabled? The expected error message wasn't printed somehow.

This test overrides java_tools by adding repos to WORKSPACE, but with Bzlmod these repos aren't the source of truth for the tools.

@meteorcloudy meteorcloudy force-pushed the java_integration_bzlmod branch 2 times, most recently from e5f87f5 to 3c72550 Compare October 12, 2023 21:06
@meteorcloudy meteorcloudy force-pushed the java_integration_bzlmod branch from 3c72550 to 62b04f4 Compare October 12, 2023 22:03
@meteorcloudy
Copy link
Member Author

meteorcloudy commented Oct 13, 2023

@fmeum Can you take a look why test_config_function from //src/test/shell/integration:configured_query_test is failing? I feel it might be a bug in Bazel when Bzlmod is enabled.

@meteorcloudy meteorcloudy force-pushed the java_integration_bzlmod branch from 62b04f4 to b007fce Compare October 13, 2023 08:49
@meteorcloudy meteorcloudy force-pushed the java_integration_bzlmod branch from b007fce to 9ca2c78 Compare October 13, 2023 09:12
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Oct 13, 2023
@fmeum
Copy link
Collaborator

fmeum commented Oct 13, 2023

@fmeum Can you take a look why test_config_function from //src/test/shell/integration:configured_query_test is failing? I feel it might be a bug in Bazel when Bzlmod is enabled.

@meteorcloudy Yes, this appears to be a bug in Bazel with Bzlmod enabled. When I recreate the setup of the integration test in a reproducer and run bazel cquery "deps(//$pkg:demo)" followed by bazel config, I get four reported configurations when running with --noenable_bzlmod, but no configurations when running with --enable_bzlmod.

CC @gregestren Do you happen to have an idea why configs may be dropped with Bzlmod?

@meteorcloudy meteorcloudy reopened this Oct 13, 2023
@gregestren
Copy link
Contributor

CC @gregestren Do you happen to have an idea why configs may be dropped with Bzlmod?

No but I'll look.

What ETA are you looking at for bzlmod flipping?

@meteorcloudy
Copy link
Member Author

@gregestren Thanks! We can fix this even after the release cut by backporting. So this isn't blocking the release cut, just the final release, which is expected to be baked for at least a month based on past experience.

@meteorcloudy
Copy link
Member Author

FYI, @katre is also looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants