Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HVS] Support Pagination in run Command #147

Merged
merged 3 commits into from
Aug 30, 2024
Merged

[HVS] Support Pagination in run Command #147

merged 3 commits into from
Aug 30, 2024

Conversation

VinnyHC
Copy link
Contributor

@VinnyHC VinnyHC commented Aug 20, 2024

Changes proposed in this PR:

Implement the ability to use next_page_token's to accumulate secrets from paginated responses.

How I've tested this PR:

  • New tests have been added

How I expect reviewers to test this PR:

  • Can be tested against product Vault Secrets resources

Checklist:

  • Tests added if applicable
  • CHANGELOG entry added or label 'pr/no-changelog' added to PR

    Run CHANGELOG_PR=<PR number> make changelog/new-entry for guidance
    in authoring a changelog entry, and commit the resulting file, which should
    have a name matching your PR number. Entries should use imperative present
    tense (e.g. Add support for...)

if err != nil {
return nil, err
} else if len(secs) == 0 {
return nil, fmt.Errorf("no secrets returned from app")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a reasonable UX improvement but happy to remove if folks don't think its needed

Choose a reason for hiding this comment

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

Is there a story where you'd want to "run" even if the list is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah great question. I suppose this is a breaking change and probably best removed.

I can think of a situation where you push app code that no longer needs secrets and you delete them from HVS but your tooling is still launching the app via hcp vs run

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in 526b17d , we can add later if we want it.

@VinnyHC VinnyHC marked this pull request as ready for review August 29, 2024 20:22
@VinnyHC VinnyHC requested a review from a team as a code owner August 29, 2024 20:22
@VinnyHC VinnyHC merged commit 98da946 into main Aug 30, 2024
6 checks passed
@VinnyHC VinnyHC deleted the hvs-paginate-run branch August 30, 2024 16:42
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.

3 participants