feat(factory): add --yes confirmation guard for destructive commands - #537
feat(factory): add --yes confirmation guard for destructive commands#537margaretjgu wants to merge 23 commits into
Conversation
|
|
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts MegaLinter is graciously provided by OX Security |
|
dry-run bypass is intentional — dry-run exits before sending anything so confirmation would be a no-op. The other points are noted; not addressing before merge. |
JoshMock
left a comment
There was a problem hiding this comment.
We've added a more accurate "is destructive" flag to the schemas lib, which should probably be used to simplify any destructive checks in the CLI rather than just inferring from HTTP method. elastic/schemas-js#25
other than that, the overall change LGTM.
|
The diff is purely additive schema documentation — it appends a Missing The
At line ~19753 the No evidence of the actual guard implementation The diff only touches Consistency of flag summary capitalisation All pre-existing flag summaries start with lowercase ( Over-broad application
The core concern is point 3: if the implementation diff is missing, this schema change is dead weight at best and misleading at worst. |
|
|
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
|
#542 was opened today to track this more broadly, per a request from @kobelb in today's CLI workstream meeting. Take a look and make sure your changes are aligned with that before merging. You don't need to fully implement everything noted there, just fix any conflicts with your work and the described implementation. 🙏 Once it's merged, please also update the issue to describe what functionality has been added and what still remains. |
bf3df31 to
952aad0
Compare
|
done in #537:
not done:
|
JoshMock
left a comment
There was a problem hiding this comment.
LGTM. One question, just making sure we validate that the destructive flag added to JSON schemas via elastic/schemas-js#25 is working, not just using HTTP method as intent.
| index: { type: 'string', 'x-found-in': 'path' }, | ||
| }, | ||
| required: ['index'], | ||
| } |
There was a problem hiding this comment.
Can we add another test here that uses destructive: true rather than just trusting the @cli-schema/spec library to get intent right based on HTTP method?
Closes #511.