Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
agd export
option for diagnosis #10344agd export
option for diagnosis #10344Changes from 12 commits
0a4c1f0
4467bd6
e5b1b86
8bd66da
10cfea3
c1d3cdb
36a10d6
8811fc0
980037a
6daf159
1ad8be5
c4be539
cc6cbd0
3928c4a
65e4656
d2759e2
483c566
f3c69b3
530a2b5
f97d3da
cda65f9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhofman since
OnExportHook
currently points tolaunchVM
, is it okay to bypass this hook in case swing-store export is not needed? Or do you see us adding cosmic side future hook changes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fine, but I'd like @michaelfig to confirm, especially with his upcoming changed for split brains. Basically export only needs to launch the VM if it will export the swing-store, which is decided by a command line config. Since
OnExportHook
is unconditionally set or not based on the entrypoint used, the only option we have is to ignore it here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, my brain still struggles with distributing negations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to close this reader in defer?
defer exportDataReader.Close()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought
EncodeKVEntryReaderToJsonl
function will close the reader passed to it at the end but it seems like it doesn'tThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right,
EncodeKVEntryReaderToJsonl
doesn't close the reader. I think that was because I wanted the reader to be closed even if a read error occurred, and leave the caller in charge of handling potentially double errors. I'm not sure if that's the idiomatic golang thing to do, and would be open to reconsider if it's not.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in-case exportMode is "debug", we are sending an extra artifact at the end which is a full export of swingStore (Kvstore)? Right? Assuming that caller iterates over
ReadNextArtifact
until gets io.EOF.