-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Merged by Bors] - feat: validate trace payloads to avoid transcript issue (COR-000) #733
Closed
Conversation
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
zhihil
force-pushed
the
brennan/add-validation-to-payload/COR-000
branch
from
March 25, 2024 15:47
dd78703
to
ae6869c
Compare
trs
reviewed
Mar 25, 2024
runtime/lib/Handlers/function/lib/execute-function/execute-function.ts
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
bors r+ |
👎 Rejected by too few approved reviews |
trs
approved these changes
Mar 26, 2024
bors r+ |
bors-vf bot
pushed a commit
that referenced
this pull request
Mar 26, 2024
<!-- You can erase any parts of this template not applicable to your Pull Request. --> **Fixes or implements COR-000** ### Brief description. What is this change? <!-- Build up some context for your teammates on the changes made here and potential tradeoffs made and/or highlight any topics for discussion --> Transcript UI is failing because users are able to send debug traces from the Function step without `payload.message` defined. We will add validation on the Function step to throw an exception if the user provides a standard trace (e.g. debug) and does not fit the type definition.
Pull request successfully merged into master. Build succeeded: |
bors-vf
bot
changed the title
feat: validate trace payloads to avoid transcript issue (COR-000)
[Merged by Bors] - feat: validate trace payloads to avoid transcript issue (COR-000)
Mar 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes or implements COR-000
Brief description. What is this change?
Transcript UI is failing because users are able to send debug traces from the Function step without
payload.message
defined.We will add validation on the Function step to throw an exception if the user provides a standard trace (e.g. debug) and does not fit the type definition.
Implementation details. How do you make this change?
Added a trace validation utility to ensure that if users are providing traces of a standard type, then their contents conforms to the type definition. If the trace has property
field
, thenfield
is a built-in property of the interface, thenfield
's value must match the type on the interfacefield
is not a built-in property of the interface, thenfield
's value is not type-checked and the value is simply "passed through"This approach means that users have the flexibility to define fields that we "don't care about", but must satisfy type safety for when we do.
Setup information
N/A
Deployment Notes
N/A
Related PRs
Checklist