fix(#146): make the Third Party application boot (remove dead ResourceRepository chain + SB4/Jackson3 fixes)#179
Merged
Merged
Conversation
…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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
openespi-thirdpartyapplication could not start. This makes it boot, separated out from the notification feature PR (#178).Root cause + fixes
ResourceRepositoryconsumer removed.ResourceRESTServiceImpl/UpdateRESTServiceImplwere eager@Servicebeans whose only role was to inject the unimplementedResourceRepository; nothing live consumed them, yet they aborted startup (UnsatisfiedDependencyException). Removed the interfaces + impls + their two unit tests.RestClient.Builderbean added —NotificationServiceImpl(scanned from common) injects it and it isn't autoconfigured here.spring.jackson.serialization.write-dates-as-timestamps(not aSerializationFeaturein Jackson 3 / Spring Boot 4; it failed property binding).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-thirdpartysuite: 45 run, 0 failures.🤖 Generated with Claude Code