initialization-actions
initialization-actions copied to clipboard
[prometheus] Using $(hostname -s) vs ${HOSTNAME}
Recent change in the hostname implementation has required that we find short hostname using a different mechanism. This patch makes that change.
/gcbrun
This is another action without tests. Should we add tests or remove the action? Since we do have documentation[1] about the init action, perhaps it is best to add the tests in this case.
2024-02-23T19:52:47.073792104Z + bazel test --jobs=10 --local_test_jobs=10 --flaky_test_attempts=3 --action_env=INTERNAL_IP_SSH=true --test_output=errors --noshow_progress --noshow_loading_progress --test_arg=--image_version=2.0-debian10 prometheus:test_prometheus
2024-02-23T19:52:47.090727715Z Extracting Bazel installation...
2024-02-23T19:52:52.482293143Z Starting local Bazel server and connecting to it...
2024-02-23T19:53:03.976555798Z WARNING: --enable_bzlmod is set, but no MODULE.bazel file was found at the workspace root. Bazel will create an empty MODULE.bazel file. Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. For more details, please refer to https://github.com/bazelbuild/bazel/issues/18958.
2024-02-23T19:53:18.089195388Z ERROR: no such package 'prometheus': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
2024-02-23T19:53:18.089267900Z - /init-actions/prometheus
2024-02-23T19:53:18.362148817Z INFO: Elapsed time: 30.939s
2024-02-23T19:53:18.369516856Z INFO: 0 processes.
2024-02-23T19:53:18.371810641Z ERROR: Build did NOT complete successfully
2024-02-23T19:53:18.384534704Z ERROR: Couldn't start the build. Unable to run tests
[1] https://cloud.google.com/monitoring/agent/ops-agent/prometheus