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

Windows fails to fetch auth for oci images in CI #53

Open
abrisco opened this issue Feb 5, 2024 · 1 comment
Open

Windows fails to fetch auth for oci images in CI #53

abrisco opened this issue Feb 5, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@abrisco
Copy link
Owner

abrisco commented Feb 5, 2024

(12:00:44) ERROR: An error occurred during the fetch of repository 'rules_helm_test_container_base':
   Traceback (most recent call last):
	File "C:/bzl/3v3tqmyi/external/rules_oci/oci/private/pull.bzl", line 449, column 55, in _oci_alias_impl
		manifest, _, digest = downloader.download_manifest(rctx.attr.identifier, "mf.json")
	File "C:/bzl/3v3tqmyi/external/rules_oci/oci/private/pull.bzl", line 322, column 74, in lambda
		download_manifest = lambda identifier, output: _download_manifest(rctx, state, identifier, output),
	File "C:/bzl/3v3tqmyi/external/rules_oci/oci/private/pull.bzl", line 265, column 23, in _download_manifest
		result = _download(rctx, state, identifier, output, "manifests", allow_fail = True)
	File "C:/bzl/3v3tqmyi/external/rules_oci/oci/private/pull.bzl", line 230, column 22, in _download
		auth = _get_token(rctx, state, rctx.attr.registry, rctx.attr.repository)
	File "C:/bzl/3v3tqmyi/external/rules_oci/oci/private/pull.bzl", line 137, column 24, in _get_token
		pattern = _get_auth(rctx, state, registry)
	File "C:/bzl/3v3tqmyi/external/rules_oci/oci/private/pull.bzl", line 109, column 59, in _get_auth
		pattern = _fetch_auth_via_creds_helper(rctx, host_raw, config["credsStore"])
	File "C:/bzl/3v3tqmyi/external/rules_oci/oci/private/pull.bzl", line 189, column 13, in _fetch_auth_via_creds_helper
		fail("credential helper failed: \nSTDOUT:\n{}\nSTDERR:\n{}".format(result.stdout, result.stderr))
Error in fail: credential helper failed: 
STDOUT:

STDERR:
java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("C:\bzl\3v3tqmyi\external\rules_helm_test_container_base\wincred.sh" https://index.docker.io/v1/): %1 is not a valid Win32 application.
 (error: 193)
@abrisco
Copy link
Owner Author

abrisco commented Feb 5, 2024

I believe this is caused by rules_oci writing a bash script in a repository rule here: https://github.com/bazel-contrib/rules_oci/blob/v1.7.0/oci/private/pull.bzl#L188-L210

This should instead be a batch script so windows hosts can natively understand how to run it.

@abrisco abrisco added bug Something isn't working help wanted Extra attention is needed labels Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant