You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "casaroli (via GitHub)" <gi...@apache.org> on 2026/10/19 09:39:43 UTC

[PR] .github/workflows: Skip depends-on PRs that are already merged. [nuttx]

casaroli opened a new pull request, #20806:
URL: https://github.com/apache/nuttx/pull/20806

   ## Summary
   
   When a `Depends-On:` PR is merged, its commits are already in master. Build and the memory report still cherry-pick the PR head again. The cherry-pick is empty or conflicts, and `Fetch-Source` fails with `cherry_pick_conflict`. Today the author must remove the line and start CI again each time a dependency merges.
   
   This PR reads the state of each dependency with the GitHub API (`GET /repos/{owner}/{repo}/pulls/{n}`):
   
   - merged, and its `merge_commit_sha` is an ancestor of the checkout: CI skips it and says so in the log;
   - closed without merge: CI does not apply it and fails with `::error::Dependency <dep> is closed without merge; remove it from depends-on or reopen it.`;
   - open: CI applies it as today;
   - merged into a different branch, or merged after the checkout was made (for example a re-run of an old run): the ancestor check fails, so CI applies it as today;
   - if the API call fails, CI writes a warning and applies the dependency as today.
   
   The report stays truthful. `applied.tsv` gets a fourth column `merged` for a skipped dependency, and `result.json` gets `"merged": true`. For a closed dependency, the failure report gets the error code `dependency_closed` and `"closed": true` on that dependency. The comment shows "(already merged, skipped)", or for the failure "❌ **closed without merge**" on the dependency and the reason "a dependency PR is closed without merge; remove it from depends-on or reopen it". The memory report writes the same notes and error in its log and step summary. The old comment workflow ignores the new fields, so the report format stays compatible. The last commit updates `Documentation/testing/nuttx-ci.rst`.
   
   nuttx-apps carries a copy of `build.yml` and `depends-on-comment.yml`; the same change goes there in its own PR.
   
   ## Impact
   
   CI only. Behaviour change: a `Depends-On:` PR that is closed without merge now fails `Fetch-Source` (and the memory report). On master, CI applied such a PR silently and the build continued. A PR body can now keep a `Depends-On:` line after the dependency merges. One extra API call for each declared dependency, with the workflow `GITHUB_TOKEN` (the Apply step now gets `GH_TOKEN`). Nothing changes for PRs without `Depends-On:`, or for open dependencies.
   
   ## Testing
   
   I ran the "Apply depends-on PRs" step scripts, extracted from the YAML files, on my machine against real PRs, with the old (master) and the new workflows. The sources were clones of nuttx and nuttx-apps master. #20802 is merged, #20783 is closed without merge, #20777 and nuttx-apps#3878 are open.
   
   | Case | master | this PR |
   |---|---|---|
   | build.yml, #20802 only | fails, `cherry_pick_conflict` | skips #20802, exit 0 |
   | build.yml, `[#20802 nuttx-apps#3878]` | fails, `cherry_pick_conflict` | skips #20802, applies 3878, exit 0 |
   | membrowse-report.yml, same | fails, "Could not cherry-pick" | skips #20802, applies 3878, exit 0 |
   | build.yml, checkout is the parent of the #20802 merge commit | applies both | applies both (same as master) |
   | build.yml, API call fails | (no API call) | warning, applies #20802, fails as on master |
   | build.yml, open #20777 only | applies it | applies it (same) |
   | build.yml and membrowse-report.yml, #20783 only | applies it, exit 0 | fails: "closed without merge; remove it from depends-on or reopen it", nothing applied |
   | build.yml and membrowse-report.yml, `[#20802 #20783 nuttx-apps#3878]` | fails, `cherry_pick_conflict` | skips #20802, fails on #20783 with the same error |
   
   I also ran the github-script of `depends-on-comment.yml` with node and a fake API, for the new `result.json` files. For a success it marks #20802 "(already merged, skipped)". For the #20783 failure it marks #20783 "❌ **closed without merge**" and shows the reason above. The old comment workflow renders the same reports without the notes and without a reason line. `python3 -m unittest test_depends_on` passes (40 tests), `yamllint` and `shellcheck` give no new findings, and `tools/checkpatch.sh -c -u -m -g` passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] .github/workflows: Skip depends-on PRs that are already merged. [nuttx]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20806:
URL: https://github.com/apache/nuttx/pull/20806#issuecomment-6278772839

   <!-- nuttx-depends-on-bot run-39232452760 -->
   ### 🔗 Cross-repo PR dependencies
   
   The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):
   
   - https://github.com/apache/nuttx/pull/20802 @ 01f333f250
   - https://github.com/apache/nuttx-apps/pull/3868 @ 8c2e367e65
   
   CI run: https://github.com/apache/nuttx/actions/runs/39232452760


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] .github/workflows: Skip depends-on PRs that are already merged. [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #20806:
URL: https://github.com/apache/nuttx/pull/20806


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] .github/workflows: Skip depends-on PRs that are already merged. [nuttx]

Posted by "casaroli (via GitHub)" <gi...@apache.org>.
casaroli closed pull request #20806: .github/workflows: Skip depends-on PRs that are already merged.
URL: https://github.com/apache/nuttx/pull/20806


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] .github/workflows: Skip depends-on PRs that are already merged. [nuttx]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20806:
URL: https://github.com/apache/nuttx/pull/20806#issuecomment-6271692995

   <!-- membrowse-pr-comment -->
   ## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report &middot; [Explore what changed →](https://membrowse.com/public/apache/nuttx?commit_sha=776c6632fac6899b62016a317ead38c314ff1c4a)
   
   ### [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **flash**: .data +16 B (+0.0%, 65,016 B / 262,144 B, total: 25% used)
     - **sram**: .data +16 B (+0.6%, 2,734 B / 8,192 B, total: 33% used)
   ### [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **ROM**: .dram0.data +16 B, .flash.rodata +12 B (+0.0%, 126,860 B / 4,194,272 B, total: 3% used)
     - **dram0_0_seg**: .dram0.data +16 B (+0.2%, 10,028 B / 180,736 B, total: 6% used)
     - **drom0_0_seg**: .flash.rodata +12 B (+0.1%, 13,660 B / 4,194,272 B, total: 0% used)
   ### [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **flash**: .data +8 B, .text +12 B (+0.0%, 84,612 B / 4,194,304 B, total: 2% used)
     - **sram**: .bss -16 B, .data +8 B (-0.2%, 3,956 B / 16,384 B, total: 24% used)
   ### [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **kseg0_progmem**: .data +4 B, .text +12 B (+0.0%, 67,204 B / 131,072 B, total: 51% used)
     - **kseg1_datamem**: .data +4 B (+0.2%, 2,588 B / 32,256 B, total: 8% used)
   ### [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **Code**: .rodata +16 B (+0.0%, 350,680 B)
     - **Data**: .data.g_version +2 B (+0.0%, 77,689 B)
   ### [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **Data**: .rodata +32 B (+0.0%, 124,953 B)
   ### [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **RAM**: .data +4 B (+0.1%, 6,590 B / 262,144 B, total: 3% used)
     - **ROM**: .rodata +16 B (+0.0%, 88,348 B / 2,097,152 B, total: 4% used)
   ### [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **Code**: .text +16 B (+0.0%, 377,184 B)
   ### [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=776c6632fac6899b62016a317ead38c314ff1c4a&base=7fe245e7bfef8ad4a47de56256ecc45c8454a915)
     - **flash**: .text +16 B (+0.0%, 34,488 B / 131,072 B, total: 26% used)
   
   ---
   <sub>Catch memory regressions in CI with [MemBrowse](https://membrowse.com). Free for open source.</sub>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org