Repository navigation
Conversation
GOPACS keeps listing announcements as ANNOUNCEMENT_OPEN after their problem period has ended, but the EAN effectivity endpoint rejects them with HTTP 400 MSG_PROBLEM_NOT_OPEN. On production this produced a failed effectivity call and a warning for every such announcement on every poll. Filter them out before checking effectivity. Also log the response body when the announcement or effectivity fetch fails, so the GOPACS error code shows up in the warning.
wborn
left a comment
There was a problem hiding this comment.
This is an initial AI-assisted review.
The expiry filter skips effectivity lookups once the problem period ends and keeps ongoing announcements eligible after the bid window closes. The regression test covers the exact expiry boundary. Two non-blocking follow-ups remain for error logging and the integration guide. CI passed formatting, build, and tests.
| "Failed to fetch announcements: HTTP " | ||
| + response.getStatus() | ||
| + ": " | ||
| + response.readEntity(String.class)); |
There was a problem hiding this comment.
Could both GOPACS warnings follow DistroGopacsHandler and always log the HTTP status, with a short error body when available? If readEntity(String.class) throws, the current code skips the warning and loses the status. This was reproduced with RESTEasy 7.0.5.Final using a 503 response with no entity stream. Changed code · Distro logging pattern
| announcements.stream() | ||
| .filter(a -> ANNOUNCEMENT_TYPE_CONGESTIONMANAGEMENT.equals(a.getType())) | ||
| .filter(a -> ANNOUNCEMENT_STATE_OPEN.equals(a.getAnnouncementState())) | ||
| .filter(a -> !hasProblemPeriodEnded(a, now)) |
There was a problem hiding this comment.
Please update the integration guide’s selection and polling rules to say that expired problem periods are skipped even when GOPACS still lists the announcements as open. If every announcement in the response has expired, the poll clears the active announcement and resets the bid status to NONE. Changed code · Integration guide
The GOPACS redispatch poller logged
Failed to fetch EAN effectivity for announcement ...: HTTP 400on production. GOPACS keeps listing announcements asANNOUNCEMENT_OPENafter their problem period ends, but the effectivity endpoint rejects them withMSG_PROBLEM_NOT_OPEN. At the time of testing, 20 of the 40 open announcements were past their problem period, so every poll made 20 failing calls.The handler now drops announcements whose problem period has ended before it checks effectivity. Non-200 warnings for the announcement and effectivity fetches now include the response body, so GOPACS error codes show up in the log.
Tested against the live GOPACS API. Effectivity returns 200 while the problem period is running, including after the bid window has closed, and 400
MSG_PROBLEM_NOT_OPENonce the problem period has ended.:ems:testpasses, including the newGOPACSRedispatchHandlerTest.