Skip to content

Fix "illegal" characters used in file names in the oc-mirror git repo #344

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

Closed
jchunkins opened this issue Mar 3, 2022 · 14 comments
Closed
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@jchunkins
Copy link
Contributor

Version

client version is not applicable to this issue.

What happened?

Attempting to use go get on a Mac with this git repository resulted in a failure. There are test cases in this project that use file names that are not cross platform compatible (i.e. they use a colon character) which causes errors on the Mac (see below).

What did you expect to happen?

Executing go get in my project should allow me to use code within the oc-mirror project.

How to reproduce it (as minimally and precisely as possible)?

$ go get github.com/openshift/oc-mirror@17ed37d
go: downloading github.com/openshift/oc-mirror v0.1.1-alpha.3.0.20220302141825-17ed37d8943b
go get github.com/openshift/oc-mirror@17ed37d: create zip: pkg/cli/mirror/testdata/v2/single_manifest/blobs/sha256:e8614d09b7bebabd9d8a450f44e88a8807c98a438a2ddd63146865286b132d1b: malformed file path "pkg/cli/mirror/testdata/v2/single_manifest/blobs/sha256:e8614d09b7bebabd9d8a450f44e88a8807c98a438a2ddd63146865286b132d1b": invalid char ':'
pkg/cli/mirror/testdata/v2/single_manifest/manifests/sha256:d31c6ea5c50be93d6eb94d2b508f0208e84a308c011c6454ebf291d48b37df19: malformed file path "pkg/cli/mirror/testdata/v2/single_manifest/manifests/sha256:d31c6ea5c50be93d6eb94d2b508f0208e84a308c011c6454ebf291d48b37df19": invalid char ':'
pkg/image/testdata/v2/index_manifest/manifests/sha256:60f5921e0f6a21a485a0a4e9415761afb5b60814bbe8a6864cb12b90ae24c1d0: malformed file path "pkg/image/testdata/v2/index_manifest/manifests/sha256:60f5921e0f6a21a485a0a4e9415761afb5b60814bbe8a6864cb12b90ae24c1d0": invalid char ':'
pkg/image/testdata/v2/index_manifest/manifests/sha256:9574416689665a82cb4eaf43463da5b6156071ebbec117262eef7fa32b4d7021: malformed file path "pkg/image/testdata/v2/index_manifest/manifests/sha256:9574416689665a82cb4eaf43463da5b6156071ebbec117262eef7fa32b4d7021": invalid char ':'
pkg/image/testdata/v2/index_manifest/manifests/sha256:b8a825862d73b2f1110dd9c5fc0631f47117c7cd99e42efa34244cd82bd6742f: malformed file path "pkg/image/testdata/v2/index_manifest/manifests/sha256:b8a825862d73b2f1110dd9c5fc0631f47117c7cd99e42efa34244cd82bd6742f": invalid char ':'
pkg/image/testdata/v2/index_manifest/manifests/sha256:bab3a6153010b614c8764548f0dbe34c4a7dce4ea278a94713c3e9a936bb74e6: malformed file path "pkg/image/testdata/v2/index_manifest/manifests/sha256:bab3a6153010b614c8764548f0dbe34c4a7dce4ea278a94713c3e9a936bb74e6": invalid char ':'
pkg/image/testdata/v2/index_manifest/manifests/sha256:d15a206e4ee462e82ab722ed84dfa514ab9ed8d85100d591c04314ae7c2162ee: malformed file path "pkg/image/testdata/v2/index_manifest/manifests/sha256:d15a206e4ee462e82ab722ed84dfa514ab9ed8d85100d591c04314ae7c2162ee": invalid char ':'
pkg/image/testdata/v2/single_manifest/manifests/sha256:d31c6ea5c50be93d6eb94d2b508f0208e84a308c011c6454ebf291d48b37df19: malformed file path "pkg/image/testdata/v2/single_manifest/manifests/sha256:d31c6ea5c50be93d6eb94d2b508f0208e84a308c011c6454ebf291d48b37df19": invalid char ':'

Anything else we need to know?

  • As a work around I can use git to clone the repo on my local system (e.g. /path/to/src/github.com/openshift/oc-mirror) and do a replace in the go.mod file to point at my local repo.
replace (
	github.com/apcera/gssapi => github.com/openshift/gssapi v0.0.0-20161010215902-5fb4217df13b
	github.com/openshift/oc-mirror => /path/to/src/github.com/openshift/oc-mirror
)
  • My suggestion would be to either rename your files so they are cross platform compatible (e.g. use a hyphen) or put your test data into an archive and extract it (but only allow the test to run on the platform you intend these tests to work on). I am sure there are other alternatives too.

References

None

@afflom
Copy link
Contributor

afflom commented Mar 4, 2022

Related #199

@afflom
Copy link
Contributor

afflom commented Mar 4, 2022

HI @jchunkins , Thank you for bringing this to our attention. I've linked a related PR where another contributor was preparing to enable oc-mirror development on mac. Would you be able to collaborate with @SDBrett on that or PR your own fix?

@jchunkins
Copy link
Contributor Author

Found another workaround (but have not tested it) based on this comment golang/go#41402 (comment)

You can exclude directories containing test data and other large files by placing a go.mod file (even an empty one) at the top of it.

@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 7, 2022
@openshift-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 7, 2022
@openshift-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this as completed Aug 6, 2022
@openshift-ci
Copy link

openshift-ci bot commented Aug 6, 2022

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jchunkins
Copy link
Contributor Author

/reopen

The offending files are still present, so this is probably still relevant

@openshift-ci
Copy link

openshift-ci bot commented Aug 22, 2022

@jchunkins: Reopened this issue.

In response to this:

/reopen

The offending files are still present, so this is probably still relevant

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot reopened this Aug 22, 2022
@openshift-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this as completed Sep 22, 2022
@openshift-ci
Copy link

openshift-ci bot commented Sep 22, 2022

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jchunkins
Copy link
Contributor Author

/reopen

@openshift-ci openshift-ci bot reopened this Aug 2, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 2, 2023

@jchunkins: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jchunkins
Copy link
Contributor Author

This was merged. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants