Skip to content

Migrate byok to aws-sdk-go-v2, fix on-prem login URL trailing path, docs terminology - #3426

Open
David Adams (davidadas) wants to merge 3 commits into
mainfrom
dadams/apie-papercuts-batch-4
Open

Migrate byok to aws-sdk-go-v2, fix on-prem login URL trailing path, docs terminology#3426
David Adams (davidadas) wants to merge 3 commits into
mainfrom
dadams/apie-papercuts-batch-4

Conversation

@davidadas

Copy link
Copy Markdown
Contributor

Release Notes

Bug Fixes

  • Fixed confluent login --url for Confluent Platform silently keeping a trailing path (e.g. copied from a browser address bar) baked into the stored base URL, breaking subsequent API requests.
  • Fixed the generated docs on-prem tab being labeled "On-Premises" instead of "Confluent Platform".

Checklist

  • I have successfully built and used a custom CLI binary, without linter issues from this PR.
  • I have clearly specified in the What section below whether this PR applies to Confluent Cloud, Confluent Platform, or both.
  • I have verified this PR in Confluent Cloud pre-prod or production environment, if applicable.
  • I have verified this PR in Confluent Platform on-premises environment, if applicable.
  • I have attached manual CLI verification results or screenshots in the Test & Review section below.
  • I have added appropriate CLI integration or unit tests for any new or updated commands and functionality.
  • I confirm that this PR introduces no breaking changes or backward compatibility issues.
  • I have indicated the potential customer impact if something goes wrong in the Blast Radius section below.

What

Three independent changes bundled together:

  1. Migrate byok from aws-sdk-go v1 to v2 (APIE-472, Confluent Cloud): aws-sdk-go v1 is in maintenance mode; byok was its only remaining caller in this repo. Verified the v1 and v2 arn packages are drop-in compatible by running both side-by-side against 8 real ARN strings, including edge cases, with zero behavioral differences. go mod tidy then removed v1 entirely.
  2. Strip trailing path from on-prem login --url (APIE-1348, Confluent Platform): a URL with a trailing path (e.g. an MDS URL copied from a browser address bar) was baked verbatim into the stored base URL, silently breaking every subsequent API request built on top of it. The Confluent Cloud branch of the same validation function was left untouched to avoid changing existing accepted behavior there (e.g. trailing-slash URLs).
  3. Docs terminology fix (Confluent Platform): the generated docs on-prem tab was labeled "On-Premises"; changed to "Confluent Platform" to match current product naming.

Blast Radius

  • The byok AWS SDK migration is an internal dependency swap with verified drop-in-compatible behavior; no customer-facing change expected.
  • Customers logging into Confluent Platform with a --url containing a trailing path now get a correctly stripped base URL instead of silently broken subsequent requests; no impact to URLs without a trailing path.
  • The docs label change has no functional impact.

References

  • Jira APIE-472
  • Jira APIE-1348

Test & Review

  • Added TestIsAWSKey unit test and 2 new TestValidateUrl cases covering the trailing-path fix; full targeted test suite (internal/login, internal/byok) run locally, all passing.

…form"

Aligns the generated docs tab name with the product's current name.
v1 is in maintenance mode; v2's arn package is drop-in compatible
(verified against 8 real ARN strings, including edge cases, with zero
behavioral differences). go mod tidy then removed v1 entirely, since
byok was its only remaining caller.
A URL with a trailing path (e.g. an MDS URL copied from a browser
address bar) was baked verbatim into the stored base URL, silently
breaking every subsequent API request built on top of it. The CCloud
branch was left untouched to avoid changing existing accepted behavior
there (e.g. trailing-slash URLs).
@davidadas
David Adams (davidadas) requested a review from a team as a code owner July 31, 2026 16:47
Copilot AI review requested due to automatic review settings July 31, 2026 16:47
@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

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

This PR bundles three related maintenance/bugfix updates across login URL validation, BYOK AWS dependency usage, and docs generation labeling.

Changes:

  • Migrates internal/byok ARN parsing from aws-sdk-go v1 to aws-sdk-go-v2 and removes the v1 dependency from go.mod/go.sum.
  • Fixes Confluent Platform confluent login --url validation to discard any trailing path after scheme://host:port so the stored base URL doesn’t include /login (or similar).
  • Renames the generated docs on-prem tab label from “On-Premises” to “Confluent Platform”.

Reviewed changes

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

Show a summary per file
File Description
internal/login/command.go Strips trailing path from on-prem login URLs while keeping Confluent Cloud URL behavior unchanged.
internal/login/command_test.go Adds test coverage for trailing-path stripping and a related invalid URL case.
internal/byok/command_create.go Switches ARN parsing import to AWS SDK v2.
internal/byok/command_create_test.go Adds a unit test for AWS KMS key ARN detection.
go.mod Replaces AWS SDK v1 dependency with AWS SDK v2 core module as a direct requirement.
go.sum Removes AWS SDK v1 checksums after the migration.
cmd/docs/main.go Updates docs tab/context labeling to “Confluent Platform”.

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

@sonarqube-confluent

Copy link
Copy Markdown

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