Skip to content

Simplify Integration Data Updater and auto-merge on green CI - #1899

Merged
David Pine (IEvangelist) merged 4 commits into
mainfrom
ievangelist-fix-integration-data-updater-656
Oct 16, 2026
Merged

David Pine (IEvangelist) merged 4 commits into
mainfrom
ievangelist-fix-integration-data-updater-656

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

The Integration Data Updater has failed on every run since a maintainer clicked Update branch on the rolling PR (#1737). That added a human-authored merge commit to chore/update-integration-data, and the workflow's non-bot-commit guard refused to replace the branch. Data generation itself succeeded.

Instead of loosening the guard, this PR removes the reason for it. The bot owns the rolling branch, and its PR merges itself once CI is green.

  • Adds .github/policies/auto-merge.yml, modeled on aspire-samples. When the Aspire bot labels a PR :octocat: auto-merge, the policy approves it and enables squash auto-merge, so it merges after the required ci-gate check passes. Removing the label disables auto-merge.
  • Simplifies update-integration-data.yml. There is no non-bot-commit guard, the git identity is set in the commit step, the cleanup for legacy timestamped PR branches is gone, and the push is a bare git push --force-with-lease that fails if the branch moved since checkout.
  • Updates the generated PR body, the tolerated-ATS console warning and the update-integrations skill to say the PR auto-merges and that removing the label holds it for review.

Differences from the aspire-samples policy

  • Sender restriction. Approval only happens when aspire-repo-bot[bot] adds the label. The main ruleset requires one approval, so without this check anyone with triage access could self-approve a PR by labeling it. Deleting the isActivitySender condition restores the aspire-samples behavior. If the match doesn't fire, the PR waits for a human approval, as it does today.
  • Label. :octocat: auto-merge, which the workflow already applies when it creates the PR.
  • No triggerOnOwnActions. The Aspire bot app adds the label here, not the policy service.

Things to know

Third-party links and affiliations

None.

Validation

  • actionlint .github\workflows\update-integration-data.yml: passed (exit 0).
  • [System.Management.Automation.Language.Parser]::ParseFile on src/frontend/scripts/update-integration-data.ps1: 0 errors.
  • Python yaml.safe_load on .github/policies/auto-merge.yml and the workflow: both load, and the policy has the two expected eventResponderTasks.
  • A Node script that applies the assertions in src/frontend/tests/unit/update-integrations.vitest.test.ts (integration update automation) to the workflow and script: all passed.
  • A local bare-repository simulation of the push step, run in Git for Windows 2.55.0: 6 of 6 scenarios passed. A new branch is created. The stuck branch with the human Merge branch 'main' commit is replaced by one fresh commit on top of main. A push after the branch moved is rejected as stale. A branch deleted during the run is not recreated. A branch created during the run is rejected. The next run recovers.
  • git diff --check: clean.
  • CI on the pushed commit: frontend-build / Frontend validation passed, including pnpm lint and pnpm test:unit, which runs update-integrations.vitest.test.ts. GitOps/YmlSchemaValidation ("Yaml validation of GitOps managed files") passed too.

Not verified: I didn't run the vitest suite or pnpm build locally, because src/frontend/node_modules isn't installed in this worktree and builds are left to CI. The workflow and the policy only run on schedule, workflow_dispatch and after merge to main, so neither was exercised end to end.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 21:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Ignoring all merge commits allows the updater to discard maintainer edits recorded during merge conflict resolution.

1 open finding
What changed in this PR

Unblocks the Integration Data Updater after a maintainer uses Update branch on its rolling PR.

Changes:

  • Excludes merge commits from the non-bot commit guard.
  • Documents the exemption while retaining the existing force-push lease.
File Description
.github/​workflows/​update-integration-data.yml Updates the branch guard to ignore merge commits.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1899. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1899 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@IEvangelist
David Pine (IEvangelist) enabled auto-merge (squash) October 16, 2026 12:09
else
git push origin "HEAD:refs/heads/$branch"
fi
git push --force origin "HEAD:refs/heads/$branch"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we drop --force-with-lease?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's back, as a bare git push --force-with-lease origin "HEAD:refs/heads/$branch". With no explicit value, git compares against the origin/chore/update-integration-data ref that actions/checkout (fetch-depth: 0) creates, and nothing in the job fetches it again. So the push is rejected if the branch moved or was deleted since checkout.

I checked that against a local bare repo: a new branch, the stuck branch with the human merge commit, a push after the branch moved, and a branch deleted or created mid-run. The PR description lists the results.

The non-bot-commit guard is gone in this version. The PR now merges itself on green CI through .github/policies/auto-merge.yml, so nothing is expected to commit to the branch.

Auto-replied by the GitHub Copilot app

Add .github/policies/auto-merge.yml. When the Aspire bot labels a PR
":octocat: auto-merge", the GitOps policy approves it and enables squash
auto-merge, so it merges once the required ci-gate check passes. Removing
the label disables auto-merge. The sender is limited to aspire-repo-bot[bot]
because the main ruleset requires one approval.

Simplify the workflow now that nobody commits to the bot branch:
- Push with a bare --force-with-lease instead of --force, so the push fails
  if the branch moved since checkout.
- Set the git identity in the commit step instead of a separate step.
- Remove the stray-PR cleanup for the legacy timestamped branches.

Update the PR body, console warning and update-integrations skill to say
the PR auto-merges and that removing the label holds it for review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 510be1dc-27eb-4efc-a731-1f0065f67252
@IEvangelist David Pine (IEvangelist) changed the title fix: Ignore merge commits in Integration Data Updater branch guard Simplify Integration Data Updater and auto-merge on green CI Oct 16, 2026
@IEvangelist
David Pine (IEvangelist) merged commit f97d483 into main Oct 16, 2026
21 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the ievangelist-fix-integration-data-updater-656 branch October 16, 2026 21:58
David Pine (IEvangelist) added a commit that referenced this pull request Nov 4, 2026
## Summary

Fixes #1960.

The Integration Data Updater has failed since #1895 because
`generate-package-json.ps1` reads optional `apiReference` metadata
directly under `Set-StrictMode -Version Latest`. The catalog omits the
property for 209 of 210 entries, so generation aborts before processing
packages.

- Check property existence before reading `apiReference`.
- Keep omitted and explicit `true` entries; exclude explicit `false`.
- Add an executable PowerShell regression test that evaluates the
production predicate against omitted/false/true fixtures and the real
catalog.
- Run that regression in the Tools Tests workflow.

Failure evidence: [first affected
run](https://github.com/microsoft/aspire.dev/actions/runs/38809447050),
[latest inspected
failure](https://github.com/microsoft/aspire.dev/actions/runs/40403823946/job/121856319285).
Related prior repairs: #1813 and #1899; stale rolling updater PR: #1737.

## Validation

- PowerShell regression test: passed; real catalog result was `209
included, 1 excluded`.
- `PackageJsonGenerator.Tests`: 41/41 passed.
- `AtsJsonGenerator.Tests`: 37/37 passed.
- `update-integrations.vitest.test.ts`: 50/50 passed.
- PowerShell parser for `update-integration-data.ps1`: 0 errors.
- `actionlint .github/workflows/tools-tests.yml`: passed.
- `git diff --check`: passed.

## Limitations

A complete updater `workflow_dispatch` was not run because `main` still
contains the failing predicate; running it before this fix lands would
reproduce the known failure and cannot validate the branch change. The
PR's Tools Tests exercise the exact production predicate, and the next
post-merge manual/scheduled updater run should provide end-to-end
confirmation.

**🤖 Posted by Repository agent (AI Agent)**

---------

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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