Repository navigation
Use a dagger core command as readiness probe - #8219
Merged
Merged
Conversation
matipan
force-pushed
the
helm-engine-healthcheck
branch
from
August 23, 2024 18:11
cde30ed to
aa89a19
Compare
TomChv
approved these changes
Aug 26, 2024
gerhard
reviewed
Aug 27, 2024
| - sh | ||
| - -exc | ||
| - |- | ||
| dagger core container with-new-file --contents "We are ready" --path "/tmp/ready" file --path "/tmp/ready" contents |
Contributor
There was a problem hiding this comment.
This is a great, much needed change!
Instead of using dagger core which is unstable and likely to change - see #8135 - I propose that we use this command instead: echo "{ directory { id } }" | dagger query
FTR:
❯ echo "{ directory { id } }" | time dagger query
Setup tracing at https://dagger.cloud/traces/setup. To hide: export SHUTUP=1
✔ connect 0.7s
✔ cache request: mkfile /schema.json 0.0s
✔ load cache: mkfile /schema.json 0.0s
✔ cache request: blob://sha256:b618d3d179857032b7a416ad037342be687116289c0fd1cc8b4a39a9f2d65d4e 0.0s
✔ load cache: blob://sha256:b618d3d179857032b7a416ad037342be687116289c0fd1cc8b4a39a9f2d65d4e 0.0s
✔ moduleSource(refString: "."): ModuleSource! 0.0s
✔ ModuleSource.kind: ModuleSourceKind! 0.0s
✔ directory: Directory! 0.0s
{
"directory": {
"id": "ChV4eGgzOmMwMmVlMmZiODlhYjRmMDQSSgoVeHhoMzpjMDJlZTJmYjg5YWI0ZjA0EjESDQoJRGlyZWN0b3J5GAEaCWRpcmVjdG9yeUoVeHhoMzpjMDJlZTJmYjg5YWI0ZjA0"
}
}
dagger query 0.16s user 0.14s system 20% cpu 1.492 totalAfter dagger core stabilises, we can easily switch to it.
Contributor
There was a problem hiding this comment.
I'd add to this - we don't even need to do a full operation at all, we could just do { version } as a query. We're really just interested if the dagger server is running at all, I don't think we need to simulate an operation here?
Contributor
There was a problem hiding this comment.
That's a good idea, I like that!
jedevc
approved these changes
Aug 27, 2024
Contributor
|
Potentially worth a changelog entry? Up to ya 🎉 |
Signed-off-by: Matias Pan <[email protected]>
Nice idea Justin 👍 Signed-off-by: Gerhard Lazu <[email protected]>
Signed-off-by: Matias Pan <[email protected]>
matipan
force-pushed
the
helm-engine-healthcheck
branch
from
August 27, 2024 18:01
3caa232 to
50a6f28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #6100 (comment) that using buildctl as the healthcheck for the engine is essentially a no-op. There is an on-going discussion here of what the ideal healthcheck for the engine would be, we haven't yet reached a conclusion but now that we have the
daggerCLI in the engine image and thecoresubcommand we can use something more suitable on our helm chart. I don't think this should be considered as "the way" to check for engine readiness, but its the best I could come up with and what we were doing was already broken.Internally we were doing something similar to this already, but taking care of downloading the CLI and using
dagger query. Now with the CLI in the engine image and thecoresubcommand we can simplify it and officially release it here.There were many possible
dagger corecommands I could use. I chose one that would force the engine to do work but not depend on external registry or networks.