-
Notifications
You must be signed in to change notification settings - Fork 100
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
oras copy error message is not clear enough #432
Labels
enhancement
New feature or request
Milestone
Comments
Do you have any suggestions on what would be more clear? |
It looks like it did not validate the size otherwise it will return a more reasonable error. I think it should tell me what is not correct. For example, the oci layout is invalid, the index.json is invalid or the size is invalid. |
Wwwsylvia
pushed a commit
that referenced
this issue
Jun 27, 2023
NewWithContext refers to both the `oci-layout` and `index.json` as "OCI Image Layout", this PR fixes the latter. ReadAll is a deeper change that will improve error reporting for a lot of cases, at the cost of error volume. Some or all of that change could happen higher up to satisfy this particular issue. I think the expected/actual size output belongs here. There seem to be more than a few code paths in this and other repos that end up calling ReadAll multiple times without reporting which call produced an error so I think it's appropriate to also output the digest here, but that's less compelling. The Verify comment clears up confusion I encountered while working on this issue. "verifies size" implies checking for both too big AND too small, but it only checks if the file is bigger (or reader is longer) than expected. Fixes #432 Signed-off-by: Clarence "Sparr" Risher <[email protected]>
Wwwsylvia
pushed a commit
to Wwwsylvia/oras-go
that referenced
this issue
Jul 4, 2023
NewWithContext refers to both the `oci-layout` and `index.json` as "OCI Image Layout", this PR fixes the latter. ReadAll is a deeper change that will improve error reporting for a lot of cases, at the cost of error volume. Some or all of that change could happen higher up to satisfy this particular issue. I think the expected/actual size output belongs here. There seem to be more than a few code paths in this and other repos that end up calling ReadAll multiple times without reporting which call produced an error so I think it's appropriate to also output the digest here, but that's less compelling. The Verify comment clears up confusion I encountered while working on this issue. "verifies size" implies checking for both too big AND too small, but it only checks if the file is bigger (or reader is longer) than expected. Fixes oras-project#432 Signed-off-by: Clarence "Sparr" Risher <[email protected]>
shizhMSFT
pushed a commit
that referenced
this issue
Jul 4, 2023
NewWithContext refers to both the `oci-layout` and `index.json` as "OCI Image Layout", this PR fixes the latter. ReadAll is a deeper change that will improve error reporting for a lot of cases, at the cost of error volume. Some or all of that change could happen higher up to satisfy this particular issue. I think the expected/actual size output belongs here. There seem to be more than a few code paths in this and other repos that end up calling ReadAll multiple times without reporting which call produced an error so I think it's appropriate to also output the digest here, but that's less compelling. The Verify comment clears up confusion I encountered while working on this issue. "verifies size" implies checking for both too big AND too small, but it only checks if the file is bigger (or reader is longer) than expected. Fixes #432 Signed-off-by: Clarence "Sparr" Risher <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I manully modified the
size
field of the index.json of OCI layout file to be an invalid value and got this error message.index.json file
It looks like the error message is not clear enough.
The text was updated successfully, but these errors were encountered: