Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci/ci_commit_formatting_run: Problem with checking older MR branch. #12658

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

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

andrewleech
Copy link
Contributor

@andrewleech andrewleech commented Oct 10, 2023

I've noticed on a couple of MR's lately that the CI commit message check is failing, even when the MR commit looks fine.

One example of this is https://github.com/micropython/micropython/actions/runs/6059530353/job/16442749613?pr=12126
This an MR with 4 commits, however the CI check is looking at a long list of different commits:
image

I made this dummy MR branched from the same point as #12126 to test / examine the issue, though in testing locally I'm pretty sure I've found the problem. Assuming this initial push fails the same way, I'll push a follow up commit to check the solution.

This MR, like many other active MR's, is branched from an old enough point in master that when ci_commit_formatting_run runs git fetch --depth=100 upstream master it doesn't actually grab enough commits from upstream to find the common ancestor between the MR branch and master.

It ends up checking only master... which includes some older commits that did not pass the check.

@andrewleech andrewleech force-pushed the ci_depth branch 2 times, most recently from dd8232f to 8f53143 Compare October 10, 2023 21:39
@andrewleech
Copy link
Contributor Author

Yep, this MR has failed the CI check in the same way: https://github.com/micropython/micropython/actions/runs/6475115234/job/17581470079?pr=12658
image

Note my current commit 8f53143 is not covered in that check at all, even though it should have failed.

@github-actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #12658 (ebde38f) into master (9f835df) will not change coverage.
The diff coverage is n/a.

❗ Current head ebde38f differs from pull request most recent head d2a9d70. Consider uploading reports for the commit d2a9d70 to get more accurate results

@@           Coverage Diff           @@
##           master   #12658   +/-   ##
=======================================
  Coverage   98.39%   98.39%           
=======================================
  Files         158      158           
  Lines       20940    20940           
=======================================
  Hits        20603    20603           
  Misses        337      337           

@andrewleech
Copy link
Contributor Author

New commit 94fd52d updates the ci script to automatically fetch all upstream if the common commit hasn't been found; this should preserve the speed of CI checks for most MR's, but use slow & reliable if needed for older ones.

It now passes that CI check (though it's the older version that only warned of missing sign-off)
image

@andrewleech
Copy link
Contributor Author

This MR has now been rebased to head to resolve merge conflicts.

This commit updates the ci script to automatically fetch all upstream if
the common commit hasn't been found; this should preserve the speed of CI
checks for most PR's, and use a reliable but slow fetch if needed for older
ones.

Signed-off-by: Andrew Leech <[email protected]>
@dpgeorge dpgeorge merged commit d2a9d70 into micropython:master Oct 11, 2023
@dpgeorge
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants