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: preflight check for bacalhau version #338

Merged
merged 5 commits into from
Sep 11, 2024

Conversation

walkah
Copy link
Collaborator

@walkah walkah commented Sep 9, 2024

Summary

Introduces a pre-flight check for resource-provider to check that bacalhau is running and a currently supported version (1.3.2).

Task/Issue reference

Closes: #280

Test plan

  • Run resource provider with bacalhau not running - should fial
  • Run resource provider with bacalhau running but not v1.3.2 (e.g. 1.4.0) - should fail
  • Run resource provider with bacalhau running at 1.3.2 - should run normally.

@walkah walkah requested a review from a team as a code owner September 9, 2024 15:34
@cla-bot cla-bot bot added the cla-signed label Sep 9, 2024
Copy link
Contributor

@bgins bgins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it out, works great! ✨

Left a few comments on the error messages and limiting visibility to the bacalhau package.

One other thing, seeing some noisy logs at start up:

2024/09/09 11:23:27 [DEBUG] GET http://localhost:1234/api/v1/agent/alive
2024/09/09 11:23:27 [ERR] GET http://localhost:1234/api/v1/agent/alive request failed: Get "http://localhost:1234/api/v1/agent/alive": dial tcp [::1]:1234: connect: connection refused
2024/09/09 11:23:27 [DEBUG] GET http://localhost:1234/api/v1/agent/alive: retrying in 1s (4 left)
2024/09/09 11:23:28 [ERR] GET http://localhost:1234/api/v1/agent/alive request failed: Get "http://localhost:1234/api/v1/agent/alive": dial tcp [::1]:1234: connect: connection refused
2024/09/09 11:23:28 [DEBUG] GET http://localhost:1234/api/v1/agent/alive: retrying in 2s (3 left)
2024/09/09 11:23:30 [ERR] GET http://localhost:1234/api/v1/agent/alive request failed: Get "http://localhost:1234/api/v1/agent/alive": dial tcp [::1]:1234: connect: connection refused
2024/09/09 11:23:30 [DEBUG] GET http://localhost:1234/api/v1/agent/alive: retrying in 4s (2 left)
2024/09/09 11:23:34 [DEBUG] GET http://localhost:1234/api/v1/agent/version

Are these coming from retryablehttp? Could we suppress them?

pkg/executor/bacalhau/bacalhau.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/bacalhau.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/client.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/client.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/client.go Outdated Show resolved Hide resolved
pkg/executor/bacalhau/client.go Outdated Show resolved Hide resolved
@walkah
Copy link
Collaborator Author

walkah commented Sep 9, 2024

Are these coming from retryablehttp? Could we suppress them?

They are, yeah. I think LOG_LEVEL set not to debug (which we do in ./stack) should quiet it.

@narbs91 narbs91 merged commit c9a349c into main Sep 11, 2024
4 checks passed
@narbs91 narbs91 deleted the walkah/feat-check-bacalhau-version branch September 11, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check Bacalhau version before running resource provider
3 participants