Skip to content

Commit

Permalink
Merge branch 'release-7.1.0' into cp20574-7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iancha1992 authored Jan 5, 2024
2 parents af7b876 + e16250c commit 0777d55
Show file tree
Hide file tree
Showing 28 changed files with 298 additions and 137 deletions.
82 changes: 47 additions & 35 deletions .bazelci/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,27 @@ tasks:
- "-//src/test/shell/bazel:bazel_coverage_cc_released_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_cc_head_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_sh_test"
# https://github.com/bazelbuild/bazel/issues/18776
# Centos7 uses python 2 by default, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
fedora39:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
android_ndk_repository/android_ndk_repository/' WORKSPACE.bzlmod
- rm -f WORKSPACE.bzlmod.bak
- rm -rf $HOME/bazeltest
- mkdir $HOME/bazeltest
build_flags:
- "--config=ci-linux"
build_targets:
- "//src:bazel"
- "//src:bazel_jdk_minimal"
- "//src/main/java/..."
include_json_profile:
- build
- test
Expand Down Expand Up @@ -85,13 +99,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -152,13 +159,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -206,13 +206,6 @@ tasks:
- "-//src/test/shell/bazel/apple:bazel_apple_test"
# https://github.com/bazelbuild/bazel/issues/17408
- "-//src/test/shell/bazel/apple:bazel_objc_test"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
# https://github.com/bazelbuild/bazel/issues/17410
- "-//src/test/java/com/google/devtools/build/lib/platform:SystemMemoryPressureEventTest"
# https://github.com/bazelbuild/bazel/issues/17411
Expand All @@ -223,6 +216,17 @@ tasks:
- "-//src/test/shell/bazel:bazel_determinism_test"
# https://github.com/bazelbuild/bazel/issues/17457
- "-//src/test/shell/bazel:jdeps_test"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -262,10 +266,6 @@ tasks:
- "-//src/test/shell/bazel:bazel_cc_code_coverage_test"
# MacOS does not have cgroups so it can't support hardened sandbox
- "-//src/test/shell/integration:bazel_hardened_sandboxed_worker_test"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# https://github.com/bazelbuild/bazel/issues/16525
- "-//src/test/java/com/google/devtools/build/lib/buildtool:KeepGoingTest"
- "-//src/test/java/com/google/devtools/build/lib/buildtool:DanglingSymlinkTest"
Expand All @@ -277,6 +277,25 @@ tasks:
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
# https://github.com/bazelbuild/bazel/issues/17007
- "-//src/test/java/com/google/devtools/build/lib/platform:SystemMemoryPressureEventTest"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
# https://github.com/bazelbuild/bazel/issues/17411
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:PatchApiBlackBoxTest"
# https://github.com/bazelbuild/bazel/issues/17447
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:GitRepositoryBlackBoxTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -404,13 +423,6 @@ tasks:
- "-//src/test/py/bazel:bazel_yanked_versions_test"
- "-//src/test/py/bazel:bzlmod_query_test"
- "-//src/test/shell/bazel:verify_workspace"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down
83 changes: 48 additions & 35 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,27 @@ tasks:
- "-//src/test/shell/bazel:bazel_coverage_cc_released_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_cc_head_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_sh_test"
# https://github.com/bazelbuild/bazel/issues/18776
# Centos7 uses python 2 by default, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
fedora39:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
android_ndk_repository/android_ndk_repository/' WORKSPACE.bzlmod
- rm -f WORKSPACE.bzlmod.bak
- rm -rf $HOME/bazeltest
- mkdir $HOME/bazeltest
build_flags:
- "--config=ci-linux"
build_targets:
- "//src:bazel"
- "//src:bazel_jdk_minimal"
- "//src/main/java/..."
include_json_profile:
- build
- test
Expand Down Expand Up @@ -87,13 +101,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -155,13 +162,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -210,13 +210,6 @@ tasks:
- "-//src/test/shell/bazel/apple:bazel_apple_test"
# https://github.com/bazelbuild/bazel/issues/17408
- "-//src/test/shell/bazel/apple:bazel_objc_test"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
# https://github.com/bazelbuild/bazel/issues/17410
- "-//src/test/java/com/google/devtools/build/lib/platform:SystemMemoryPressureEventTest"
# https://github.com/bazelbuild/bazel/issues/17411
Expand All @@ -227,6 +220,17 @@ tasks:
- "-//src/test/shell/bazel:bazel_determinism_test"
# https://github.com/bazelbuild/bazel/issues/17457
- "-//src/test/shell/bazel:jdeps_test"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -267,10 +271,6 @@ tasks:
- "-//src/test/shell/bazel:bazel_cc_code_coverage_test"
# MacOS does not have cgroups so it can't support hardened sandbox
- "-//src/test/shell/integration:bazel_hardened_sandboxed_worker_test"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# https://github.com/bazelbuild/bazel/issues/16525
- "-//src/test/java/com/google/devtools/build/lib/buildtool:KeepGoingTest"
- "-//src/test/java/com/google/devtools/build/lib/buildtool:DanglingSymlinkTest"
Expand Down Expand Up @@ -335,6 +335,26 @@ tasks:
- "-//src/test/shell/bazel:bazel_repository_cache_test"
- "-//src/test/shell/integration:aquery_test"
- "-//src/test/shell/integration:py_args_escaping_test"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
- "-//src/test/shell/integration:minimal_jdk_test"
# https://github.com/bazelbuild/bazel/issues/17411
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:PatchApiBlackBoxTest"
# https://github.com/bazelbuild/bazel/issues/17447
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:GitRepositoryBlackBoxTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -468,13 +488,6 @@ tasks:
# Flaky on rbe_ubuntu2004
# https://github.com/bazelbuild/continuous-integration/issues/1631
- "-//src/test/shell/bazel:bazel_sandboxing_networking_test"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public RunModuleExtensionResult run(
// Instiantiate the repos one by one.
for (InnateExtensionRepo repo : repos) {
Object exported = repo.loadedBzl().getModule().getGlobal(repo.ruleName());
if (!(exported instanceof RepositoryRuleFunction)) {
if (exported == null) {
ImmutableSet<String> exportedRepoRules =
repo.loadedBzl().getModule().getGlobals().entrySet().stream()
.filter(e -> e.getValue() instanceof RepositoryRuleFunction)
Expand All @@ -636,6 +636,17 @@ public RunModuleExtensionResult run(
repo.tag().getLocation(),
SpellChecker.didYouMean(repo.ruleName(), exportedRepoRules)),
Transience.PERSISTENT);
} else if (!(exported instanceof RepositoryRuleFunction)) {
throw new SingleExtensionEvalFunctionException(
ExternalDepsException.withMessage(
Code.BAD_MODULE,
"%s exports a value called %s of type %s, yet a repository_rule is requested"
+ " at %s",
repo.bzlLabel(),
repo.ruleName(),
Starlark.type(exported),
repo.tag().getLocation()),
Transience.PERSISTENT);
}
RepositoryRuleFunction repoRule = (RepositoryRuleFunction) exported;
Dict<String, Object> kwargs = repo.tag().getAttributeValues().attributes();
Expand Down
Loading

0 comments on commit 0777d55

Please sign in to comment.