Skip to content

Updated product group parser to include tech leads and Security & compliance group.#33849

Merged
getvictor merged 1 commit into
mainfrom
victor/33848-sec-eng-metrics
Oct 6, 2025
Merged

Updated product group parser to include tech leads and Security & compliance group.#33849
getvictor merged 1 commit into
mainfrom
victor/33848-sec-eng-metrics

Conversation

@getvictor
Copy link
Copy Markdown
Member

@getvictor getvictor commented Oct 5, 2025

Related issue: Resolves #33848

Verified by running the GitHub Action:

***"timestamp":"2025-10-05T21:10:43.408Z","level":"info","message":"Parsing product groups from /home/runner/work/fleet/fleet/handbook/company/product-groups.md"***
***"timestamp":"2025-10-05T21:10:43.409Z","level":"info","message":"Found 1 tech lead(s) in mdm group: JordanMontgomery"***
***"timestamp":"2025-10-05T21:10:43.409Z","level":"info","message":"Found 3 developer(s) in mdm group: gillespi314, ghernandez345, MagnusHJensen"***
***"timestamp":"2025-10-05T21:10:43.409Z","level":"info","message":"Found 1 tech lead(s) in orchestration group: lucasmrod"***
***"timestamp":"2025-10-05T21:10:43.410Z","level":"info","message":"Found 4 developer(s) in orchestration group: sgress454, juan-fdz-hawa, iansltx, ksykulev"***
***"timestamp":"2025-10-05T21:10:43.410Z","level":"info","message":"Found 1 tech lead(s) in software group: cdcme"***
***"timestamp":"2025-10-05T21:10:43.410Z","level":"info","message":"Found 4 developer(s) in software group: rachelelysia, jahzielv, jkatz01, mna"***
***"timestamp":"2025-10-05T21:10:43.410Z","level":"info","message":"Found 1 tech lead(s) in security-compliance group: getvictor"***
***"timestamp":"2025-10-05T21:10:43.410Z","level":"info","message":"Found 3 developer(s) in security-compliance group: dantecatalfamo, jacobshandling, mostlikelee"***

Checklist for submitter

This is not a product change. Only an update to gathering engineering metrics.

Summary by CodeRabbit

  • New Features
    • Adds support for the Security & compliance group.
    • Extracts and reports Tech Lead memberships, including inclusion in overall engineering stats.
  • Bug Fixes
    • More reliable username parsing (handles hyphens, numbers, multi-line cells).
    • Stricter validation halts on missing sections or rows to prevent partial/inaccurate results, with clearer error messages.
  • Tests
    • Expanded coverage for new groups, tech leads, error paths, and edge-case username formats.
  • Chores
    • Updated dependencies for stability and maintenance.

@getvictor
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 5, 2025

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 5, 2025

Walkthrough

Dependency versions were bumped for the eng-metrics action. The markdown parser gained stricter validation, added tech lead extraction, introduced a “security-compliance” group, and centralized username parsing. Tests were expanded and updated to cover new groups, stricter errors, and username patterns.

Changes

Cohort / File(s) Summary
Dependency updates
.github/actions/eng-metrics/package.json
Bumped runtime deps (@google-cloud/bigquery, dotenv) and devDeps (@eslint/js, eslint, jest). No code changes.
Parser logic updates
.../eng-metrics/src/markdown-parser.js
Enforced errors on missing sections/rows; added Security & compliance group mapping; added tech lead extraction and dual-group assignment; introduced extractUsernamesFromCell; tightened developer extraction; expanded validation and error messages.
Test suite updates
.../eng-metrics/test/markdown-parser.test.js
Expanded coverage for new group, tech lead/developer parsing, error cases, multi-line cells, hyphen/number usernames; updated expectations and logger assertions.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Caller
  participant Parser
  participant Logger

  Caller->>Parser: parseProductGroups(markdown)
  Parser->>Parser: validate required sections (incl. security-compliance)
  alt missing section/row or empty usernames
    Parser->>Logger: error("Section/row missing or empty")
    Parser-->>Caller: throw Error
  else valid structure
    loop for each group section
      Parser->>Parser: extract Tech Lead via extractUsernamesFromCell
      Parser->>Logger: info("Tech lead(s) found")
      Parser->>Parser: extract Developers via extractUsernamesFromCell
      Parser->>Parser: assign usernames to group and engineering (TLs duplicated)
    end
    Parser-->>Caller: return parsed groups map
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–75 minutes

Suggested reviewers

  • mikermcneil
  • Sampfluger88
  • eashaw

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The pull request introduces tech lead extraction logic and stricter error handling that were not part of the linked issue’s objective to only add the security-compliance team, representing out-of-scope changes. Consider extracting the tech lead and enhanced error handling features into a separate pull request or updating the issue scope to document these additional changes.
Description Check ⚠️ Warning The pull request description includes the related issue and a brief verification log, but it does not follow the repository’s required template: it lacks the structured checklist items under “# Checklist for submitter,” omits the “## Testing” section (including confirmation of updated automated tests), and doesn’t address other template sections or indicate their removal. Because key template headings and checklist entries are missing or incomplete, the description does not meet the repository standards. Please update the PR description to fully align with the repository template by removing or completing each checklist item under “# Checklist for submitter,” adding the “## Testing” section with confirmation of updated automated tests, and including or removing other template sections (e.g., database migrations or Fleet Desktop compatibility) as appropriate.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately and concisely summarizes the primary change of updating the product group parser to include tech leads and the Security & compliance group, matching the main updates in the changeset.
Linked Issues Check ✅ Passed The changes correctly add the security-compliance group mapping and associated tests, directly fulfilling the requirement from issue #33848 to include the new Security & compliance team in engineering metrics.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch victor/33848-sec-eng-metrics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9604e64 and 9229e93.

⛔ Files ignored due to path filters (2)
  • .github/actions/eng-metrics/package-lock.json is excluded by !**/package-lock.json
  • .github/actions/eng-metrics/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • .github/actions/eng-metrics/package.json (1 hunks)
  • .github/actions/eng-metrics/src/markdown-parser.js (6 hunks)
  • .github/actions/eng-metrics/test/markdown-parser.test.js (9 hunks)

Comment thread .github/actions/eng-metrics/src/markdown-parser.js
@getvictor getvictor requested a review from sharon-fdm October 5, 2025 21:35
@getvictor getvictor marked this pull request as ready for review October 5, 2025 21:36
@getvictor getvictor merged commit 91c1531 into main Oct 6, 2025
9 checks passed
@getvictor getvictor deleted the victor/33848-sec-eng-metrics branch October 6, 2025 18:44
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.

Update engineering metrics collection for new security-compliance team

2 participants