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

Support for GCS private conda registry. #1922

Closed
clement-chaneching opened this issue Aug 27, 2024 · 7 comments · Fixed by conda/rattler#845
Closed

Support for GCS private conda registry. #1922

clement-chaneching opened this issue Aug 27, 2024 · 7 comments · Fixed by conda/rattler#845
Labels
✨ enhancement Feature request

Comments

@clement-chaneching
Copy link
Contributor

Problem description

Hello,

I would like Pixi to support private conda registry hosted on GCS buckets.
I had actually pushed a PR to rattler a few months ago to have this GCS Middleware support.

I used to test with something like this but never merged it.

Because of some changes to the rattler_repodata_gateway/gateway crate, I now have:

ERROR resolve_conda{group=default platform=linux-64}:get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "gcs", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("blunomy-conda-registry")), port: None, path: "/", query: None, fragment: None }, name: None } platform=Linux64}: rattler_repodata_gateway::gateway: error='gcs' is not a supported scheme
  × 'gcs' is not a supported scheme

And I m not sure how to make it work anymore.
Could you have a look and try to support :

[tool.pixi.project]
channels = ["conda-forge", "gcs://<private-registry>"]
platforms = ["linux-64"]

[tool.pixi.dependencies]
package= { version = "==1.0.0", channel = "gcs://<private-registry>"}

Thanks for your help!

@clement-chaneching clement-chaneching added the ✨ enhancement Feature request label Aug 27, 2024
@tdejager
Copy link
Contributor

I think this makes sense, we should do the changes in the gateway I think. Is it normat to use the gcs:// url scheme for this :)?

@clement-chaneching
Copy link
Contributor Author

I think so for google-cloud-storage :)
I have hardcoded this in crates/rattler_networking/src/gcs_middleware.rs:
if req.url().scheme() == "gcs" {

But feel free to change if needed!

@baszalmstra
Copy link
Contributor

We will have to add this to the gateway indeed! Ill try to take a look at that this week!

@baszalmstra
Copy link
Contributor

Docker support is not yet completely finalized in the conda ecosystem. There is an active Conda Enhancement Proposal that covers this use case. We might want to wait until that has been finalized.

@wolfv
Copy link
Member

wolfv commented Sep 3, 2024

We do have or had support for the oci:// scheme though. It's even documented :)

@baszalmstra
Copy link
Contributor

I read this completely wrong, I was under the impression that you wanted to use the docker registry API.

I drafted a fix in conda/rattler#845 that hopefully works for your case.

@clement-chaneching
Copy link
Contributor Author

clement-chaneching commented Oct 14, 2024

Hello @baszalmstra

This issue should be reopened because it doesnt work as expected:
Image

So now the "gcs" scheme is supported (not getting × 'gcs' is not a supported scheme anymore, but i m getting URL scheme is not allowed.

The gcs URL should be converted later in the gcs_middleware.rs to https://storage.googleapis.com to handle the auth.

I have also pushed a PR to add the GCS middleware to pixi (cannot test it yet)
Could you check that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@tdejager @wolfv @baszalmstra @clement-chaneching and others