Skip to content

OCPBUGS-79068: Fix HelmChartRepository YAML format#1129

Open
jhadvig wants to merge 1 commit intoopenshift:mainfrom
jhadvig:OCPBUGS-79068
Open

OCPBUGS-79068: Fix HelmChartRepository YAML format#1129
jhadvig wants to merge 1 commit intoopenshift:mainfrom
jhadvig:OCPBUGS-79068

Conversation

@jhadvig
Copy link
Member

@jhadvig jhadvig commented Mar 23, 2026

@assign @TheRealJon

Summary by CodeRabbit

  • Style
    • Updated formatting of documentation text for improved readability and consistency.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 23, 2026
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-79068, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

@assign @TheRealJon

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2026
@jhadvig
Copy link
Member Author

jhadvig commented Mar 23, 2026

/jira refresh

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: d2e22c5b-e771-4343-bca4-7f56f69c85be

📥 Commits

Reviewing files that changed from the base of the PR and between 0258226 and 6c970d6.

📒 Files selected for processing (1)
  • quickstarts/manage-helm-repos.yaml
✅ Files skipped from review due to trivial changes (1)
  • quickstarts/manage-helm-repos.yaml
📜 Recent review details
🧰 Additional context used
🔀 Multi-repo context openshift/console

Findings (repository: openshift/console) [::openshift/console::]

  • Frontend: the Helm plugin contains YAML parsing and create-form logic that could be exercised if users copy/paste the quickstart example into the Create form

    • CreateHelmChartRepository component parses pasted YAML via safeLoad: frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepository.tsx (safeLoad usage around parsing values.yamlData) [::openshift/console::]
    • Form conversion utilities that produce/consume HelmChartRepository objects: frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts (convertToForm, convertToHelmChartRepository) and related tests under tests (helmchartrepository-create-utils.spec.ts, helmchartrepository-data.ts) [::openshift/console::]
    • Editor component that exposes YAML editor: frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx (editor view switching and YAML editor) [::openshift/console::]
  • Frontend: other UI consumers/readers of HelmChartRepository resources (listing, breadcrumbs, detection)

    • Providers and detection: frontend/packages/helm-plugin/src/providers/helm-detection-provider.ts (fetchK8s of HelmChartRepositoryModel / ProjectHelmChartRepositoryModel) [::openshift/console::]
    • List and row components: frontend/packages/helm-plugin/src/components/list-page/* (RepositoriesListPage, RepositoriesRow, ProjectHelmChartRepositoryRow, HelmTabbedPage) which read fields such as spec.url from resources [::openshift/console::]
  • Backend: multiple code paths and tests create/use HelmChartRepository CRs programmatically (not raw YAML)

    • chartproxy and actions test fixtures create fake HelmChartRepository resources: pkg/helm/chartproxy/repos_test.go, pkg/helm/chartproxy/proxy_test.go, pkg/helm/actions/*.go and *_test.go, pkg/helm/actions/fake/helmcrconfigs.go (fake.K8sDynamicClient and fakeHelmCR) — these use structured objects/unstructured, not raw YAML strings [::openshift/console::]
  • API/type definitions and CRD manifests for HelmChartRepository exist in-vendor:

    • vendor/github.com/openshift/api/helm/v1beta1/types_helm_chart_repository.go and related generated files / CRD manifests (zz_generated.featuregated-crd-manifests.yaml) — confirm API shape (spec.url, metadata, kind) unchanged by PR [::openshift/console::]

Notes:

  • The PR edits a quickstart YAML example (quickstarts/manage-helm-repos.yaml) switching a folded scalar to a literal block scalar. That file was not present in the checked-out working tree for direct display in my run, but the plugin code paths above are where a user copying that quickstart into the Create form would interact with it. Backend code uses structured objects and should not be affected by YAML scalar style; frontend safeLoad-based paste parsing and the YAML editor are the only areas where scalar style/indentation might change user experience or require minor copy-paste adjustments. [::openshift/console::]

Tag:


Walkthrough

Updated a YAML ConsoleQuickStart resource's description field from folded scalar to literal block scalar formatting, including re-indentation of embedded HelmChartRepository manifest code blocks and surrounding whitespace adjustments while preserving manifest content values.

Changes

Cohort / File(s) Summary
YAML Formatting Update
quickstarts/manage-helm-repos.yaml
Converted description field from folded scalar (> -) to literal block scalar (`

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 23, 2026
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-79068, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

@assign @TheRealJon

Summary by CodeRabbit

  • Documentation

  • Added new quickstart reference for Helm chart documentation.

  • Chores

  • Updated quickstart documentation formatting for improved readability.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@quickstarts/Untitled`:
- Line 1: The file named "Untitled" in the quickstarts package contains a stray
raw URL and is not a valid quickstart; delete this file or replace its contents
with a proper ConsoleQuickStart YAML (ensure the resource kind is
ConsoleQuickStart and include the required cluster profile annotations and other
required metadata) so it becomes a valid quickstart instead of a plain URL.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: b58b13f1-afa2-4e79-8e08-b72ee1b6458d

📥 Commits

Reviewing files that changed from the base of the PR and between f5ba579 and 0258226.

📒 Files selected for processing (2)
  • quickstarts/Untitled
  • quickstarts/manage-helm-repos.yaml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • quickstarts/Untitled
  • quickstarts/manage-helm-repos.yaml
quickstarts/**/*.yaml

⚙️ CodeRabbit configuration file

quickstarts/**/*.yaml: Review quickstart YAML definitions.
Ensure cluster profile annotations are present.
See quickstarts/README.md for guidelines.

Files:

  • quickstarts/manage-helm-repos.yaml
🔀 Multi-repo context openshift/console

[::openshift/console::] quickstarts/manage-helm-repos.yaml — changed YAML description scalar style (PR under review). (file path from PR context)

Findings (repositories searched: openshift/console)

  • CRD/type definitions (API types used by code)

    • vendor/github.com/openshift/api/helm/v1beta1/types_helm_chart_repository.go — HelmChartRepository, HelmChartRepositorySpec, HelmChartRepositoryStatus definitions. [::openshift/console::]
    • vendor/github.com/openshift/api/helm/v1beta1/zz_generated.featuregated-crd-manifests.yaml — CRD KindName: HelmChartRepository / ProjectHelmChartRepository. [::openshift/console::]
  • Backend/logic consuming HelmChartRepository

    • pkg/helm/chartproxy/* — multiple tests and code reference HelmChartRepository and ProjectHelmChartRepository (proxy_test.go, repos_test.go). These use the CR type and dynamic clients. Changes in example YAML formatting are unlikely to impact code but this is the codepath that reads HelmChartRepository CRs. [::openshift/console::]
  • Documentation referencing HelmChartRepository

    • docs/helm/configure-3rdparty-repos-access.md — examples and docs showing HelmChartRepository CR structure and index URL. Update to YAML formatting in quickstarts may need to remain consistent with docs. [::openshift/console::]
  • Frontend consumers (many places in helm-plugin)

    • frontend/packages/helm-plugin/*
      • models/helm.ts — HelmChartRepositoryModel and ProjectHelmChartRepositoryModel (kind and apiGroup). [::openshift/console::]
      • src/providers/helm-detection-provider.ts — fetchK8s called with HelmChartRepositoryModel and ProjectHelmChartRepositoryModel. [::openshift/console::]
      • src/components/forms/HelmChartRepository/* — form creation, parsing YAML input (safeLoad), convertToHelmChartRepository utilities; CreateHelmChartRepositoryForm reads YAML and constructs CR objects. These components parse YAML provided by users and will be sensitive to YAML content/indentation. [::openshift/console::]
      • src/catalog/providers/useHelmCharts.tsx, various list-page and catalog components — rely on resource fields (spec.url etc.) from HelmChartRepository objects. [::openshift/console::]
      • integration-tests and e2e support data include example HelmChartRepository YAML (integration-tests/test-data/red-hat-helm-charts.yaml, features referencing the Azure-Samples index URL). [::openshift/console::]
  • Tests and test-data

    • pkg/helm/chartproxy/repos_test.go and proxy_test.go — unit tests create fake dynamic clients with HelmChartRepository objects. [::openshift/console::]
    • frontend/packages/helm-plugin/integration-tests/test-data/* — sample HelmChartRepository CRs used in tests; features reference the same example index URL as quickstarts. [::openshift/console::]

Short assessment

  • The PR edits quickstarts YAML formatting and adds a file with a single URL. There are many consumers of HelmChartRepository CRs across backend (chartproxy), frontend (helm-plugin forms/parsers, models, providers), docs, and tests. The substantive API/field names (apiVersion, kind, metadata, spec.url) are unchanged per PR description; the change is YAML scalar formatting and indentation in a quickstart example.
  • Potentially relevant area: frontend CreateHelmChartRepository form/parser uses safeLoad to parse pasted YAML; changing literal vs folded block style could affect how embedded code fences or indentation are interpreted in the quickstart sample if users copy/paste into the form. Tests and integration test data also include YAML examples that should remain consistent with expected parsing. Backend dynamic clients/tests use object structures, not raw YAML strings, so they are unaffected.

If you want, I can:

  • Open and show the exact contents of quickstarts/manage-helm-repos.yaml and quickstarts/Untitled to confirm the exact formatting change and the URL added. (I attempted to print them earlier but relied on repo listing; I can print file contents on request.)
🔇 Additional comments (1)
quickstarts/manage-helm-repos.yaml (1)

33-57: Good fix: literal block preserves the YAML example formatting correctly.

This change improves copy/paste reliability of the embedded CR example and keeps the task instructions readable.

@@ -0,0 +1 @@
https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs No newline at end of file
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove this stray non-quickstart file from quickstarts/.

This file is just a raw URL and is not a valid quickstart definition. It should be deleted (or replaced with a proper ConsoleQuickStart YAML if that was the intent).

Suggested change
-https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs

As per coding guidelines, "Quick starts must be placed under quickstarts/ in this repo" and quick start YAML should include required cluster profile annotations.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@quickstarts/Untitled` at line 1, The file named "Untitled" in the quickstarts
package contains a stray raw URL and is not a valid quickstart; delete this file
or replace its contents with a proper ConsoleQuickStart YAML (ensure the
resource kind is ConsoleQuickStart and include the required cluster profile
annotations and other required metadata) so it becomes a valid quickstart
instead of a plain URL.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@jhadvig: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

Choose a reason for hiding this comment

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

Was this a stray file?

Copy link
Member

@TheRealJon TheRealJon left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 24, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, TheRealJon

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

@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-79068, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

@assign @TheRealJon

Summary by CodeRabbit

  • Style
  • Updated formatting of documentation text for improved readability and consistency.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@TheRealJon
Copy link
Member

/woof

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 24, 2026

@TheRealJon: dog image

Details

In response to this:

/woof

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants