Skip to content

Conversation

ChrisJBurns
Copy link
Collaborator

Alot of spaghetti code, this PR will be open for a while.... @ChrisJBurns currently working on this

@ChrisJBurns
Copy link
Collaborator Author

This is a larger PR, i will split it out but keep this open for reference

@ChrisJBurns
Copy link
Collaborator Author

@claude fix the merge conflicts

Copy link
Contributor

claude bot commented Oct 15, 2025

Claude finished @ChrisJBurns's task —— View job


Merge Conflicts Resolved ✓

I've successfully resolved the merge conflicts between this branch and main.

Conflict Analysis

The conflict was in cmd/thv-operator/controllers/mcpserver_runconfig.go:

  • Main branch (commit 61d04b4): Refactored OIDC configuration handling into a new cmd/thv-operator/pkg/oidc package with a clean Resolver pattern
  • This PR: Had expanded the inline OIDC logic with detailed switch statements (conflicting approach)

Resolution Strategy

Adopted main's cleaner refactored version with the oidc.Resolver pattern, which:

  • Follows better separation of concerns
  • Reduces code complexity (~150 lines → ~30 lines)
  • Is more maintainable and testable
  • Aligns with the PR's goal of removing "spaghetti code"

Changes Made

  1. Added cmd/thv-operator/pkg/oidc/resolver.go - OIDC configuration resolver with support for:

    • Kubernetes service account authentication
    • ConfigMap-based configuration
    • Inline configuration
    • Proper defaults and error handling
  2. Added cmd/thv-operator/pkg/oidc/resolver_test.go - Comprehensive test coverage for all resolver scenarios

  3. Updated cmd/thv-operator/controllers/mcpserver_runconfig.go:

    • Added import for the new oidc package
    • Replaced expanded inline logic with resolver pattern
    • Updated function signature to return errors
    • Maintained this PR's telemetry namespace parameter addition
  4. Committed and pushed the resolution with proper co-authorship

Verification

  • ✓ All OIDC package tests pass
  • ✓ Code compiles successfully
  • ✓ Changes pushed to removes-flag-driven-config branch

The resolution maintains this PR's goal of removing flag-driven config while incorporating main's improved OIDC architecture.


Commit: f2ec7e0
Job Run | Branch: removes-flag-driven-config

github-actions bot and others added 6 commits October 15, 2025 10:17
Resolves conflicts between the flag-driven config removal and main's
OIDC refactoring (commit 61d04b4).

Changes:
- Adopt main's oidc.Resolver pattern for cleaner OIDC config handling
- Add cmd/thv-operator/pkg/oidc package with resolver implementation
- Update addOIDCConfigOptions to use the resolver
- Maintain this PR's telemetry namespace parameter addition

The resolution keeps this PR's goal of removing flag-driven config
while incorporating main's improved OIDC architecture.

Co-authored-by: Chris Burns <[email protected]>
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.

1 participant