Skip to content

Conversation

@per1234
Copy link
Contributor

@per1234 per1234 commented Sep 3, 2021

The engine has three trigger events, each with their own base ref:

  • push: parent commit
  • pull request: PR base ref
  • manual trigger: arbitrary ref selected by the user

The push event is triggered by both commit pushes and tag pushes. It turns out the github context field that provides
the parent commit ref is set to 0000000000000000000000000000000000000000 on a tag push, which caused the workflow to
fail. Although it would be possible to get the parent commit ref via a git command, this isn't a useful comparison to get
from a tag push. The more useful comparison will be against the previous tag.


Previous version of the workflow failing on a tag push:
https://github.com/arduino/libraries-repository-engine/actions/runs/1194197512
Demo of this version triggered by a tag push:
https://github.com/per1234/libraries-repository-engine/actions/runs/1198521674

…d by tag

The engine has three trigger events, each with their own base ref:

- push: parent commit
- pull request: PR base ref
- manual trigger: arbitrary ref selected by the user

The `push` event is triggered by both commit pushes and tag pushes. It turns out the github context field that provides
the parent commit ref is set to `0000000000000000000000000000000000000000` on a tag push, which caused the workflow to
fail. Although it would be possible to get the parent commit ref via a git command, this isn't a useful comparison to get
from a tag push. The more useful comparison will be against the previous tag.
@per1234 per1234 added type: bug topic: infrastructure Related to project infrastructure labels Sep 3, 2021
Under some unexpected circumstances, the information used to determine the ref for the base of the comparison might be
missing, which would result in an empty definition for the ref. Since the `actions/checkout` action defaults to checking
out the tip of the default branch, this would not be reported and would result in spurious results. Better will be to
cause the relevant workflow step to fail with a helpful error message.
@per1234 per1234 merged commit b524c45 into arduino:main Sep 6, 2021
@per1234 per1234 deleted the compare-tag branch September 6, 2021 07:52
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants