Build Cache upload/download details

We’re excited to announce a new feature for Bitrise Build Cache users: detailed information about the objects uploaded and downloaded during each command invocation. This enhancement is now available on the Invocation Detail page, providing you with a deeper understanding of your build processes.

Why This Matters

This feature is particularly useful for debugging and optimizing your build cache usage. If you notice a sudden increase in uploads or downloads, for example on the Bitrise Insights Build Cache page, you can now drill down to see exactly which objects were involved. This level of detail can help you identify inefficiencies or unexpected changes in your build process.

How to Access Object IDs

By default, Gradle and Bazel do not print the IDs of uploaded or downloaded objects in the build logs. To match these IDs with your build logs, you’ll need to enable verbose logging:

For Gradle Users
  • Using the Build Cache for Gradle Step: Simply set the Verbose logging option to true.
  • Using Bitrise Build Cache CLI: Enable verbose logging by adding the --debug=true flag to your command. For example:
    bitrise-build-cache enable-for gradle --metrics=true --push=true --validation-level=warning --debug=true
    

With these settings, you’ll be able to see the object IDs in your build logs, making it easier to correlate them with the data on the Invocation Detail page.

For Bazel Users

Bazel does not have a direct flag to print build cache hashes. Instead, you can use the --execution_log_compact_file flag to generate a compact (binary) log file. Example:

bazel build //src:bazel-dev --execution_log_compact_file="$BITRISE_DEPLOY_DIR/bazel-exec.log"

You can then use the Bazel exec log parser to convert this compact log file into a searchable text file. For more details, refer to the official documentation.

Summary

We hope this new feature enhances your experience with Bitrise Build Cache and provides you with the insights you need to optimize your build processes. As always, we welcome your feedback and look forward to hearing how this feature helps you in your development workflow.