Description of the bug:
I want at the same time:
- upload new application only if application was actually changed;
- add stamping information to application.
As far as I understand, if only the volatile-status.txt file has changed between builds, then this should not cause the application to be rebuilt.
For me, changing this file is ignored only for two consecutive builds on the same working copy.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Minimal example repository: https://github.com/bozaro/bazel-stamping
Steps for reproduce:
- checkout
- execute
./stamping.sh (this script show artifact builds difference at last step)
Expected result: empty diff and exit code 0
Actual result: non-empty diff and exit code 1
What stamping.sh do?
.bazelrc:
build --disk_cache=bazel-cache
What stamping.sh do:
# Generate bazel-bin/stamping.txt based on stamping.sh and volatile-status.txt
bazel build :stamping --stamp
tee pass-1.txt < bazel-bin/stamping.txt
# Wait one second to have differ BUILD_TIMESTAMP in volatile-status.txt
sleep 1
# Remove local bazel cache (but disk cache is still present)
bazel clean
# Generate bazel-bin/stamping.txt based on stamping.sh and volatile-status.txt
bazel build :stamping --stamp
tee pass-2.txt < bazel-bin/stamping.txt
# Compare first and second pass
diff pass-1.txt pass-2.txt
Which operating system are you running Bazel on?
Ubuntu 22.04.1 LTS
What is the output of bazel info release?
release 5.3.0
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
$ git remote get-url origin; git rev-parse master; git rev-parse HEAD
git@github.com:bozaro/bazel-stamping.git
599f3d8a1df088443d6f5868c43bd0f59b48aaf3
599f3d8a1df088443d6f5868c43bd0f59b48aaf3
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Description of the bug:
I want at the same time:
As far as I understand, if only the
volatile-status.txtfile has changed between builds, then this should not cause the application to be rebuilt.For me, changing this file is ignored only for two consecutive builds on the same working copy.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Minimal example repository: https://github.com/bozaro/bazel-stamping
Steps for reproduce:
./stamping.sh(this script show artifact builds difference at last step)Expected result: empty diff and exit code 0
Actual result: non-empty diff and exit code 1
What stamping.sh do?
.bazelrc:
What
stamping.shdo:Which operating system are you running Bazel on?
Ubuntu 22.04.1 LTS
What is the output of
bazel info release?release 5.3.0
If
bazel info releasereturnsdevelopment versionor(@non-git), tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD?