-
Notifications
You must be signed in to change notification settings - Fork 14
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
Integrate reporter #1558
Integrate reporter #1558
Conversation
772ef2f
to
9afa8ab
Compare
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.
metadata: { ['runme.dev/frontmatter']: string }, | ||
kernel?: Kernel, | ||
): Frontmatter { | ||
const yamlDocs = YAML.parseAllDocuments(metadata['runme.dev/frontmatter']) |
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.
Hey @peraltafederico, should we consider offering support for frontmatter that isn't in YAML format?"
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.
Good question, @pastuxso! Initially, I started parsing the metadata with gray-matter, but since we were already using yaml, I thought it would be a good idea to stay consistent.
I think what matters most now is how our current design aligns with this approach, so using yaml should be fine for now, but I’ll leave the final decision to @sourishkrout.
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.
@peraltafederico do we have to serialize the frontmatter? runme.parser.v1.Frontmatter
is well defined. If serialization is required on the backend side maybe that's where it should happen?
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.
@sourishkrout Just to confirm, you mean that I just parse the raw frontmatter in the Platform APi instead of doing it when marshaling the Notebook, right?
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.
@sourishkrout I just realized I'm marshaling the frontmatter to also get the session ID, see:
vscode-runme/src/extension/serializer.ts
Line 829 in b56b841
private static marshallFrontmatter( |
I'm leaving this as is for now, but please let me know if there's a different approach I may be overlooking!
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.
Okay, @peraltafederico. We can leave it in place for now. It's in the protos but if we skip out on the Kernel reporter API for now, that's no help.
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.
✅ LGTM
Quality Gate passedIssues Measures |
Normalize the Platform payload based on the new Reporter message definition from the Go kernel. Currently in this PR, the extension manually parses a notebook to create a valid Platform payload, but in the near future it will delegate that parsing to the Reporter service.
Depends on stateful/runme#655 and https://github.com/stateful/platform/pull/822.
Tests are failing until the proto files are generated.