Skip to content

[skip_expiry/reporting]: Add Project V2 reporting with enriched skip metadata upsert#24358

Open
opcoder0 wants to merge 11 commits intosonic-net:masterfrom
opcoder0:feat/skip-test-wf-reporting
Open

[skip_expiry/reporting]: Add Project V2 reporting with enriched skip metadata upsert#24358
opcoder0 wants to merge 11 commits intosonic-net:masterfrom
opcoder0:feat/skip-test-wf-reporting

Conversation

@opcoder0
Copy link
Copy Markdown
Contributor

@opcoder0 opcoder0 commented May 1, 2026

Description of PR

Extend skip-issue-expiry workflow reporting to upsert test-level rows into GitHub Projects V2 with richer metadata, derived timing buckets, ownership context, activity signals, and reporting flags while preserving existing skip-expiry behavior.

Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

Skip-expiry issue labeling works, but reporting needed better visibility for cleanup and triage. This change adds Project V2 reporting with stable upsert semantics and richer context per test mark row.

How did you do it?

Added parsing, aggregation, and Project V2 upsert extensions to produce one row per conditional-mark entry and update fields idempotently using test_id key matching.

New/updated report fields and short descriptions:

  • test_id: full test path identifier used as logical unique key.
  • title: human-readable test label (derived from test_id).
  • expiry_date: computed expiry date when available.
  • current_status: workflow status such as expired, not expired, skip_closed, no_issue_linked, unknown.
  • issue_number: referenced GitHub issue number.
  • issue_url: referenced issue URL.
  • issue_repository: issue owner/repo.
  • issue_state: open or closed state from GitHub issue.
  • issue_created_at: issue creation timestamp.
  • issue_closed_at: issue close timestamp.
  • age_days: age of issue in days.
  • days_to_expiry: remaining days to expiry.
  • expiry_bucket: reporting bucket (expired, 0-1d, 1-7d, 7-15d, 15-30d, >30, unknown).
  • maintainer: mapped maintainer from config/category fallback.
  • issue_assignees: assignee list from issue API.
  • issue_author: issue creator login.
  • condition_file: source conditional-mark YAML file path.
  • test_category: category derived from test path prefix.
  • is_permanent_skip: true when skip has no linked issue.
  • last_updated_at: issue updated timestamp.
  • last_comment_at: latest comment timestamp.
  • days_since_last_activity: days since latest activity.
  • is_cross_repo: true if issue repo differs from source repo.
  • source_repo: repository configured as source for workflow run.
  • needs_cleanup: closed issue still referenced by conditional marks.
  • needs_attention: open issue and expired.
  • approaching_expiry: days_to_expiry within warning threshold.
  • no_issue_linked: entry has no linked issue.

Additional behavior:

  • Cross-repo issues are included in reporting rows.
  • Existing mutation behavior for same-repo issue expiry flow remains intact.
  • No-op mode remains intact.
  • Empty date handling for Project V2 Date fields is safe (clears field instead of sending invalid empty date).

How did you verify/test it?

On private repo and project.

Any platform specific information?

NA

Supported testbed topology if it's a new test case?

NA

Documentation

Updated reporting behavior and field set are captured in implementation changes and PR description.

opcoder0 added 11 commits April 27, 2026 06:44
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@opcoder0 opcoder0 requested a review from StormLiangMS May 1, 2026 04:19
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.

2 participants