-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
modules/nixos: add comin #559
Conversation
That could still be a bit early since i didn't do any release yet. So i was still feeling free to break interfaces ;) But do not hesitate to create issues with features you would like to see. |
How does it make deployment failures visible? Does it make the service fail? I also made the experience that many service upgrades failures can be mitigated by just adding one retry of nixos-rebuild. So it would be cool if it does that. |
I'm planning to provide a Prometheus metrics. Currently, comin reports its status over http and when the
No (it is a daemon).
Noted (that should not be hard to add this option). |
We talked about deployments a bit more recently and looks like we'll switch Sorry for the noise here @nlewo. |
@zowoq no worries and thank you for your explanations. |
The Would need to use http for the status but that doesn't look to be hard to add to our monitoring. {
"Generation": {
"BuildEndedAt": "0001-01-01T00:00:00Z",
"BuildErr": null,
"BuildStartedAt": "0001-01-01T00:00:00Z",
"DrvPath": "",
"EvalEndedAt": "0001-01-01T00:00:00Z",
"EvalErr": null,
"EvalMachineId": "",
"EvalStartedAt": "0001-01-01T00:00:00Z",
"OutPath": "",
"RepositoryStatus": {
"Error": null,
"main_branch_name": "",
"main_commit_id": "",
"main_remote_name": "",
"remotes": null,
"selected_branch_is_testing": false,
"selected_branch_name": "",
"selected_commit_id": "",
"selected_commit_msg": "",
"selected_remote_name": ""
},
"Status": 0
},
"deployment": {
"end_at": "0001-01-01T00:00:00Z",
"error_msg": "",
"generation": {
"BuildEndedAt": "0001-01-01T00:00:00Z",
"BuildErr": null,
"BuildStartedAt": "0001-01-01T00:00:00Z",
"DrvPath": "",
"EvalEndedAt": "0001-01-01T00:00:00Z",
"EvalErr": null,
"EvalMachineId": "",
"EvalStartedAt": "0001-01-01T00:00:00Z",
"OutPath": "",
"RepositoryStatus": {
"Error": null,
"main_branch_name": "",
"main_commit_id": "",
"main_remote_name": "",
"remotes": null,
"selected_branch_is_testing": false,
"selected_branch_name": "",
"selected_commit_id": "",
"selected_commit_msg": "",
"selected_remote_name": ""
},
"Status": 0
},
"operation": "",
"restart_comin": false,
"start_at": "0001-01-01T00:00:00Z",
"status": 0
},
"hostname": "build01",
"is_fetching": false,
"is_running": false,
"repository_status": {
"Error": {},
"main_branch_name": "",
"main_commit_id": "",
"main_remote_name": "",
"remotes": [
{
"fetched": true,
"fetched_at": "2024-03-07T00:57:43.502544262Z",
"main": {
"error_msg": "The branch 'origin/fail' doesn't exist",
"name": "fail"
},
"name": "origin",
"testing": {},
"url": "https://github.com/nix-community/infra.git"
}
],
"selected_branch_is_testing": false,
"selected_branch_name": "",
"selected_commit_id": "",
"selected_commit_msg": "",
"selected_remote_name": ""
}
}
|
d65dfc2
to
61d95bb
Compare
This is an issue in comin which should be fixed by nlewo/comin#14.
Which metrics would you like to collect? |
Thank you!
I think a status/exit code of the most recent deployment and the commit of the last successful deployment would be enough for us.
Yes, we're using prometheus so metrics in that format would be excellent. |
I'll test this on build01 for a bit and also so I have a live machine to work on while I figure out the the http status monitoring. Follow up in #1166. |
Polling the git repo looks much nicer than
autoUpgrade
that we're currently using.I'd like to trial it on build01 but need to address a couple of thing first.