Skip to content

feat: add created field to repo search command with --with-timestamps option - #13421

Closed
ksauzz wants to merge 4 commits into
helm:mainfrom
ksauzz:feat/repo-search-created
Closed

ksauzz wants to merge 4 commits into
helm:mainfrom
ksauzz:feat/repo-search-created

Conversation

@ksauzz

@ksauzz ksauzz commented Nov 5, 2024 •

Copy link
Copy Markdown

What this PR does / why we need it:

closes #11042

Add created field to repo search command to understand when the charts are released.

Changes
  • Add --with-timestamps option to repo search command to print created timestamps for table output
  • Add created field to yaml and json output on default.

table output

% bin/helm search repo --versions fluent/fluent-bit --version '^0.47.10' --with-timestamps
NAME                    CHART VERSION   APP VERSION     DESCRIPTION                                             CREATED
fluent/fluent-bit       0.47.10         3.1.9           Fast and lightweight log processor and forwarde...      2024-10-01T14:59:20Z

json output

% bin/helm search repo --versions fluent/fluent-bit --version '^0.47.10' --output json | jq
[
  {
    "name": "fluent/fluent-bit",
    "version": "0.47.10",
    "app_version": "3.1.9",
    "description": "Fast and lightweight log processor and forwarder or Linux, OSX and BSD family operating systems.",
    "created": "2024-10-01T14:59:20Z"
  }
]

yaml output

% bin/helm search repo --versions fluent/fluent-bit --version '^0.47.10' --output yaml
- app_version: 3.1.9
  created: "2024-10-01T14:59:20Z"
  description: Fast and lightweight log processor and forwarder or Linux, OSX and
    BSD family operating systems.
  name: fluent/fluent-bit
  version: 0.47.10

Special notes for your reviewer:

I improved #11326 to keep backward compatibility for table output.

If applicable:

  • this PR contains user facing changes (the docs needed label should be applied if so)
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 5, 2024
@ksauzz ksauzz changed the title Add created field to repo search command Add created field to repo search command with --with-timestamps option Nov 5, 2024
@ksauzz ksauzz mentioned this pull request Nov 5, 2024
1 of 3 tasks
@ksauzz ksauzz changed the title Add created field to repo search command with --with-timestamps option feat: add created field to repo search command with --with-timestamps option Nov 6, 2024
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Aug 30, 2025
@mohag

mohag commented Sep 2, 2025 •

Copy link
Copy Markdown

activity

@github-actions github-actions Bot removed the Stale label Sep 6, 2025
@kr3cj

kr3cj commented Nov 7, 2025

Copy link
Copy Markdown

activity

@benoittgt

Copy link
Copy Markdown
Contributor

Before reviewing, is it possible to rebase ?

@ksauzz
ksauzz force-pushed the feat/repo-search-created branch from ef94826 to 9359798 Compare November 10, 2025 07:03
ksauzz and others added 2 commits November 10, 2025 16:04
Signed-off-by: Kazuhiro Suzuki <[email protected]>
Signed-off-by: Kazuhiro Suzuki <[email protected]>
Signed-off-by: Kazuhiro Suzuki <[email protected]>
Signed-off-by: Kazuhiro Suzuki <[email protected]>
@ksauzz
ksauzz force-pushed the feat/repo-search-created branch from 9359798 to 16f0ae7 Compare November 10, 2025 07:06
@ksauzz

ksauzz commented Nov 10, 2025

Copy link
Copy Markdown
Author

Rebased against the latest main branch.

@benoittgt

Copy link
Copy Markdown
Contributor

Tested and it's working as expected.

$ bin/helm search repo bitnami --with-timestamps | head -5
NAME                                            CHART VERSION   APP VERSION     DESCRIPTION                                             CREATED             
bitnami/airflow                                 25.0.2          3.0.5           Apache Airflow is a tool to express and execute...      2025-08-21T03:20:00Z
bitnami/apache                                  11.4.29         2.4.65          Apache HTTP Server is an open-source HTTP serve...      2025-08-18T20:03:51Z
bitnami/apisix                                  6.0.0           3.13.0          Apache APISIX is high-performance, real-time AP...      2025-08-20T12:45:26Z
bitnami/appsmith                                7.0.3           1.85.0          Appsmith is an open source platform for buildin...      2025-08-14T02:38:00Z

LGTM

@gjenkins8 gjenkins8 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.

Couple of comments/questions:

  • If a chart is ie. uninstalled, would we still want to show the "CREATED" column/timestamp ?
  • We have the flag --with-timestamps, which controls whether a "CREATED" column is shown. Why the difference in naming here?

@ksauzz

ksauzz commented Nov 11, 2025

Copy link
Copy Markdown
Author

Thank you for the comment.

If a chart is ie. uninstalled, would we still want to show the "CREATED" column/timestamp ?

The intention of showing the CREATED column is to help users determine which version should be used when installing or upgrading a chart. We want to assess whether the latest release is too new or is a new major version, and if so, which version would be more appropriate.
Therefore, we want to be able to check the CREATED column regardless of the installation status.

We have the flag --with-timestamps, which controls whether a "CREATED" column is shown. Why the difference in naming here?

I adopted the suggestion from this comment for the option name. If --with-created or something would be more appropriate, I'll update it.

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Mar 5, 2026
@mohag

mohag commented Mar 10, 2026

Copy link
Copy Markdown

activity

@github-actions github-actions Bot removed the Stale label Mar 11, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Jun 9, 2026
@gjenkins8 gjenkins8 removed the Stale label Jun 24, 2026
Comment thread pkg/cmd/search_repo.go Resolved
Co-authored-by: George Jenkins <[email protected]>
Signed-off-by: Kazuhiro Suzuki <[email protected]>
Copilot AI review requested due to automatic review settings June 25, 2026 00:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances helm search repo output by surfacing chart release timestamps, addressing #11042 by adding a created field to structured outputs and an opt-in table column.

Changes:

  • Add a created timestamp field to repo search JSON/YAML output.
  • Add a --with-timestamps-style option to include a CREATED column in table output.
  • Update golden test fixtures and add a table-output test case.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/cmd/search_repo.go Implements created output and table CREATED column controlled by a flag.
pkg/cmd/search_repo_test.go Adds a golden test case for table output with timestamps.
pkg/cmd/testdata/output/search-output-yaml.txt Updates YAML golden output to include created.
pkg/cmd/testdata/output/search-output-json.txt Updates JSON golden output to include created.
pkg/cmd/testdata/output/search-output-timestamps.txt Adds new golden output for table format including CREATED column.

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

Comment thread pkg/cmd/search_repo.go
Comment on lines 100 to +101
f.BoolVar(&o.failOnNoResult, "fail-on-no-result", false, "search fails if no results are found")
f.BoolVar(&o.withCreatedTimeStamp, "with-created-timestamp", false, "print created timestamp on output table")
Comment thread pkg/cmd/search_repo.go
Comment on lines +240 to 246
for _, ret := range r.results {
if r.withTimestamps {
table.AddRow(ret.Name, ret.Chart.Version, ret.Chart.AppVersion, ret.Chart.Description, ret.Chart.Created.Format(time.RFC3339))
} else {
table.AddRow(ret.Name, ret.Chart.Version, ret.Chart.AppVersion, ret.Chart.Description)
}
}
Comment thread pkg/cmd/search_repo.go
Comment on lines 267 to 269
for _, r := range r.results {
chartList = append(chartList, repoChartElement{r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description})
chartList = append(chartList, repoChartElement{r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description, r.Chart.Created.Format(time.RFC3339)})
}
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Sep 23, 2026
@github-actions github-actions Bot closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature size/M Denotes a PR that changes 30-99 lines, ignoring generated files. Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helm search repo output should include the version release date

7 participants