Skip to content

fix(publish): Status lists finished failed jobs (#4807) - #4818

Merged
natechadwick-intsof merged 2 commits into
mainfrom
fix/issue-4807-status-failed-jobs
Sep 24, 2026
Merged

natechadwick-intsof merged 2 commits into
mainfrom
fix/issue-4807-status-failed-jobs

Conversation

@natechadwick-intsof

@natechadwick-intsof natechadwick-intsof commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Parent: #4531. Slice #4807.

GET /sitemanage/pubstatus/current only walked in-memory active job ids. Those ids are reaped about an hour after the job ends, so Completed with failures, aborted, and publish-server DB reconfigure (RESTARTNEEDED) disappeared from PublishingShell Status before an operator could open them. buildCurrentJobs now keeps live jobs and also merges persisted failures from the last day. Clean Completed and user-cancelled jobs stay off the current list (they remain in Logs). A live failed job is not duplicated by its persisted row, so the publisher error text is kept while the job is still in memory.

Operator: Grok: night-issue-prs (model grok-4.6)

Fixes #4807

Test plan

  • PSSitePublishStatusServiceJobDetailTest — persisted failure with empty active ids; aborted + restart-needed; running job plus dropped failure; no duplicate when the live id is still present; site-scoped finder is not the all-sites finder; completed and cancelled rows are dropped
  • Playwright surface tests/publishing/statusFailedJobs.spec.js on H2 QA (1 passed). Completed-with-failures row visible, no Stop on that row, Stop still on the running row, detail shows edition and error text. console-clean=yes
  • Human UAT not run in this agent session

Product documentation

  • Updated product-docs/8.2/admin/publishing.md (Status current list and job detail)
  • N/A

Pre-PR Maven verification

modules_built=projects/sitemanage

cd projects/sitemanage && rtk mvn clean install

BUILD SUCCESS. Tests run: 3065, Failures: 0, Errors: 0, Skipped: 125. No new compiler warnings from this change (existing module javadoc/raw-type warnings unchanged).

downstream_checked=none (no public type made final/sealed; no cross-module signature change)

UI proof (C5)

  • python3 docker/scripts/perc-devctl.py qa-up → TEST_CMS_URL=http://127.0.0.1:9993 QA_CONTAINER=perc-matrix-cms-h2
  • qa-health RESULT:OK HTTP:200 HEALTH:healthy
  • qa-deploy-war-jars --restart-jetty then qa-health healthy (sitemanage SNAPSHOT plus matching perc-system/rest/extensions-workflow)
  • qa-deploy-webui so the cell SPA includes Status job test ids already on main, then qa-health healthy
  • cd modules/perc-qa-automation/frontend && npm run test:surface -- --path tests/publishing/statusFailedJobs.spec.js with TEST_CMS_URL, ADMIN_USERNAME=Admin, TEST_DB_TYPE=h2, TEST_PRODUCT=cms → 1 passed
  • console-clean=yes (spec pageerror/console error listeners)
  • server.log-clean=yes (no ERROR/FATAL in the post-deploy server.log tail for this run)

Pre-push local code review

Summary

Machine analysis found 2 finding(s), 0 bug(s).

Scope

  • Base: origin/main
  • Head: HEAD
  • Files: 5 analyzed
  • In-diff: 1 finding(s); preexisting: 1
  • Persona: erlang 0.1.1
  • Persona source: /home/nate/.local/share/mkd/agents/erlang

Recommendation

approve

Gate

  • Blocking bugs: 0
  • May commit/push: yes

Issues

Issue 1 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishStatusService.java:366 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 366)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 2 -- Severity: suggestion

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishStatusService.java:388 (in-diff)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function buildCurrentJobs cognitive=17 (max 15), cyclomatic=11 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs-erlang.

…op (#4807)

Current publish status only walked in-memory active job ids, so completed-with-failures, aborted, and restart-needed jobs disappeared about an hour after they ended. Merge last-day persisted failures into that list and keep clean completed and cancelled jobs off it.

> Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs.
Record the mkd-code-review advisory pass (0 in-diff bugs) before merge.

> Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs-erlang.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

LGTM. mkd-code-review 0.1.18 pack percussion, persona erlang 0.1.1, base origin/main. Gate PASS: 0 in-diff bugs. Preexisting paths.hardcoded_sep in getJobDetails is out of scope. Cognitive complexity on buildCurrentJobs is a suggestion only. Behavioral tests, Playwright surface, and product-docs are in the diff. Same-login APPROVE is rejected, so this is the review comment. Report: docs/ai-generated/code-reviews/pr-4818-erlang.md (867231c).

Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs-erlang.

@natechadwick-intsof
natechadwick-intsof merged commit 66e76f8 into main Sep 24, 2026
4 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-4807-status-failed-jobs branch September 24, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.6 Session model grok-4.6 operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue 4531 slice 28: PublishingShell status lists failed jobs not only active ids

1 participant