Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly writes events.json with null entry, despite being unauthorized #37

Open
jchesterpivotal opened this issue Oct 20, 2018 · 0 comments
Assignees
Labels

Comments

@jchesterpivotal
Copy link
Owner

Problem

Job logs/events are often private, even if the overall pipeline is public. In the original events.log implementation, receiving a "not authorized" message from the ATC would lead to skipping writing the events.log file.

Because the logic for events.json follows a distinct path, it is not correctly skipping. Instead, it collects events and stores them in a null, which is faithfully written out to disk. This is because whereas the events.log file is handled in a single specialised method, events.json is handled by two routines following the convention of other endpoints: a fetch method and a write method.

The presence of an incomplete events.json file confuses downstream tools which expect the existence/non-existence of the file to signal whether the events could be retrieved.

Solution

Stop doing that. The logic which fetches events for encoding as a JSON array embedded in events.json should somehow signal that the file is not to be written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant