Skip to content

fix(#146): make the Third Party application boot (remove dead ResourceRepository chain + SB4/Jackson3 fixes)#179

Merged
dfcoffin merged 1 commit into
mainfrom
fix/146-tp-bringup
Jun 8, 2026
Merged

fix(#146): make the Third Party application boot (remove dead ResourceRepository chain + SB4/Jackson3 fixes)#179
dfcoffin merged 1 commit into
mainfrom
fix/146-tp-bringup

Conversation

@dfcoffin

@dfcoffin dfcoffin commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The openespi-thirdparty application could not start. This makes it boot, separated out from the notification feature PR (#178).

Root cause + fixes

  • Dead ResourceRepository consumer removed. ResourceRESTServiceImpl/UpdateRESTServiceImpl were eager @Service beans whose only role was to inject the unimplemented ResourceRepository; nothing live consumed them, yet they aborted startup (UnsatisfiedDependencyException). Removed the interfaces + impls + their two unit tests.
  • RestClient.Builder bean added — NotificationServiceImpl (scanned from common) injects it and it isn't autoconfigured here.
  • Jackson 3 property fix — removed spring.jackson.serialization.write-dates-as-timestamps (not a SerializationFeature in Jackson 3 / Spring Boot 4; it failed property binding).
  • dev-mysql ddl-auto=update — the TP ships no Flyway migrations yet, so let Hibernate create the schema for local testing. (Full TP Flyway/schema bring-up remains under TP bring-up: missing JAXB Atom marshaller, narrow component scan, and broader OAuth2-client wiring gaps #146.)

Verification

TP boots on :8082; openespi-thirdparty suite: 45 run, 0 failures.

🤖 Generated with Claude Code

…eRepository chain + SB4/Jackson3 fixes)

The Third Party app could not start. Root cause + fixes:

- Removed the dead ResourceRESTService/UpdateRESTService chain — two eagerly-created
  but otherwise-unused @service beans whose only purpose was to inject the
  unimplemented ResourceRepository (no live code consumed them), which aborted
  context initialization with an UnsatisfiedDependencyException.
- Provide a RestClient.Builder bean (NotificationServiceImpl, scanned from common,
  injects it; not autoconfigured in this context).
- Remove the invalid spring.jackson serialization.write-dates-as-timestamps property
  (not a SerializationFeature in Jackson 3 / Spring Boot 4).
- dev-mysql: hibernate.ddl-auto=update so the TP schema is created locally (the TP
  ships no Flyway migrations yet; full TP schema/Flyway bring-up remains under #146).

Verified: the TP boots on :8082; openespi-thirdparty suite 45 run, 0 failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dfcoffin added a commit that referenced this pull request Jun 8, 2026
…er + TP receiver)

Data Custodian (sender):
- NotificationService.notifyBatchList(uri, resourceUris): synchronous send — marshal
  BatchListDto via BatchListXmlCodec, POST application/atom+xml; validates the URI and
  >=1 resource (blanks dropped); surfaces failures to the caller.
- BatchNotificationController (/custodian/notifications GET + /send POST): admin enters
  the Third Party notify URL (suggested from registered ApplicationInformation endpoints)
  and the BatchList resource URLs (ApplicationInformation, Authorization feed, Authorization
  entry, Subscription); flash success/failure. ROLE_CUSTODIAN. Dashboard card + nav item.

Third Party (receiver), corrected to the ESPI flow:
- For each <resource> URL the TP, as an OAuth client, performs an authenticated GET on the
  URL to obtain the data, then hands it to import (per-resource failures logged, don't abort
  the batch). Per-resource token selection = #146; unmarshal/persist of the payload = #89.
- Inbound POST /espi/1_1/Notification is permitAll: the DC delivers without an OAuth token
  (transport-secured by TLS); the token is used only on the outbound fetch.
- Removed the legacy sftp:// branch + Runtime.exec (ESPI no longer permits SFTP; injection
  risk). Unparseable payload -> 400.

Verified live (with the #146/#179 TP bring-up applied): DC admin notify page -> DC POSTs
BatchList -> TP receives, persists the BatchList, attempts an authenticated GET per resource
(DC returns 401 until a token is wired) -> "Successfully processed notification with 4
resources". Tests: common 4/0, datacustodian 160/0, thirdparty 47/0.

(TP boot bring-up split into #146/#179.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit c071c96 into main Jun 8, 2026
4 checks passed
@dfcoffin dfcoffin deleted the fix/146-tp-bringup branch June 8, 2026 20:46
dfcoffin added a commit that referenced this pull request Jun 8, 2026
…er + TP receiver) (#178)

Data Custodian (sender):
- NotificationService.notifyBatchList(uri, resourceUris): synchronous send — marshal
  BatchListDto via BatchListXmlCodec, POST application/atom+xml; validates the URI and
  >=1 resource (blanks dropped); surfaces failures to the caller.
- BatchNotificationController (/custodian/notifications GET + /send POST): admin enters
  the Third Party notify URL (suggested from registered ApplicationInformation endpoints)
  and the BatchList resource URLs (ApplicationInformation, Authorization feed, Authorization
  entry, Subscription); flash success/failure. ROLE_CUSTODIAN. Dashboard card + nav item.

Third Party (receiver), corrected to the ESPI flow:
- For each <resource> URL the TP, as an OAuth client, performs an authenticated GET on the
  URL to obtain the data, then hands it to import (per-resource failures logged, don't abort
  the batch). Per-resource token selection = #146; unmarshal/persist of the payload = #89.
- Inbound POST /espi/1_1/Notification is permitAll: the DC delivers without an OAuth token
  (transport-secured by TLS); the token is used only on the outbound fetch.
- Removed the legacy sftp:// branch + Runtime.exec (ESPI no longer permits SFTP; injection
  risk). Unparseable payload -> 400.

Verified live (with the #146/#179 TP bring-up applied): DC admin notify page -> DC POSTs
BatchList -> TP receives, persists the BatchList, attempts an authenticated GET per resource
(DC returns 401 until a token is wired) -> "Successfully processed notification with 4
resources". Tests: common 4/0, datacustodian 160/0, thirdparty 47/0.

(TP boot bring-up split into #146/#179.)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant