Read client steps from remote config#6941
Read client steps from remote config#6941alfonso-noriega wants to merge 1 commit into01-build-steps-infrastructurefrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
b6f6989 to
92899bf
Compare
Coverage report
Test suite run success3817 tests passing in 1460 suites. Report generated by 🧪jest coverage report action from 92899bf |
ce4a75e to
4088d90
Compare
92899bf to
55fc27f
Compare
55fc27f to
b5573b3
Compare
| function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined { | ||
| if (!clientSteps) return undefined | ||
| return JSON.parse(clientSteps) | ||
| } |
There was a problem hiding this comment.
Unhandled JSON.parse can crash specifications fetch
clientSteps is sourced from a remote API field (spec.clientSteps) and is parsed with JSON.parse without a try/catch. If the API returns invalid JSON (e.g., empty string, partially-written JSON, a plain string, or an unexpectedly formatted value), JSON.parse will throw and the entire specifications() call will reject.
Evidence:
function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined {
if (!clientSteps) return undefined
return JSON.parse(clientSteps)
}This can make the CLI fail to fetch extension specifications, potentially breaking deploy/build flows for users receiving malformed clientSteps (or during a transient backend bug).
|
🤖 Code Review · #projects-dev-ai for questions ✅ Complete - 1 findings 📋 History✅ 1 findings |

WHY are these changes introduced?
Extension specifications need to include client steps information to support build processes that require step-by-step client-side operations.
WHAT is this pull request doing?
clientStepsfield to the GraphQL query for fetching extension specificationsRemoteSpecificationinterface to include aclientStepsproperty of typeClientStepsAppManagementClientto convert the string-basedclientStepsfield from the API response into a structuredClientStepsarrayClientStepstype from the build services moduleHow to test your changes?
clientStepsfield is properly retrieved from the GraphQL APIMeasuring impact
How do we know this change was effective? Please choose one:
Checklist