Skip to content

refactor: Adopt the common.SetupHandler for more handlers#231

Merged
chet merged 2 commits intoNVIDIA:mainfrom
chet:adopt_setup_handler
Mar 11, 2026
Merged

refactor: Adopt the common.SetupHandler for more handlers#231
chet merged 2 commits intoNVIDIA:mainfrom
chet:adopt_setup_handler

Conversation

@chet
Copy link
Contributor

@chet chet commented Mar 11, 2026

Description

As part of putting up #220, I started digging around to see if there was anything else I could contribute instead of just doing a drive by. I noticed there's this common.SetupHandler that exists, and that it looks like the idea is to adopt it everywhere, so this does that. It shaves down a bunch of code, and ensures handler setup is standardized. The nice thing was, everything already was standardized (just the same lines of setup for each one), so it was an easy migration into this handler.

I did read the docstring for SetupHandler, and made sure the criteria are met for the handlers I'm updating.

There MAY be a reason nothing was using this yet, but figured I'd toss this up! If it's not the right direction for things, totally feel free to throw it back at me.

Signed-off-by: Chet Nichols III chetn@nvidia.com

Type of Change

  • Feature - New feature or functionality (feat:)
  • Fix - Bug fixes (fix:)
  • Chore - Modification or removal of existing functionality (chore:)
  • Refactor - Refactoring of existing functionality (refactor:)
  • Docs - Changes in documentation or OpenAPI schema (docs:)
  • CI - Changes in Github workflows. Requires additional scrutiny (ci:)
  • Version - Issuing a new release version (version:)

Services Affected

  • API - API models or endpoints updated
  • Workflow - Workflow service updated
  • DB - DB DAOs or migrations updated
  • Site Manager - Site Manager updated
  • Cert Manager - Cert Manager updated
  • Site Agent - Site Agent updated
  • RLA - RLA service updated
  • Powershelf Manager - Powershelf Manager updated

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@github-actions
Copy link

🔐 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-03-11 03:30:21 UTC | Commit: 583a701

@github-actions
Copy link

🛡️ Vulnerability Scan

🚨 Found 64 vulnerability(ies)
📊 vs main: 64 (no change)

Severity Breakdown:

  • 🔴 Critical/High: 64
  • 🟡 Medium: 0
  • 🔵 Low/Info: 0

🔗 View full details in Security tab

🕐 Last updated: 2026-03-11 03:30:26 UTC | Commit: 583a701

@chet chet changed the title refactor: Adopt the common.SetupHandler for all handlers refactor: Adopt the common.SetupHandler for more handlers Mar 11, 2026
@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 11, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

chet and others added 2 commits March 11, 2026 14:34
Sorry, as part of putting up NVIDIA#220, I started digging around to see if there was anything else I could contribute instead of just doing a drive by. I noticed there's this `common.SetupHandler` that exists, and that it *looks* like the idea is to adopt it everywhere, so this does that. It shaves down a bunch of code, and ensures handler setup is standardized. The nice thing was, everything already *was* standardized (just the same lines of setup for each one), so it was an easy migration into this handler.

There MAY be a reason nothing was using this yet, but figured I'd toss this up! If it's not the right direction for things, totally feel free to throw it back at me.

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@thossain-nv thossain-nv force-pushed the adopt_setup_handler branch from d587dfe to 9abd66a Compare March 11, 2026 21:34
@thossain-nv
Copy link
Contributor

/ok to test 9abd66a

Copy link
Contributor

@thossain-nv thossain-nv left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @chet Fixed one issue that I found.

@chet chet merged commit 58e03a0 into NVIDIA:main Mar 11, 2026
49 checks passed
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