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 parsing log filenames future-proof #4518

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

europaul
Copy link
Contributor

Main commit is a8725c7. Instead of relying on a certain structure of log filenames, we should just use regexp to look for timestamps or UUIDs - this way the filename structure can change in the future, but it will still be backwards compatible with our filename parsing logic.

This PR contains the changes for pillar. In a later PR those changes will also be applied to newlog and edge-view.

Instead of parsing filenames according to a certain schema,
we should use regexp to look for timestamps or UUIDs. This
way the file names can change in the future without affecting
backward compatibility with the existing code for parsing
filenames.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
Since not all logs in persist are to be sent, we rename
LogRemainToSendMBytes to MaxGzipLogMBytesInPersist. This
parameter represents the maxinum size of all gzipped logs
in persist.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
@europaul
Copy link
Contributor Author

the yetus warning can probably be ignored since we do the same in other files that import gomega

yetus: pkg/pillar/types/newlogtypes_test.go#L10
revive: should not use dot imports https://revive.run/r#dot-imports

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.

1 participant