Repository navigation
fix(publish): delete an edition from PublishingShell Design (#5083) - #5100
Conversation
> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs.
Request changes: a finished publish job still blocks edition delete for up to an hour. > Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.
|
Independent Erlang review of Bug:
Fix: 409 only when that job exists and Machine
|
getEditionJobId keeps completed jobs until reap, so delete returned 409 for up to an hour after a publish finished. runningJobId now treats a terminal status as idle and still blocks a job that is actually running. > Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang-fix.
Finished publish jobs no longer block edition delete. No blocking bugs. > Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.
natechadwick-intsof
left a comment
There was a problem hiding this comment.
Independent re-review of 1428cb3d. LGTM. GitHub rejected a same-login APPROVE (Review Can not approve your own pull request).
runningJobId treats a terminal job status as idle (State.isTerminal(), same predicate as PSPublishingJob.isFinished()). getEditionJobId is unchanged. An unknown job id is idle. Any other status-lookup failure stays in use. Tests cover completed, cancelled, working, unknown, and lookup failure, and delete through the runtime support.
Nit, non-blocking: the javadoc line "null is idle" matches a null edition guid, not a null job status (that path stays in use).
Machine mkd-code-review on this head: 13 files, 0 in-diff bugs, 1 preexisting listRuntimeEditions complexity suggestion. That suggestion does not block.
Report commit: 4cc87bd7.
Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.
Summary
PublishingShell Design can delete an idle edition after an explicit confirm. The existing
DELETE …/sitemanage/publishingdesign/editions/{editionId}path now requires Admin or Designer (HTTP 403), rejects a blank id (HTTP 400), and refuses an edition that has a running publish job (HTTP 409,Edition is in use). Success closes the editor and removes the row from the open site's edition list. Cancel does not call the server.Parent tracker: #4531 (slice 63). Out of scope: copy edition, create edition, stopping a running job, delivery-server delete, JSF deletes, and #1371 UAT.
Fixes #5083
Operator: Grok: night-issue-prs (model grok-4.7)
Test plan
PSPublishingDesignRestServiceTestdelete cases andPSPublishingRuntimeSupportTest.runningJobId_*; VitestEditionEditor.delete,DesignSection.deleteEdition,mapEditionDeleteError.Checklist
product-docs/8.2/admin/publishing.md(### Delete a publish edition (Design))modules/perc-qa-automation/frontend/tests/publishing/designEditionDelete.spec.js(3 passed on H2 QA)Build evidence
modules_built: WebUI, projects/sitemanage, modules/perc-qa-automation
cd WebUI && rtk mvn clean install— BUILD SUCCESS. Vitest: Test Files 613 passed, Tests 5596 passed. Surefire Tests run: 69, Failures: 0.cd projects/sitemanage && JAVA_HOME=/usr/lib/jvm/java-21-openjdk bash ../../mvnw clean install— BUILD SUCCESS. Tests run: 3236, Failures: 0, Errors: 0, Skipped: 125.cd modules/perc-qa-automation && JAVA_HOME=/usr/lib/jvm/java-21-openjdk bash ../../mvnw clean install— BUILD SUCCESS (npm ci). Surefire: No tests to run (Playwright is the C5 surface run).cd rest && JAVA_HOME=/usr/lib/jvm/java-21-openjdk bash ../mvnw clean install— BUILD SUCCESS. Local m2 realignment only; rest sources are unchanged on this branch.downstream_checked: none.
runningJobIdis additive. No type was made final or sealed. No public method signature changed. Noextends PSPublishingDesignRestServiceorextends PSPublishingRuntimeSupportsubclasses.UI proof (C5)
python3 docker/scripts/perc-devctl.py qa-up --skip-image-build— RESULT:OK. TEST_CMS_URL=http://127.0.0.1:9993 QA_CMS_HOST_PORT=9993 QA_CONTAINER=perc-matrix-cms-h2. Admin password taken from qa-up stdout (not recorded here).python3 docker/scripts/perc-devctl.py qa-health— RESULT:OK HEALTH:healthy HTTP:200.sitemanage-8.2.0-SNAPSHOT.jarandrest-8.2.0-SNAPSHOT.jarintoperc-matrix-cms-h2:/opt/Percussion/jetty/base/webapps/Rhythmyx/WEB-INF/lib/.python3 docker/scripts/perc-devctl.py qa-deploy-webui— RESULT:OK./opt/Percussion/jetty/StopJetty.shthen detachedStartJetty.sh(notdocker restart). Truncatedserver.log.qa-healthagain — RESULT:OK HEALTH:healthy.cd modules/perc-qa-automation/frontend && TEST_CMS_URL=http://127.0.0.1:9993 ADMIN_USERNAME=Admin TEST_DB_TYPE=h2 TEST_PRODUCT=cms rtk npm run test:surface -- --path tests/publishing/designEditionDelete.spec.js— 3 passed (4.5s).Pre-push local code review
Erlang review — PR #5100
Scope
Independent re-review after
1428cb3d(finished job no longer blocks edition delete). I did not author the change.runningJobIdreturns 0 whenIPSPublisherJobStatus.State.isTerminal(), the same predicate asPSPublishingJob.isFinished().getEditionJobIdis unchanged, so the runtime list can still show a completed job.getPublishingJobStatusthrowsIllegalStateExceptionfor an unknown id, and that path is idle. Any other status-lookup failure stays in use. Tests cover a completed job, a cancelled job, an activeWORKINGjob, an unknown id, a failed lookup, and delete throughPSPublishingRuntimeSupport(completed deletes, working is HTTP 409).Nit, non-blocking: the
runningJobIdcomment says "nullis idle". A null edition guid is idle. A null status or null state still returns the job id (treated as in use). The code is the safer behavior.CLI stdout (
mkd-code-review analyze --format markdown)Summary
Machine analysis found 1 finding(s), 0 bug(s).
Scope
Recommendation
approve
Gate
Issues
Issue 1 -- Severity: suggestion
complexity.cognitivearborist-metricslistRuntimeEditionscognitive=23 (max 15), cyclomatic=12 (max 15)Erlang findings (strict gate)
No blocking bugs. The first-pass bug (a finished job still in
m_jobsreturned HTTP 409 for up toREAP_TIME) is fixed on this head.Nit:
PSPublishingRuntimeSupport.runningJobIdjavadoc "nullis idle" does not match a null job status, which stays in use.Preexisting suggestion:
listRuntimeEditionscognitive complexity. Not introduced by this diff. Does not block.Recommendation
approve
Gate