Skip to content

Long-standing inconsistencies with the z/OS log API request handling - #462

Merged
frankgiordano merged 11 commits into
mainfrom
utc
Apr 25, 2026
Merged

frankgiordano merged 11 commits into
mainfrom
utc

Conversation

@frankgiordano

@frankgiordano frankgiordano commented Apr 25, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR fixes long-standing inconsistencies with the z/OS log API request handling.

The z/OS log request URL is now built more accurately, and the SDK no longer sends a client-generated time parameter unless the caller explicitly provides a startTime.

Previously, the SDK always added a time query parameter when calling the z/OS log API. When startTime was not provided, the default value was generated on the client side using the local/runtime clock. This caused two issues:

  1. Additional query parameters could be appended incorrectly depending on the input combination.

  2. The generated client-side time could be slightly ahead of the z/OSMF server time, causing z/OSMF to reject the request with:

    The time or timestamp specified is a future time. Only a past time point is valid.
    

Internal testing with formatter as UTC-compatible exposed the remaining timing issue: even a correctly formatted UTC timestamp can still be rejected if the client clock is ahead of the z/OSMF server clock.

The fix now omits the time parameter unless startTime is explicitly provided. This lets z/OSMF use its own server-side current time, which avoids client/server clock drift issues and aligns with the documented API behavior.

The query-string construction was also simplified by collecting optional query parameters and joining them with &, preventing malformed URLs when multiple optional parameters are supplied.

@frankgiordano frankgiordano self-assigned this Apr 25, 2026
@frankgiordano frankgiordano added the bug Something isn't working label Apr 25, 2026
@frankgiordano
frankgiordano marked this pull request as ready for review April 25, 2026 03:30
Refactor URL building for z/OS log command to use a list for query parameters. This change improves clarity and maintains optional parameters.

Signed-off-by: Frank Giordano <giofr01@yahoo.com>
Updated Javadoc comments for the time parameter to clarify its usage and format.

Signed-off-by: Frank Giordano <giofr01@yahoo.com>
Signed-off-by: Frank Giordano <giofr01@yahoo.com>
@frankgiordano frankgiordano changed the title Use UTC Instant for z/OS Log Default Timestamp Long-standing inconsistencies with the z/OS log API request handling Apr 25, 2026
Signed-off-by: Frank Giordano <giofr01@yahoo.com>
Signed-off-by: Frank Giordano <giofr01@yahoo.com>
@frankgiordano
frankgiordano merged commit 9289315 into main Apr 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant