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

Make log persistence configurable #1780

Merged
merged 1 commit into from
Sep 28, 2021
Merged

Conversation

carolynvs
Copy link
Member

What does this change

Add a flag to the bundle actions allowing the user to skip saving a copy of the logs to Porter's datastore.

porter install --no-logs

Now when they run porter logs -i mybuns, it will return "no logs found".

This is useful in cases where the logs are too large to store.

What issue does it fix

Closes #1778

Notes for the reviewer

I will cherry-pick this into v1 after this is merged.

Checklist

  • Unit Tests
  • Documentation
  • Schema (porter.yaml)


test.RequirePorter("upgrade", "mybuns")
test.RequirePorter("installation", "show", "mybuns")

test.RequirePorter("uninstall", "mybuns")
// Check that we can disable logs from persisting
test.RequirePorter("uninstall", "mybuns", "--persist-logs=false")
Copy link
Member

Choose a reason for hiding this comment

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

--no-logs instead here, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops yeah. I just pushed a fix for the smoke tests. I had originally gone with --persist-logs but that wasn't a good flag name because in general boolean flags are easiest to use when they default to false and you only specify it when you want it to be true.

Add a flag to the bundle actions allowing the user to skip saving a copy
of the logs to Porter's datastore.

porter install --no-logs

Now when they run porter logs -i mybuns, it will return "no logs found".

This is useful in cases where the logs are too large to store.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@carolynvs
Copy link
Member Author

@vdice All fixed, please take a look.

Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

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

LGTM!

@carolynvs carolynvs merged commit 43a2b2a into getporter:main Sep 28, 2021
@carolynvs carolynvs deleted the disable-logs branch September 28, 2021 14:26
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.

Make saving the logs from a run optional
2 participants