Make Github actions/checkout CI tests merge into master HEAD, instead of into the master past#329
Make Github actions/checkout CI tests merge into master HEAD, instead of into the master past#329alfsb wants to merge 2 commits into
Conversation
|
After PR is fully opened, the steps:
- name: "Checkout"
uses: "actions/checkout@v7"
with:
path: "doc-base"Generates:
Again, so far so good. Now start the waiting game. The observed problem occurs after the PR creation time. We now need to wait for a few new commits to arrive into master, to see if |
|
Now there is some new commits on master HEAD, we can now analyse how the PR is affected. The master HEAD moved, and commit history is now: Before re-running all tests, the After re-running all tests, the In other words, master HEAD moved, but the merge target is still stuck in the master's past. The results of GH CI ignored any posterior change. Whatever the change But this PR is mergeable, that in turn begs the question. What happens with These are very good questions, and I will examine them soon. But first let's wait a few days, add a new commit on PR's branch, to examine what normal pushes causes on PRs automatic merges. |
|
A new day. Before changing anything, the merge step generated both before and after re-running all jobs. And after pushing a new commit, What? The merge point changed from In other words, when a PR is pushed, the merge point is recalculated. This explains some wtf moments that I experienced over the years. Things like, on a already on PR:
That is very confusing. I would even say. insane inducting. |
|
With these observations in place. I would like to proceed as following:
But the first question would be: do we want that? As noted above, this will be a very hard thing to test, as any push on PR "fixes" the semi-stuckness of actions/checkout. Testing this will be slow and noisy. And the only thing that we may gain is having better results of CI immediately after re-running CI jobs. So I like to hear comments about proceeding with the plan above. Silent approvals also count. Comments with ways to accomplish (3) and (4) are very welcome. I searched GH docs and found nothing that could change the behaviour of actions/checkout in this specific aspect. I also found nothing in GH docs about how to invalidate or erase previous CI results. for when a push is done on master. Something like this would make the proposed funcionaly way more robust. |
DO NOT MERGE
This is a test only branch/PR, with the objective of studying ways to make Github CIs to not ignore posterior changes on main/master.
The doc-base history before branching:
The branching was intentionally done in the past of master to test a secondary question: future history changes anything in GH actions/checkout?
Changed README.md, added, committed and then PR opened. This is the git history from the perspective of the branch:
So far, so good. No tests are shown in the
Open a pull requestpage, so we need to fully open the PR then examine the actions/checkout action in action (pun intended).