Repository navigation
Warn about the catalog only when the catalog changed - #570
Merged
Alejandro Lopez (soyalejolopez) merged 1 commit intoOct 29, 2026
Conversation
The Build catalog publish step rebuilt resource-stats.json on every push and warned that generated files were out of date, because the file is stamped with the render time and the weekly traffic pull request owns its content. It now reports a stats-only difference as a notice and warns only when catalog.json, sitemap.xml, feed.xml, or r/ changed. Adds a regression check and documents the behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Alejandro Lopez (soyalejolopez)
merged commit Oct 29, 2026
e51691d
into
microsoft:master
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category
What's in this pull request?
Stops the Build catalog workflow from warning "Generated files are out of date" on every push to
master.After #565, the
publishstep rebuilds the catalog and resource stats, tries a direct push, and, whenmasterrejects it, reports what is out of date. The rebuild always changesresource-stats.json, because that file is stamped with the time it was rendered (generatedAt), and its content is published through the weekly traffic pull request. So every run since #565 has warned, including the last three onmaster. The warning also made the new Friday housekeeping email report a rebuild as due every week.I reproduced it on current
master: a CI-equivalent rebuild changes onlyresource-stats.json(generatedAtand one resource that gained stats since the last weekly pull request).catalog.json,sitemap.xml,feed.xml, andr/come out identical.What changed
build-catalog.yml: when the direct push is rejected, the step warns only ifcatalog.json,sitemap.xml,feed.xml, orr/changed. A stats-only difference is a notice ("Only resource stats changed. They are published by the weekly traffic pull request") and the step ends without writing the alarming summary. The step still tries the direct push first, so nothing changes if the policy is ever relaxed.test-traffic-workflow.js: a check that the stats-only notice comes before the warning and that the step is classified by catalog files.tools/catalog-build/README.mdandCHANGELOG.md: describe the rule.How it was tested
I ran the extracted step in a throwaway repository against remotes that reject and accept pushes:
resource-stats.jsonchanged, push rejected: notice only, no summary, exit 0.npm run checkpasses.Related issues
Follows #565. Part of the revamp tracked in #482.
Checklist
npm ci --prefix tools/catalog-build && npm run check --prefix tools/catalog-build(passes)versionandupdatedwere bumped (not applicable: no resource changed)See CONTRIBUTING.md for details.