-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Job commit is not being created #22
Comments
The commit is created. There must be something wrong when we assign the commit hash to the output variable. |
I'm debugging following these steps:
I'm running the workflow locally with act with: ./bin/act -W .github/workflows/work-allocator.yml -j update By the way, act has released a new version that supports node 16. I got this strange error in the checkout action:
It seems the submodule update was trying to use the
The output from SinpleGit is:
And this is the commit:
And I finally found the problem. In this method: findByShortCommitHash(shortCommitHash: ShortCommitHash): CommittedMessage {
const commits = this.messages.filter(message => {
console.log("equals to", message.shortCommitHash(), shortCommitHash)
message.shortCommitHash().equalsTo(shortCommitHash)
})
if (commits.length === 0) {
return nullMessage()
}
return commits[0]
} We always assume the short commit hash to be 7 chars and the one SinpleGit is returning has 8 chars. This comparison is not working because of the missing '8' char at the end.
This bug affects this issue @yeraydavidrodriguez Besides, I was talking to @da2ce7 yesterday and we want to modify the commit to get the full hash using git commit-tree. I can understand why the unit test is working in the git-queue but I have to find out why the e2e did not fail. Besides, it seems 7-char length for the short hash is not a standard. For some reason in this repo has changed from 7 to 8. Since we were using a Beta version I think we could fix this issue just by not using short hashes anymore. We can also fix this version by allowing different sizes for short hashes. That would be easy to fix, I think. |
Please remember that the git short hashes are variable length:
|
becuase the git short commit length changed from 7 chars to 8.:
becuase the git short commit length changed from 7 chars to 8.:
Bug external project: nautilus-cyberneering/library-consumer#22 Issue: #123 The bug was temporarily fixes but setting git config with: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
We can remove the patch using a newer version of GitQueue when this PR is merged. That means we do not need anymore this patch in the workflows: - name: Set the length for git short commit hashes
run: |
# Why do we need this? https://github.com/Nautilus-Cyberneering/library-consumer/issues/22
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreabbrev
git config --global core.abbrev 7 |
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
When the library changes (a new commit is created) the queue job commit is not being created:
https://github.com/Nautilus-Cyberneering/library-consumer/runs/5850529993?check_suite_focus=true#step:8:18
I'm going to find out first if it's actually not created or only a problem assigning outputs.
The text was updated successfully, but these errors were encountered: