google / flogger

A Fluent Logging API for Java
Apache License 2.0
1.45k stars 123 forks source link

Error: 'JavaInfo' value has no field or method 'transitive_deps' #364

Closed sgowroji closed 9 months ago

sgowroji commented 9 months ago

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3330#018aca18-187f-4972-8032-109d066d4b77

Platform : Linux

Logs:

ERROR: /var/lib/buildkite-agent/builds/bk-docker-w343/bazel-downstream-projects/flogger/api/BUILD:142:16: in javadoc_library rule //api:api_javadoc:
Traceback (most recent call last):
    File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/7f581c848a2dd0b7b5dda230acd8a31b/external/google_bazel_common/tools/javadoc/javadoc.bzl", line 29, column 49, in _javadoc_library
        transitive_deps.append(dep[JavaInfo].transitive_deps)
Error: 'JavaInfo' value has no field or method 'transitive_deps'
Available attributes: _compile_time_java_dependencies, _constraints, _neverlink, _transitive_full_compile_time_jars, annotation_processing, api_generating_plugins, compilation_info, compile_jars, full_compile_jars, java_outputs, module_flags_info, outputs, plugins, runtime_output_jars, source_jars, transitive_compile_time_jars, transitive_native_libraries, transitive_runtime_jars, transitive_source_jars
(02:16:53) ERROR: /var/lib/buildkite-agent/builds/bk-docker-w343/bazel-downstream-projects/flogger/api/BUILD:142:16: Analysis of target '//api:api_javadoc' failed
(02:16:53) ERROR: Analysis of target '//api:api_javadoc' failed; build aborted

Culprit : https://github.com/bazelbuild/bazel/commit/72058be0628e84741232cb116a7199eb92638f84

Needs google_bazel_common udpate.

CC Greenteam @wyverald

sgowroji commented 9 months ago

Hi @eamonnmcmanus & @cpovirk, FYI We are still seeing this error in Bazel CI. Thanks!

eamonnmcmanus commented 9 months ago

I see this in the logs:

Fetching flogger sources at d2f442dbd373b1d883f3ca6b65229221d0a7e914 | 1s
...
  | git reset d2f442dbd373b1d883f3ca6b65229221d0a7e914 --hard
  | HEAD is now at d2f442d Add @NullableDecl to withInjectedLogSite parameter.
  | git submodule sync --recursive

That is this commit from last year. @sgowroji, do you know why it is using such an out-of-date version?

eamonnmcmanus commented 9 months ago

I see this in the docker run command near the start:

Running command in gcr.io/bazel-public/ubuntu2004-java11 | 20s
$ docker run -it --rm --init --volume /var/lib/buildkite-agent/builds/bk-docker-w343/bazel/bazel-at-head-plus-downstream:/workdir --volume /etc/group:/etc/group:ro --volume /etc/passwd:/etc/passwd:ro --volume /etc/shadow:/etc/shadow:ro --volume /opt/android-ndk-r15c:/opt/android-ndk-r15c:ro --volume /opt/android-ndk-r25b:/opt/android-ndk-r25b:ro --volume /opt/android-sdk-linux:/opt/android-sdk-linux:ro --volume /var/lib/buildkite-agent:/var/lib/buildkite-agent --volume /var/lib/gitmirrors:/var/lib/gitmirrors:ro --volume /var/run/docker.sock:/var/run/docker.sock --volume /var/lib/gitmirrors/https---github-com-bazelbuild-bazel-git:/var/lib/gitmirrors/https---github-com-bazelbuild-bazel-git:ro --workdir /workdir -u 997:997 --env BUILDKITE_JOB_ID --env BUILDKITE_BUILD_ID --env BUILDKITE_AGENT_ACCESS_TOKEN --volume /usr/bin/buildkite-agent:/usr/bin/buildkite-agent --env ANDROID_HOME --env ANDROID_NDK_HOME --env BUILDKITE_ARTIFACT_UPLOAD_DESTINATION --privileged --env BUILDKITE_TRIGGERED_FROM_BUILD_NUMBER --env BUILDKITE_PROJECT_PROVIDER --env BUILDKITE_COMMAND --env BUILDKITE_JOB_ID --env BUILDKITE_ARTIFACT_PATHS --env BUILDKITE_PROJECT_SLUG --env BUILDKITE_TAG --env BUILDKITE_BUILD_ID --env BUILDKITE_BUILD_AUTHOR --env BUILDKITE_AGENT_META_DATA_OS --env BUILDKITE_BUILD_CREATOR --env BUILDKITE_PULL_REQUEST_BASE_BRANCH --env BUILDKITE_BUILD_AUTHOR_EMAIL --env BUILDKITE_PULL_REQUEST --env BUILDKITE_TIMEOUT --env BUILDKITE_PIPELINE_PROVIDER --env BUILDKITE_PIPELINE_ID --env BUILDKITE_COMMIT --env BUILDKITE_BUILD_CREATOR_EMAIL --env BUILDKITE_SCRIPT_PATH --env BUILDKITE_MESSAGE --env BUILDKITE_SOURCE --env BUILDKITE --env BUILDKITE_AGENT_META_DATA_KIND --env BUILDKITE_PIPELINE_DEFAULT_BRANCH --env BUILDKITE_BUILD_URL --env BUILDKITE_AGENT_NAME --env BUILDKITE_PIPELINE_NAME --env BUILDKITE_ORGANIZATION_SLUG --env BUILDKITE_BUILD_NUMBER --env BUILDKITE_STEP_KEY --env BUILDKITE_BRANCH --env BUILDKITE_PLUGINS --env BUILDKITE_PIPELINE_SLUG --env BUILDKITE_AGENT_ID --env BUILDKITE_PIPELINE_TEAMS --env BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG --env CI --env BUILDKITE_REPO --env BUILDKITE_AGENT_META_DATA_QUEUE --env BUILDKITE_REBUILT_FROM_BUILD_NUMBER --env BUILDKITE_STEP_ID --env BUILDKITE_REBUILT_FROM_BUILD_ID --env BUILDKITE_RETRY_COUNT --env BUILDKITE_PULL_REQUEST_REPO --env BUILDKITE_TRIGGERED_FROM_BUILD_ID --env BUILDKITE_LABEL --env BUILDKITE_BUILD_CREATOR_TEAMS --network host --label com.buildkite.job-id=018aca18-187f-4972-8032-109d066d4b77 gcr.io/bazel-public/ubuntu2004-java11 /bin/sh -e -c curl -sS https://raw.githubusercontent.com/bazelbuild/continuous-integration/master/buildkite/bazelci.py?1695607684 -o bazelci.py\npython3.8 bazelci.py runner --task=ubuntu2004 --http_config=https://raw.githubusercontent.com/bazelbuild/continuous-integration/master/pipelines/flogger.yml --git_repository=https://github.com/google/flogger.git --git_commit=d2f442dbd373b1d883f3ca6b65229221d0a7e914 --use_but'

Notice the --git_commit near the end of that very long command. It looks like that's hardcoding the old commit I mentioned above?

sgowroji commented 9 months ago

Hi @eamonnmcmanus, Thanks for the Quick reply. Let me check and update you the same.

sgowroji commented 9 months ago

This is fixed and the old commit reflecting is because of this dependency. Sorry for the wrong alert. We can close this issue.