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

fix flare archive #1171

Merged
merged 19 commits into from
Feb 6, 2018
Merged

fix flare archive #1171

merged 19 commits into from
Feb 6, 2018

Conversation

ofek
Copy link
Contributor

@ofek ofek commented Feb 2, 2018

What does this PR do?

Previously we were assigning archive file entries full path names, instead of giving the archive an actual structure.

Motivation

Support needs this

Note

github.com/ugorji/go needs to be pinned like I have it now (8c0409fcbb70099c748d71f714529204975f6c3f) until etcd-io/etcd#8715 is fully resolved

@ofek ofek requested a review from a team as a code owner February 2, 2018 15:30
@ofek ofek closed this Feb 3, 2018
@ofek ofek reopened this Feb 3, 2018
@ofek ofek added this to the 6.0.0-rc.1 milestone Feb 5, 2018
gmmeyer
gmmeyer previously approved these changes Feb 6, 2018
Copy link
Contributor

@gmmeyer gmmeyer left a comment

Choose a reason for hiding this comment

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

I have two questions but I think this looks good to me. Just add the reno release notes and it'll be good :)

return err
}

func zipLogFiles(zipFile *archivex.ZipFile, hostname, logFilePath string) error {
func zipLogFiles(tempDir, hostname, logFilePath string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

These functions aren't actually zipping anymore. They're adding it to a directory. Might be worthwhile to change the names, though not a blocker on merging.


f := filepath.Join(tempDir, hostname, "status.log")

err = ensureParentDirsExist(f)
Copy link
Contributor

Choose a reason for hiding this comment

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

How could this happen unless the temp directory failed to create

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No way, I think, but I always like to handle functions that return error.

Copy link
Contributor

@gmmeyer gmmeyer left a comment

Choose a reason for hiding this comment

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

lgtm

@ofek ofek merged commit 54199f2 into master Feb 6, 2018
@ofek ofek deleted the ofek/fix-flare-archive branch February 6, 2018 23:08
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.

None yet

2 participants