Skip to content

ci: Add CI jobs to detect proto/OpenAPI breaking changes#2229

Open
thossain-nv wants to merge 3 commits into
NVIDIA:mainfrom
thossain-nv:chore/api-breaking-changes
Open

ci: Add CI jobs to detect proto/OpenAPI breaking changes#2229
thossain-nv wants to merge 3 commits into
NVIDIA:mainfrom
thossain-nv:chore/api-breaking-changes

Conversation

@thossain-nv
Copy link
Copy Markdown
Contributor

Description

  • Currently there are no CI process that raises awareness for proto or OpenAPI breaking changes
  • We want to automate the checks so the burden on the submitter and reviewer is lessened
  • This PR adds two CI jobs, one to check for breaking changes in proto files and one to check for breaking changes in OpenAPI schema that the REST API follows

We want to initially run these jobs for informational purposes, and later decide which of them should block PR merging.

Note

The actions being used may not be NVIDIA approved. If we can't get them approved, I've added alternative commands

Type of Change

  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

None

Breaking Changes

  • This PR contains breaking changes

Testing

  • No testing required (docs, internal refactor, etc.)

Additional Notes

None

@thossain-nv thossain-nv requested review from a team as code owners June 5, 2026 00:57
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d88d52ee-27d1-4de1-855c-5808496d6348

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-06-05 01:00:49 UTC | Commit: 79ed891

uses: oasdiff/oasdiff-action/breaking@v0.0.51
with:
# Compare the exact base and head commits from this PR.
base: '${{ github.event.pull_request.base.sha }}:rest-api/openapi/spec.yaml'
Copy link
Copy Markdown
Contributor

@lachen-nv lachen-nv Jun 5, 2026

Choose a reason for hiding this comment

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

Our pipeline use copy-pr-bot when we create a pull request. The bot create a push event on pull-request, so github.event.pull_request.base.sha is not populated. we can change to push-safe ref, e.g. origin/main:rest-api/openapi/spec.yaml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Larry, updated.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
nico-flow 116 13 50 41 4 8
nico-nsm 133 11 45 66 11 0
nico-psm 118 13 52 41 4 8
nico-rest-api 182 16 84 67 7 8
nico-rest-cert-manager 95 5 47 32 3 8
nico-rest-db 116 13 50 41 4 8
nico-rest-site-agent 115 13 50 41 3 8
nico-rest-site-manager 102 6 48 37 3 8
nico-rest-workflow 118 13 52 41 4 8
TOTAL 1095 103 478 407 43 64

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

Comment thread .github/workflows/ci.yaml Outdated
- name: Check for Breaking Changes
# If this action is not approved, the following command can be used instead:
# buf breaking crates/rpc/proto --against 'https://github.com/NVIDIA/infra-controller.git#branch=main,subdir=crates/rpc/proto'
uses: bufbuild/buf-breaking-action@v1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The third-party GitHub Actions should pin to immutable commit SHAs instead of mutable tags like @v1 or @v0.0.51. This keeps CI reproducible and reduces supply-chain drift.
It looks like the action isn’t on the allow list yet. I can help file a request to get it approved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bug breaking supports github-actions error format, I think we can skip the action.

- name: Check OpenAPI breaking changes
# If this action is not approved, the following command can be used instead:
# oasdiff breaking <(git show origin/main:rest-api/openapi/spec.yaml) rest-api/openapi/spec.yaml --fail-on ERR
uses: oasdiff/oasdiff-action/breaking@v0.0.51
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here: it would be better pin this action by commit SHA instead of a mutable tag.
Just checked this action is already on our allow list.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is v0.0.51 a mutable tag though?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ah i see the guidance from github here now says to use sha for 3rd party tags: https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions. We should mark in a comment above the version to know what the sha pins to.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Pinned to specific commit.

Copy link
Copy Markdown
Collaborator

@nv-dmendoza nv-dmendoza left a comment

Choose a reason for hiding this comment

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

LGTM other than needing to adjust 3rd party actions to use sha ref over tag ref. See https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions

@thossain-nv thossain-nv force-pushed the chore/api-breaking-changes branch 2 times, most recently from 69044a1 to 6d2641d Compare June 5, 2026 21:06
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Signed-off-by: Tareque Hossain <thossain@nvidia.com>
Signed-off-by: Tareque Hossain <thossain@nvidia.com>
Signed-off-by: Tareque Hossain <thossain@nvidia.com>
@thossain-nv thossain-nv force-pushed the chore/api-breaking-changes branch from 6d2641d to 3a43dd0 Compare June 5, 2026 21:41
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.

3 participants