Skip to content
Snippets Groups Projects

[ci] Skip Versioned Function Lint on Develop

Merged Ursa (9R) requested to merge ursa/versioned-functions into develop
1 unresolved thread

Skips versioned function lint on commits in develop to avoid quirks like https://gitlab.com/thorchain/thornode/-/pipelines/926930011.

Merge request reports

Merge request pipeline #927646144 passed

Merge request pipeline passed for f4fc1b2e

Test coverage 54.00% (0.00%) from 1 job
Deployed to integ‎ration‎ 1 year ago

Merged by Ursa (9R)Ursa (9R) 1 year ago (Jul 11, 2023 3:52pm UTC)

Loading

Pipeline #927870065 passed

Pipeline passed for f4fc1b2e on develop

Test coverage 54.00% (0.00%) from 1 job
Deployed to integ‎ration‎ 1 year ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Son of Odin approved this merge request

    approved this merge request

  • Pluto approved this merge request

    approved this merge request

    • 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?)

    • Author Maintainer

      In the linked job the HEAD and FETCH_HEAD were the same, so git 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 of develop, 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?)

    • Author Maintainer

      It checks out the last git ref - but when HEAD and FETCH_HEAD were the same the last git ref would neither and ambiguous.

    • Please register or sign in to reply
  • Ursa (9R) added 2 commits

    added 2 commits

    • 85b780d0 - 1 commit from branch develop
    • f4fc1b2e - [ci] Skip Versioned Function Lint on Develop

    Compare with previous version

  • Asmund THORSec approved this merge request

    approved this merge request

  • merged

  • Ursa (9R) changed milestone to %Release-1.116.0

    changed milestone to %Release-1.116.0

Please register or sign in to reply
Loading