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

feat: Optionally save preflight bundles to disk #1612

Conversation

banjoh
Copy link
Member

@banjoh banjoh commented Sep 12, 2024

Description, Motivation and Context

This PR introduces a way to store a bundle of collected data when running preflights. The changes are

  • Always store a bundle to the current working dir when we run preflight command. The format is preflightbundle-YYYY-MM-DDTHH_MM_SS.tar.gz
  • Add a BundlePath option for SDK users to pass in a bundle path to store collected preflight data in that directory.

Demo: https://asciinema.org/a/NBz1y7erRhATItuFR0F8N6tMr

Fixes: sc-111576

Checklist

  • New and existing tests pass locally with introduced changes.
  • Tests for the changes have been added (for bug fixes / features)
  • The commit message(s) are informative and highlight any breaking changes
  • Any documentation required has been added/updated. For changes to https://troubleshoot.sh/ create a PR here

Does this PR introduce a breaking change?

  • Yes
  • No

Signed-off-by: Evans Mungai <evans@replicated.com>
@banjoh banjoh added the type::feature New feature or request label Sep 12, 2024
@banjoh banjoh requested a review from a team as a code owner September 12, 2024 14:31
Signed-off-by: Evans Mungai <evans@replicated.com>
Signed-off-by: Evans Mungai <evans@replicated.com>
@banjoh
Copy link
Member Author

banjoh commented Sep 12, 2024

Docs PR replicatedhq/troubleshoot.sh#578

Signed-off-by: Evans Mungai <evans@replicated.com>
Signed-off-by: Evans Mungai <evans@replicated.com>
@banjoh banjoh force-pushed the evansmungai/sc-111576/preflight-collect-results-should-be-saved branch from 55484be to b831eea Compare September 13, 2024 11:07
Signed-off-by: Evans Mungai <evans@replicated.com>
Signed-off-by: Evans Mungai <evans@replicated.com>
Signed-off-by: Evans Mungai <evans@replicated.com>
Signed-off-by: Evans Mungai <evans@replicated.com>
Signed-off-by: Evans Mungai <evans@replicated.com>
Signed-off-by: Evans Mungai <evans@replicated.com>
@banjoh
Copy link
Member Author

banjoh commented Sep 13, 2024

@adamancini

just watched the asciinema, does the feature write the tarball only if you click s to save or does it just happen always?

As for your question, the tarball is always saved to disk

I suppose the followup is: does it save the tarball if you also pass non-interactive flag?

It saves it on both cases. I made a change to always log when its saved to disk

Copy link
Member

@nvanthao nvanthao left a comment

Choose a reason for hiding this comment

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

LGTM

@banjoh banjoh merged commit aea4f7c into replicatedhq:main Sep 16, 2024
27 checks passed
@banjoh banjoh deleted the evansmungai/sc-111576/preflight-collect-results-should-be-saved branch September 16, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants