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

[Merged by Bors] - feat: fvm API Client and updated type definitions #3566

Conversation

EstebanBorai
Copy link
Contributor

Provides the FVM API Client which serves as the Channel Manager.
Also provides unit tests for Channel and updates type definitions.

@EstebanBorai EstebanBorai changed the title feat: fvm API Client and upadated type definitions feat: fvm API Client and updated type definitions Sep 29, 2023
@EstebanBorai EstebanBorai force-pushed the 3565-hub-channel-manager-api-client branch 2 times, most recently from 8d22fe5 to adc2ca8 Compare September 29, 2023 17:30
crates/fluvio-hub-util/src/fvm/api.rs Outdated Show resolved Hide resolved
crates/fluvio-hub-util/src/fvm/api.rs Show resolved Hide resolved
crates/fluvio-hub-util/src/fvm/api.rs Outdated Show resolved Hide resolved
crates/fluvio-hub-util/src/fvm/api.rs Outdated Show resolved Hide resolved

/// Builds the URL to the Hub API for fetching a [`PackageSet`] using the
/// [`Client`]'s `api_url`.
fn make_fetch_package_set_url<S: AsRef<str>>(
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems like separate util?

Copy link
Contributor

Choose a reason for hiding this comment

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

concern that this URL has too many nested so make it hard to maintain.
name, channel, arch seems to be qualifier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This builds the URL for the request separately so it can be isolated when testing, is strongly tied to the client given that is only used for this request.

Each of the params should be provided by the consumer:

  • Name for the package set to fetch
  • Version/Channel
  • Architecture of the host machine to download compatible binaries

@EstebanBorai EstebanBorai requested a review from sehz September 29, 2023 18:24
@EstebanBorai EstebanBorai force-pushed the 3565-hub-channel-manager-api-client branch from adc2ca8 to 8c9c2e8 Compare September 29, 2023 18:24
crates/fluvio-hub-util/src/fvm/api.rs Outdated Show resolved Hide resolved
@EstebanBorai EstebanBorai force-pushed the 3565-hub-channel-manager-api-client branch from 0abec02 to ee83816 Compare September 29, 2023 19:03
@EstebanBorai EstebanBorai requested a review from sehz September 29, 2023 19:04
Copy link
Contributor

@sehz sehz left a comment

Choose a reason for hiding this comment

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

LGTM. there are couple of AsRef that could be converted to impl but not show stopper

@EstebanBorai
Copy link
Contributor Author

LGTM. there are couple of AsRef that could be converted to impl but not show stopper

Actually lets fix them to have a clean codebase! :D. Thanks @sehz!
f7e1dde

@EstebanBorai EstebanBorai force-pushed the 3565-hub-channel-manager-api-client branch from f7e1dde to d88ebdf Compare September 29, 2023 19:44
@EstebanBorai
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Sep 29, 2023
Provides the FVM API Client which serves as the Channel Manager.
Also provides unit tests for `Channel` and updates type definitions.
@bors
Copy link

bors bot commented Sep 29, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat: fvm API Client and updated type definitions [Merged by Bors] - feat: fvm API Client and updated type definitions Sep 29, 2023
@bors bors bot closed this Sep 29, 2023
@EstebanBorai EstebanBorai deleted the 3565-hub-channel-manager-api-client branch September 29, 2023 21:27
@EstebanBorai EstebanBorai linked an issue Sep 29, 2023 that may be closed by this pull request
@EstebanBorai EstebanBorai linked an issue Oct 11, 2023 that may be closed by this pull request
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hub Channel Manager API Client Fluvio Version Manager
2 participants