Skip to content

Use typed vendor lookups - #3082

Merged
gardener-prow[bot] merged 3 commits into
masterfrom
enh/typed-vendor-lookup
Jul 17, 2026
Merged

Use typed vendor lookups#3082
gardener-prow[bot] merged 3 commits into
masterfrom
enh/typed-vendor-lookup

Conversation

@grolu

@grolu grolu commented Jul 17, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

This is the second preparatory refactor extracted from #2824 and follows the vendor registry extraction in #3075.

Vendor lookup previously accepted only a vendor name and searched across infrastructure, DNS, and machine-image vendors. This became ambiguous when multiple vendor domains used the same name and made it impossible for callers to state which registry they intended to query.

This change:

  • requires vendor lookups to provide both the vendor domain (infra, dns, or machineImage) and name
  • propagates the vendor domain through vendor icons, display names, credential dialog routing, cloud-profile sorting, and machine-image decoration
  • adds regression coverage proving that infrastructure and DNS vendors with the same name resolve independently

Related PRs:

Which issue(s) this PR fixes:

None.

Special notes for your reviewer:

Please review this as the second preparatory refactor in the sequential split of #2824. The API change is intentionally mechanical: every lookup site now supplies its known vendor domain.

Validation:

  • make verify
  • focused config-store, cloud-profile, and machine-image tests

Release note:

NONE

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

    • Improved vendor identification by consistently using vendor type for infrastructure and DNS across lists, tooltips, popovers, and selection UIs.
    • Corrected vendor display names in credential dialogs and related screens.
    • Fixed vendor icon resolution when the required vendor details aren’t available.
  • Tests

    • Added unit test coverage for vendor details and display-name lookups for both infrastructure and DNS providers.

@gardener-prow

gardener-prow Bot commented Jul 17, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gardener-prow gardener-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 02b29de5-0fc5-45bc-9017-2384ff5a2f8f

📥 Commits

Reviewing files that changed from the base of the PR and between d9dc037 and 3138aa8.

📒 Files selected for processing (2)
  • frontend/src/components/GVendor.vue
  • frontend/src/store/config.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/store/config.js

📝 Walkthrough

Walkthrough

The config store now resolves vendors by { type, name }. Vendor display and icon components receive explicit types, and credential dialogs propagate infrastructure or DNS types through their wrapper and state flows. Tests cover typed infrastructure and DNS lookups.

Changes

Typed vendor lookup propagation

Layer / File(s) Summary
Vendor lookup contract and consumers
frontend/src/store/config.js, frontend/src/store/cloudProfile/index.js, frontend/src/composables/useCloudProfile/useMachineImages.js, frontend/__tests__/stores/config.spec.js
Vendor lookups and display-name resolution now accept { type, name }; DNS, infrastructure, machine-image consumers and store tests use the structured contract.
Typed vendor rendering
frontend/src/components/GVendor*.vue, frontend/src/components/*InfrastructureCard.vue, frontend/src/components/ShootDns/*, frontend/src/components/*ListRow.vue, frontend/src/components/Credentials/GBindingRowInfra.vue, frontend/src/components/Credentials/GCredentialRowDns.vue
Vendor components accept explicit types, resolve typed metadata, and infrastructure or DNS call sites provide the corresponding values.
Credential dialog vendor propagation
frontend/src/components/Credentials/GSecretDialog*.vue, frontend/src/components/Credentials/GSelectCredential.vue, frontend/src/views/GCredentials.vue
Credential dialog wrappers, dialog components, and credential actions forward vendor types and use typed display-name lookups.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GCredentials
  participant GSecretDialogWrapper
  participant GSecretDialogGeneric
  participant GSecretDialog
  participant ConfigStore
  GCredentials->>GSecretDialogWrapper: pass visibleCredentialVendorType
  GSecretDialogWrapper->>GSecretDialogGeneric: pass vendorType
  GSecretDialogGeneric->>GSecretDialog: bind vendorType
  GSecretDialog->>ConfigStore: vendorDisplayName({ type, name })
  ConfigStore-->>GSecretDialog: return display name
Loading

Possibly related PRs

Suggested labels: approved, lgtm

Suggested reviewers: petersutter

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change to typed vendor lookups.
Description check ✅ Passed The description covers purpose, scope, related PRs, reviewer notes, and release note; only the categorization labels are missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enh/typed-vendor-lookup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@grolu

grolu commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

/kind enhancement

@grolu
grolu marked this pull request as ready for review July 17, 2026 08:12
@grolu
grolu requested a review from a team as a code owner July 17, 2026 08:12
@gardener-prow gardener-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2026
@grolu grolu added the kind/enhancement Enhancement, improvement, extension label Jul 17, 2026
@gardener-prow gardener-prow Bot removed the do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Jul 17, 2026
@gardener gardener deleted a comment from gardener-prow Bot Jul 17, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/components/Credentials/GSecretDialogGeneric.vue`:
- Around line 81-84: Declare the required vendorType prop in
GSecretDialogAws.vue, GSecretDialogAzure.vue, GSecretDialogAlicloud.vue, and
GSecretDialogCloudflare.vue, then forward each wrapper’s vendorType value to the
imported GSecretDialog component. Preserve the existing wrapper behavior and use
the appropriate vendor identifier for each provider.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a51c97a6-30b7-4fab-8e35-6a44a75e17d7

📥 Commits

Reviewing files that changed from the base of the PR and between 67e047b and d9dc037.

📒 Files selected for processing (21)
  • frontend/__tests__/stores/config.spec.js
  • frontend/src/components/Credentials/GBindingRowInfra.vue
  • frontend/src/components/Credentials/GCredentialRowDns.vue
  • frontend/src/components/Credentials/GSecretDialog.vue
  • frontend/src/components/Credentials/GSecretDialogGeneric.vue
  • frontend/src/components/Credentials/GSecretDialogWrapper.vue
  • frontend/src/components/Credentials/GSelectCredential.vue
  • frontend/src/components/GSeedListRow.vue
  • frontend/src/components/GShootListRow.vue
  • frontend/src/components/GVendor.vue
  • frontend/src/components/GVendorIcon.vue
  • frontend/src/components/NewShoot/GNewShootInfrastructureCard.vue
  • frontend/src/components/SeedDetails/GSeedInfrastructureCard.vue
  • frontend/src/components/ShootDetails/GShootInfrastructureCard.vue
  • frontend/src/components/ShootDns/GDnsProvider.vue
  • frontend/src/components/ShootDns/GDnsProviderRow.vue
  • frontend/src/components/ShootDns/GManageDns.vue
  • frontend/src/composables/useCloudProfile/useMachineImages.js
  • frontend/src/store/cloudProfile/index.js
  • frontend/src/store/config.js
  • frontend/src/views/GCredentials.vue

Comment thread frontend/src/components/Credentials/GSecretDialogGeneric.vue

@petersutter petersutter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/approve

@gardener-prow gardener-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 17, 2026
@gardener-prow

gardener-prow Bot commented Jul 17, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petersutter

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow

gardener-prow Bot commented Jul 17, 2026

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 04538fa3c5724dd0958a504d2c08a2f7b4b6fb10

@gardener-prow gardener-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 17, 2026
@gardener-prow
gardener-prow Bot merged commit e467be2 into master Jul 17, 2026
35 checks passed
@gardener-prow
gardener-prow Bot deleted the enh/typed-vendor-lookup branch July 17, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants