-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
clients(lightrider): serialize errors in artifacts #9410
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
be5c3cb
core: support saving and loading error artifacts
brendankenny e1968bd
revert some stuff
brendankenny 977f8a1
tighter types
brendankenny 3ce20d2
appveyor debugging
brendankenny 12e460f
windows path separators
brendankenny 73c79c2
feedback
brendankenny 0cf7402
clients(lightrider): serialize errors in artifacts
connorjclark e932e33
update
connorjclark 181cc8e
Merge remote-tracking branch 'origin/master' into lr-error-serialize
connorjclark e23131c
update
connorjclark c7aebaa
comment
connorjclark 0836365
tst
connorjclark 6e03048
fx
connorjclark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
hmm, I don't think we want to structure it this way.
assetSaver
should be able to changestringifyReplacer
at will, which will be a whole lot easier if it's only ever run overartifacts
, not a whole LHR as well.Maybe we should expose a thing on assetSaver to
stringifyArtifacts
(but not save them to disk likesaveArtifacts()
does)? My only concern is replacer performance against traces, since it runs against every single trace event (and trace event properties, recursively). That's not an issue insaveArtifacts
because traces are removed before stringifyingThere 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.
how would the resulting artifacts JSON be put back to the larger LHR json?
performance can also be ignored here, as asset logging is only done via the LR demo app (production would never use the replacer).
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.
parse again? It's not pretty but I don't think this replacer should be responsible for preserving artifacts and LHRs
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.
what changes are you anticipating such that this would break when you pass in an LHR? Maybe we could wait until then?
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.
i18n strings (#9269)? Other kinds of objects? etc etc
It's been a huge help in a few areas to have a definitive single place to save/load artifacts from disk (e.g. recent changes to
report-update-fixtures.js
), which allowed specialization like saving traces to separate files without worry that they'd be lost when loading them at a later point. If we want to open that to stringifying (without writing to disk), we should apply the same principles and letasset-saver
do whatever it has to do internally without dictating an implementation.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.
ok, done