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

feat: update job logs as artifact on agent serve #183

Merged
merged 18 commits into from
Feb 7, 2023

Conversation

lucaspin
Copy link
Contributor

@lucaspin lucaspin commented Feb 6, 2023

Currently, the agent only uploads job logs as an artifact if the job comes through the sync protocol (agent start). This pull request changes the agent, so it also uploads an artifact for the job logs (if needed) when the request comes through the agent's HTTP server.

It changes the HTTP server to use the SEMAPHORE_AGENT_UPLOAD_JOB_LOGS environment variable in job request to control whether logs should be uploaded as an artifact. The possible values are the same ones as the self-hosted agent configuration.

Additional changes

A new max_size_in_bytes field is added to the logger field in the job request object as well. If that field is not present (=0), we set it to 16MB. That field allows us to decrease the threshold for what a trimmed log is considered for a cloud job (which we intend to do) without changing the agent again.

@lucaspin lucaspin merged commit f3b5368 into master Feb 7, 2023
@lucaspin lucaspin deleted the upload-logs-as-artifact-for-cloud branch February 7, 2023 20:10
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