ci: fix metrics scope mismatch, report payload limits, and header formatting - #2262
Open
bhuvan-somisetty wants to merge 1 commit into
Open
ci: fix metrics scope mismatch, report payload limits, and header formatting#2262bhuvan-somisetty wants to merge 1 commit into
bhuvan-somisetty wants to merge 1 commit into
Conversation
…matting Fix four related defects in .github/workflows/issue-pr-contrib-metrics.yaml: 1. Exclude temporary upstream/vendor forks and archived repositories from issue and PR metric queries by appending -is:fork -is:archived to SEARCH_QUERY filters. 2. Add size validation and truncation in Assemble full report to enforce a 60,000-character payload bound on summary_report.md and comment_report.md, preventing HTTP 422 API errors on high-activity months. 3. Fix self-referential header text in comment_report.md. 4. Calculate start_date and end_date using deterministic first-of-month and end-of-month date arithmetic. Fixes flatcar#2261 Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
Author
|
Hi @John15321 @t-lo @dongsupark @tormath1 @chewi, Could you please take a look at this PR when you get a chance? It resolves issue #2261 by fixing the CI metrics workflow scope queries, adding payload size bounds to prevent API errors on active months, fixing the comment report header, and hardening month date calculations. Thanks! |
Contributor
|
@bhuvan-somisetty do not tag multiple maintainers for reviews. If you persist we will have to evaluate your access. Thank you. Look at the linux foundation standards of excellence and abide by them. |
Author
|
My bad, will not repeat again |
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.
Why
Fixes #2261.
The monthly community metrics workflow (
.github/workflows/issue-pr-contrib-metrics.yaml) suffered from four related systemic issues:org:flatcarqueries, resulting in temporary vendor/upstream forks (flatcar/systemd,flatcar/gentoo, etc.) polluting stats and violating the repository exclusion policy enforced in step 1 (contributors@v1).peter-evans/create-issue-from-file@v5andcreate-or-update-comment@v4to fail withHTTP 422 Unprocessable Entity (body is too long).(See comment below for Pull Request Metrics)insidecomment_report.mdcaused the PR comment to self-referentially instruct readers to look below for PR metrics.date -d "last month"anddate -d "yesterday"month-arithmetic caused non-contiguous or invalid query intervals when executed near month boundaries.What changed
-is:fork -is:archivedto allissue-metricssearch queries (All open Issues,New issues created,Issues closed,All open PRs,New PRs created,PRs closed) to exclude temporary forks and mirrors.Assemble full reportto capsummary_report.mdandcomment_report.mdunder 60,000 characters, preventing API HTTP 422 failures.comment_report.mdwith proper section introduction.date -d "$(date +%Y-%m-01) -1 month"anddate -d "$(date +%Y-%m-01) -1 day").Notes
.github/workflows/issue-pr-contrib-metrics.yaml.Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>.Signed-off-by: bhuvan-somisetty somisettybhuvan5@gmail.com