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

agent service is started successfully but crashes during job when secrets.json is incorrect #511

Open
brainrake opened this issue Apr 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@brainrake
Copy link
Contributor

Description

Agent service starts successfully but then crashes on job if secrets.json has incorrect layout.

To Reproduce

Example secrets.json:

{ "example": { "condition": ..., "data": "FAIL" } }

Expected behavior

Crash on service startup.

Logs

On job in web ui:

FatalError {fatalErrorMessage = "Could not parse secrets file as configured on agent."} (worker: ExitFailure 1)

Platform / Version

NixOS x86_64-linux, hercules-ci-agent 0.9.11

@brainrake brainrake added the bug Something isn't working label Apr 12, 2023
@roberth
Copy link
Member

roberth commented Apr 12, 2023

secrets.json is intentionally a mutable file, so checking it at startup is not a guarantee that it will keep working.

"Strictness" like that is a double-edged sword. It can help find problems early, but it also stops a larger system from working at all. Unless it only affects half a cluster? Is that even realistic?

I would accept a PR, but prefer to solve the root cause, which is the need to write and deploy a local file at all. EDIT: although that needs work to be done on my end.

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

No branches or pull requests

2 participants