Skip to content

feat(scoreboard): add --profile flag for AWS profile selection#275

Open
mkultraWasHere wants to merge 2 commits into
mainfrom
feat/scoreboard-profile
Open

feat(scoreboard): add --profile flag for AWS profile selection#275
mkultraWasHere wants to merge 2 commits into
mainfrom
feat/scoreboard-profile

Conversation

@mkultraWasHere

Copy link
Copy Markdown
Contributor

Summary

  • Adds --profile flag to dreadgoad scoreboard run for specifying an AWS named profile when using SSM or ares transports
  • Threads the profile through NewSSMTransport, NewAresTransport, and the shared awsclient.NewClient
  • awsclient.NewClient now accepts an optional profile parameter and uses awsconfig.WithSharedConfigProfile when non-empty
  • Cache key includes profile so different profiles don't collide

Test plan

  • dreadgoad scoreboard run --transport ssm --instance-id <id> --profile <profile> connects using the specified profile
  • dreadgoad scoreboard run --transport ssm --instance-id <id> (no profile) still uses default credential chain
  • dreadgoad scoreboard run --transport ares --instance-id <id> --profile <profile> works with ares transport
  • Existing lab reset and provider commands unaffected (pass empty profile)

🤖 Generated with Claude Code

Allows specifying an AWS named profile for SSM and ares transports
instead of relying solely on AWS_PROFILE or the default credential chain.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds AWS named profile selection support to the scoreboard run command so users can target different AWS credential sets when using the SSM- and ares-based transports. This threads a new optional profile parameter through the scoreboard transports into the shared AWS client factory, and updates client caching to avoid cross-profile collisions.

Changes:

  • Add --profile flag to dreadgoad scoreboard run and pass it into the selected transport.
  • Extend scoreboard.NewSSMTransport / scoreboard.NewAresTransport and awsclient.NewClient to accept an optional profile.
  • Include profile in the AWS client cache key to prevent reuse across profiles.

Reviewed changes

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

Show a summary per file
File Description
cli/internal/scoreboard/transport.go Thread profile into SSM transport construction via the shared AWS client.
cli/internal/scoreboard/transport_ares.go Thread profile into ares transport construction via the shared AWS client.
cli/internal/aws/provider.go Update provider construction to call NewClient with an explicit empty profile.
cli/internal/aws/client.go Add optional profile support to AWS config loading and update cache keying.
cli/cmd/scoreboard.go Add --profile flag and pass it into SSM/ares transport builders.
cli/cmd/lab_reset.go Update AWS client creation call site to pass an explicit empty profile.

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

Comment on lines 44 to 46
if err != nil {
return nil, fmt.Errorf("load AWS config for %s: %w", region, err)
}
Comment thread cli/cmd/scoreboard.go
Comment on lines 66 to 68
scoreboardRunCmd.Flags().Bool("once", false, "Fetch + verify once, print the static board, exit (no TUI)")
scoreboardRunCmd.Flags().String("profile", "", "AWS profile (overrides AWS_PROFILE)")
}
Include profile in AWS config error message for easier debugging.
Clarify --profile help text to indicate it only applies to SSM/ares transports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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