Repository navigation
fix(apps): forbid online env var delete; surface release note - #2844
chengshihao-miaoda wants to merge 1 commit into
Conversation
…d note CLI could delete online env vars directly, bypassing the release-based change control, and both set/delete success looked instantaneous even though the online runtime keeps serving the pre-release snapshot. - `+env-delete --environment online` is now rejected at Validate (fails for --yes execution and --dry-run alike); users must delete in dev then run `+release-create`, or remove from the developer console. - `+env-set` and `+env-delete` success envelopes include a `note` field pointing at `+release-create`, so JSON and pretty consumers see the same reminder that online propagation requires a release. - Skill reference doc updated to document both constraints.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@02ebcca5319802664c41c2e6b7b04cad64ac4460🧩 Skill updatenpx skills add larksuite/cli#fix/apps-env-online-delete-and-release-note -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2844 +/- ##
==========================================
- Coverage 76.40% 76.39% -0.01%
==========================================
Files 1151 1151
Lines 133041 133046 +5
==========================================
- Hits 101646 101643 -3
- Misses 23150 23158 +8
Partials 8245 8245 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
onlineenv vars directly, bypassing the release-based change control.+env-setand+env-deletereturned a 200 OK with no indication that the online runtime keeps serving the pre-release snapshot until+release-createruns — users mistook the immediate success for live effect.Changes
shortcuts/apps/apps_env.go--environment onlinefor+env-deleteatValidate(covers both--yesexecute and--dry-runpreview); the error message points users at the dev ++release-createworkflow or the developer console.envVarReleaseNoteconstant and include anotefield in the success envelopes of+env-setand+env-delete, so JSON and pretty formats both carry the "release required to go live" reminder.shortcuts/apps/apps_env_test.goBuildsDeleteBodyWithKeysnow uses--environment devand asserts the release note.RejectsOnlineEnvironmentcovers both--yesand--dry-runrejection paths with typed*errs.ValidationError+SubtypeFailedPrecondition.OnlineDryRunDoesNotRequireYes(subsumed byRejectsOnlineEnvironment).skills/lark-apps/references/lark-apps-env.md: documentsdata.noteon success and the online-delete constraint; drops the stale--environment onlinedelete example.Test Plan
make testpasses (local Go toolchain is 1.18/1.22; go.mod requires 1.23).lark-cli apps +env-delete --environment online --key FOO --yesreturns a validation error with dev + release-create guidance.lark-cli apps +env-delete --environment online --key FOO --dry-runreturns the same validation error (previously previewed the request).lark-cli apps +env-set --environment online --key FOO --value <v> --yessuccess JSON containsdata.notereferencing+release-create.lark-cli apps +env-delete --environment dev --key FOO --yessuccess JSON containsdata.note.Related Issues
None. Observed while cleaning up
lark-appsskill guidance around env-var mutations.Summary by CodeRabbit
onlineis no longer supported. Delete the key indevand release, or remove it through the developer console.