Skip to content

Conversation

cblecker
Copy link
Member

@cblecker cblecker commented Sep 9, 2025

Summary

  • Replace shell-based bio validation with comprehensive Go utility
  • Standardize election candidate file formats to use proper YAML headers
  • Add enhanced validation for template compliance and filename consistency

Changes

  • New Go utility (hack/verify-steering-election-tool.go) with YAML parsing, filename validation, and template compliance checking
  • Updated shell script (hack/verify-steering-election.sh) to invoke Go utility
  • Standardized YAML headers in 2025-GB candidate files and nomination template
  • Updated dependencies (yaml.v3, golang.org/x mod, k8s.io/enhancements) while maintaining Go 1.22.4 compatibility

Features

  • Proper YAML validation using gopkg.in/yaml.v3 instead of regex patterns
  • Filename format validation (candidate-username.md matches GitHub ID in header)
  • Template section validation (SIGS, What I have done, What I'll do, Resources About Me)
  • Unified validation for both regular steering and GB elections
  • Applied only to 2025+ elections (preserves historical files)

Test Plan

  • All existing verification tests pass (make verify)
  • YAML header parsing validates correctly
  • Filename/GitHub ID matching works
  • Template compliance checking functions
  • Performance remains excellent (sub-second execution)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 9, 2025
@k8s-ci-robot k8s-ci-robot added area/elections Issues or PRs related to community elections committee/steering Denotes an issue or PR intended to be handled by the steering committee. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 9, 2025
@cblecker cblecker requested a review from Copilot September 9, 2025 01:36
Copilot

This comment was marked as outdated.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 9, 2025
@cblecker cblecker requested a review from Copilot September 9, 2025 02:38
Copilot

This comment was marked as outdated.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a comprehensive Go-based validation utility for steering committee election candidate bios while standardizing the file formats and headers to use proper YAML structure.

  • Replaces shell-based validation with a comprehensive Go utility that supports YAML parsing, filename validation, and template compliance checking
  • Standardizes YAML headers in 2025-GB candidate files and nomination template to use proper YAML structure
  • Updates dependencies to maintain Go 1.22.4 compatibility while adding yaml.v3 support

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sigs.yaml Restructured YAML format to use proper list syntax
hack/verify-steering-election.sh Replaced shell logic with Go utility invocation
hack/verify-steering-election-tool.go New comprehensive validation utility with YAML parsing and template checking
go.mod Updated dependencies for yaml.v3 and newer package versions
elections/steering/2025/nomination-template.md Fixed YAML header structure for proper parsing
elections/steering/2025-GB/*.md Added missing YAML info fields to candidate files

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cblecker
Once this PR has been reviewed and has the lgtm label, please assign soltysh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 9, 2025
@cblecker
Copy link
Member Author

cblecker commented Sep 9, 2025

/hold
for review

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 9, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 10, 2025
@cblecker
Copy link
Member Author

/test all

cblecker and others added 7 commits September 12, 2025 10:13
- Update 2025-GB candidate files to include full YAML header structure
- Fix YAML info section to use map format instead of list format
- Update 2025 nomination template to match new YAML structure
- Ensure consistency across all election file formats

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Create new Go utility with enhanced validation capabilities
- Validate YAML header format using gopkg.in/yaml.v3 library
- Check filename format matches GitHub ID in header
- Verify required template sections are present
- Support both regular steering and GB election formats
- Apply validation only to elections from 2025 forward
- Update shell script to invoke Go utility

Features:
- Proper YAML parsing instead of regex validation
- Unified validation logic for all election types
- Better error messages for malformed headers
- Type-safe validation of candidate bio structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Replace hard-coded year range ending at 2030 with a dynamic approach
that calculates the end year as current year + 5. This eliminates the
need for manual updates and ensures the tool continues working without
maintenance as time progresses.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Update regex to match exactly 61 dashes instead of 3+ for better consistency
and error detection. This matches the actual format used in all candidate
files and will help catch formatting errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add startYear constant set to 2026 for easier configuration
- Update findBioFiles to use startYear constant instead of hardcoded 2025
- Update comments to reference the constant instead of specific years

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add tests for extractYAMLHeader function with various dash counts and formats
- Add tests for countWords function with different content types
- Add tests for validateFileNameAndGitHubID with valid/invalid formats
- Add tests for validateTemplateCompliance with required fields and sections
- Add tests for findBioFiles function with year filtering logic
- All tests cover both success and error cases for robust validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 12, 2025
@cblecker cblecker requested a review from Copilot September 12, 2025 17:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@reylejano
Copy link
Member

/lgtm
/assign @sreeram-venkitesh @npolshakova @arujjval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/elections Issues or PRs related to community elections cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. committee/steering Denotes an issue or PR intended to be handled by the steering committee. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants