examples: add noop target proof for spring app#84
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5010184271
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| for env in "${ENVS[@]}"; do | ||
| space="$(space_name "${env}")" | ||
| ${CUB} unit apply --space "${space}" inventory-api --quiet |
There was a problem hiding this comment.
Wait for apply completion before finishing
--with-targets
In the new Noop-target flow, setup returns immediately after cub unit apply, but the documented next step is ./confighub-verify.sh --targets, which reads unit status synchronously. Elsewhere in this repo, apply is treated as asynchronous: incubator/global-app-layer/realistic-app/apply-live.sh:74-85 polls until ActionResult == "ApplyCompleted" before declaring success. On a normal org with a server worker, a user following the new README sequence can hit a false failure simply because the worker has not finished processing yet.
Useful? React with 👍 / 👎.
| status=$(echo "${unit_json}" | jq -r '.UnitStatus.Status') | ||
| sync=$(echo "${unit_json}" | jq -r '.UnitStatus.SyncStatus') | ||
| if [[ "${status}" != "Ready" ]]; then | ||
| echo "FAIL: ${space}/inventory-api status is ${status}, expected Ready" >&2 | ||
| errors=$((errors + 1)) | ||
| else | ||
| echo "ok: ${space}/inventory-api status=${status} sync=${sync}" |
There was a problem hiding this comment.
Check sync/apply result before passing
--targets verification
--targets mode currently treats .UnitStatus.Status == "Ready" as the only success condition and never asserts SyncStatus or ActionResult, even though the new docs/contracts say this mode proves the apply completed. The repo's own apply flow in incubator/global-app-layer/realistic-app/apply-live.sh:75-85 treats Ready alone as insufficient and waits specifically for ApplyCompleted. As written, ./confighub-verify.sh --targets can print the new success line while a unit is still out of sync or its most recent apply did not complete.
Useful? React with 👍 / 👎.
Summary
springboot-platform-app--with-targetsand--targetsValidation
./scripts/verify.shcd incubator/springboot-platform-app && ./verify.shcd incubator/springboot-platform-app && ./confighub-setup.sh --explain --with-targetscd incubator/springboot-platform-app/upstream/app && mvn testNotes
--with-targetspath from the fresh sync worktree, to avoid recreating ConfigHub state again during the sync stepmain