Skip to content

Fix: support subproject repos in info-yaml validation#559

Merged
tykeal merged 1 commit intolfit:mainfrom
askb:fix/info-yaml-subproject-validation
Mar 19, 2026
Merged

Fix: support subproject repos in info-yaml validation#559
tykeal merged 1 commit intolfit:mainfrom
askb:fix/info-yaml-subproject-validation

Conversation

@askb
Copy link
Contributor

@askb askb commented Mar 19, 2026

Problem

The info-yaml-verify workflow fails for repositories with subproject structure where the Gerrit project name includes a subpath (e.g. integration/distribution, releng/builder, releng/autorelease).

The INFO.yaml in these repos lists the parent project name (e.g. integration), but GERRIT_PROJECT passes the full path (e.g. integration/distribution). The strict equality check fails:

PROJECT_INPUT=integration/distribution
REPO_LIST=integration

ERROR: integration is invalid
INFO.yaml file may only list one repository
Repository must match integration/distribution

Fix

Add a prefix match alongside the exact match so that integration validates against integration/distribution:

if [[ "$project" == "$PROJECT_INPUT" || "$PROJECT_INPUT" == "$project/"* ]]; then

This handles:

  • Standard repos: netconf == netconf ✅ (exact match)
  • Subproject repos: integration prefix of integration/distribution ✅ (prefix match)

Affected Repositories

Testing

The fix was verified against the failing CI runs for integration/distribution.

Signed-off-by: Anil Belur [email protected]

@github-actions github-actions bot added the bug Something isn't working label Mar 19, 2026
@askb askb requested review from Copilot, jwagantall and tykeal March 19, 2026 10:58
Copy link

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

Updates the reusable GitHub Actions workflow that validates INFO.yaml for Gerrit-triggered changes, adding support for Gerrit project names that include subpaths (subproject repos) while INFO.yaml lists only the parent project.

Changes:

  • Extend repository validation to accept either an exact match or a parent-prefix match (e.g., integration validating integration/distribution).
  • Improve inline documentation around the repository validation logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

The repository comparison in info-yaml-verify fails for repos with
subproject structure (e.g. integration/distribution, releng/builder,
releng/autorelease) where INFO.yaml lists the parent project name
(e.g. 'integration') but GERRIT_PROJECT is the full path
(e.g. 'integration/distribution').

Add a prefix match so that 'integration' matches
'integration/distribution' while still requiring exact match for
standard repos.

Issue: IT-29437
Change-Id: I2592ee937f341ec989768350fcb8bd12ead8e83e
Signed-off-by: Anil Belur <[email protected]>
@askb askb force-pushed the fix/info-yaml-subproject-validation branch from 9cb9f5e to c16cf9b Compare March 19, 2026 11:16
@askb askb changed the title fix: support subproject repos in info-yaml validation Fix: support subproject repos in info-yaml validation Mar 19, 2026
@tykeal tykeal merged commit 20d87b2 into lfit:main Mar 19, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants