-
Notifications
You must be signed in to change notification settings - Fork 71
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
Encode header fields if they exist on schedule edit #2405
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/lib/stores/schedules.ts
Outdated
for (const [key, value] of entries) { | ||
const encodedValue = await encodePayloads( | ||
stringifyWithBigInt(value), | ||
'json/plain', |
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 want to use the encoding
value here as well?
'json/plain', | |
encoding |
And if so, would we want to create a separate UI for it?
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 we just use plain/json for now. There's no UI for editing headers for schedules and not sure we want to add that yet. If we need to we can, but headers are almost always json/plain.
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.
Yeah only concern here is that if a user has Codec Server set up with users who don't have /encode
permissions then it will error on save unless we do a similar approach to #2384.
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 added a try/catch for now and return if encoding errors for header fields
Description & motivation 💭
If a schedule startWorkflow has been created or edited to include header fields, and then edited in the UI, upon save it would error due to the header fields not being encoded. This ensures the fields get encoded upon save if they exist.
Screenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?