farcaller/nixhelm

Support for OCI charts.

marcusramberg opened this issue ยท 2 comments

the helmupdater script assumes the repo URL is http based, so it gets very unhappy if you try to provide a OCI url like oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller

Traceback (most recent call last):

  File "/nix/store/v77qq44nrsvmxm1vpn2x627ds232fbf9-python3.10-helmupdater-0.1.0/bin/.helmupdater-wrapped", line 9, in <module>
    sys.exit(app())

  File "/nix/store/v77qq44nrsvmxm1vpn2x627ds232fbf9-python3.10-helmupdater-0.1.0/lib/python3.10/site-packages/helmupdater/__init__.py", line 177, in init
    update_one_chart(repo_name, chart_name, local_chart, commit=False)

  File "/nix/store/v77qq44nrsvmxm1vpn2x627ds232fbf9-python3.10-helmupdater-0.1.0/lib/python3.10/site-packages/helmupdater/__init__.py", line 58, in update_one_chart
    index_req = requests.get(f'{repo_url}index.yaml')

  File "/nix/store/5yalgwpfsg6rlfhwx78rdl03gg7pysyh-python3.10-requests-2.28.2/lib/python3.10/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)

  File "/nix/store/5yalgwpfsg6rlfhwx78rdl03gg7pysyh-python3.10-requests-2.28.2/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)

  File "/nix/store/5yalgwpfsg6rlfhwx78rdl03gg7pysyh-python3.10-requests-2.28.2/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)

  File "/nix/store/5yalgwpfsg6rlfhwx78rdl03gg7pysyh-python3.10-requests-2.28.2/lib/python3.10/site-packages/requests/sessions.py", line 695, in send
    adapter = self.get_adapter(url=request.url)

  File "/nix/store/5yalgwpfsg6rlfhwx78rdl03gg7pysyh-python3.10-requests-2.28.2/lib/python3.10/site-packages/requests/sessions.py", line 792, in get_adapter
    raise InvalidSchema(f"No connection adapters were found for {url!r}")

requests.exceptions.InvalidSchema: No connection adapters were found for 'oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller/index.yaml'

status update: I'm working on this. The plan is to rewrite the updater in go and reuse the helm code to stop second-guessing.

Ok, now it's actually happening ๐Ÿ˜„

I've rewritten nixdockertag in go now, and that's pretty much all the machinery required to support the OCI in here as well.