-
When I made a commit, the precommit hook throws this error: Github workflow dependencies hash is up to date..........................Failed - hook id: check-dependencies-hash - exit code: 1 Virtually all workflows are touched, although I did not make any change to the dependency. May I know what this check does and how to pass it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@vryy Can you post the |
Beta Was this translation helpful? Give feedback.
-
This commit hook tries to solve the following problem: 4C needs to build and run the tests within a specific version of the dependencies image. Therefore we generate a hash based on the dependencies-folder and the docker file and tag the resulting image with this hash. In every job, we do the check whether we are running in the correct image. In our GitHub workflows, we need to explicitly add the tag. We cannot determine it on runtime. If it happens that we forget to adapt this tag in our GitHub workflows, the pipeline will fail. This might happen only after merge in some situations. To avoid this very early, we added the pre-commit check that verifies that we always specify the correct dependencies-image in our GitHub workflows. Normally, if you don't change the dependencies, the computation of the hash should be the same on every machine. If this is not the case, it's a bad choice of the hash. To investigate why this does not work on your machine, let's do the computation of the hash step-by-step and compare the outputs. Note, the following outputs refer to the state from January 9, 2025:
The output for the current main should be
The output for the current main should be
The output for the current main should be
The output for the current main should be
Can you check locally and post where the algorithm produces a different output on your machine? |
Beta Was this translation helpful? Give feedback.
Thanks, now I got it. I got different results right in the first step: