[ci] Skip Versioned Function Lint on Develop
Skips versioned function lint on commits in develop to avoid quirks like https://gitlab.com/thorchain/thornode/-/pipelines/926930011.
Merge request reports
Activity
added tooling-or-ci label
Could I ask in more detail what the effect on linting behaviour is?
(Is it to prevent reaction to creation of a new previous-version function name (in this case a copy of a previous
CUR
function),
and will creation of a new previous-version function name that isn't a copy of a previous function still be detected?)In the linked job the
HEAD
andFETCH_HEAD
were the same, sogit checkout -
was ambiguous and selected a commit from an un-merged PR. This covers a wider case to skip if the current head is an ancestor ofdevelop
, which prevents similar error if, for example, run on a trailing release branch.Thank you very much for this explanation!
Looking closer at the lint job for the described phenomenon:
$ git fetch origin develop
* branch develop -> FETCH_HEAD
* branch develop -> FETCH_HEAD
HEAD is now at 0c2072c42 refactor manager versioning to be easier diffs #check-lint-warning Previous HEAD position was 0c2072c42 refactor manager versioning to be easier diffs #check-lint-warning HEAD is now at 929272f26 Update adr-009-reserve-income-fee-overhaul.md
I see that the branch's commit (for which the pipeline was run) was 0c2072c4 and that 929272f2 is not a develop commit, the equivalent being the later-than-0c2072c4 85b780d0.
I note
git checkout -
here;
https://gitlab.com/thorchain/thornode/-/blob/v1.115.0/scripts/lint-versions.bash#L16-18 .By any chance is the behaviour of
git checkout -
described in
https://git-scm.com/docs/git-checkout
or in documentation elsewhere? I am currently unfamiliar with how a hyphen prefix behaves without a specified flag(?).Does skipping lint for develop mean that the version checks are done when running a pipeline as a merge request, but not done once already merged into the develop branch?
(Perhaps increasing the importance of never (allowing) merging of an MR (which may have just been rebased, for instance) until its pipeline has passed?)
added 2 commits
changed milestone to %Release-1.116.0