bacalhau-project / bacalhau

Compute over Data framework for public, transparent, and optionally verifiable computation
https://docs.bacalhau.org
Apache License 2.0
643 stars 85 forks source link

refactor: return client version by default #3968

Closed frrist closed 2 months ago

frrist commented 2 months ago

New Behavior:


> bacalhau version
 CLIENT                UPDATE MESSAGE 
 v1.3.0-44-g2b688b95b                 

> bacalhau version --client=false
Flag --client has been deprecated, use --server
 CLIENT                SERVER  LATEST  UPDATE MESSAGE 
 v1.3.0-44-g2b688b95b  v1.3.0  v1.3.0                 

> bacalhau version --client=true
Flag --client has been deprecated, use --server
 CLIENT                UPDATE MESSAGE 
 v1.3.0-44-g2b688b95b                 

> .bacalhau version --server
 CLIENT                SERVER  LATEST  UPDATE MESSAGE 
 v1.3.0-44-g2b688b95b  v1.3.0  v1.3.0                 

> bacalhau version --server=false
 CLIENT                UPDATE MESSAGE 
 v1.3.0-44-g2b688b95b                 
coderabbitai[bot] commented 2 months ago

[!IMPORTANT]

Auto Review Skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
aronchick commented 2 months ago

I don't think we need this change given you introduced a short timeout when querying server version here #3964

It might make sense to give it sometime and see if that changes hits the sweet spot of improved user experience where they can easily know if their clients are outdated, and not hang if client is disconnected. Feel free to reduce the 3 seconds timeout to 2 seconds if you believe it is not short enough

@aronchick what do you think?

I'll be honest, I can see both sides.

Is there a scenario where someone should be able to get the version of a binary without connecting to a server? yes - i just downloaded it.

Is the function of our client app ONLY to connect to the server? Yes, so it makes sense we do that too.

I guess the ideal user experience, on first download would for this to come back in 1 second.

 CLIENT  SERVER  LATEST  UPDATE MESSAGE
 v1.3.0  Disconnected  v1.3.0

And the moment API_Server (or whatever) is set -

 CLIENT  SERVER  LATEST  UPDATE MESSAGE
 v1.3.0  v1.3.0  v1.3.0

We should also have a bacalhau connect <IP_ADDRESS> command....

wdbaruni commented 2 months ago

I like the suggestion of giving feedback to the user that we couldn't figure out the server's version because it was disconnected. So reducing the timeout from 3 seconds to possibly 1 second should do the trick instead of only retrieving the client version by default