oci artifacts generic artifact get-by-path does not encode forward slashes in --artifact-path
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
% oci artifacts generic artifact get-by-path --repository-id ocid1.artifactrepository.oc1.phx.0.amaaaaaavhtzrhiahynl4ahak227pxyxcmy4kxcke5ctht2vytipt6dsh4wq --artifact-path abc/def --artifact-version 1
ServiceError:
{
...
"client_version": "Oracle-PythonSDK/2.150.0, Oracle-PythonCLI/3.54.2",
"code": "NotAuthorizedOrNotFound",
"message": "Authorization failed or requested resource not found.",
"operation_name": "get_generic_artifact_by_path",
"request_endpoint": "GET https://artifacts.us-phoenix-1.oci.oraclecloud.com/20160918/generic/repositories/ocid1.artifactrepository.oc1.phx.0.amaaaaaavhtzrhiahynl4ahak227pxyxcmy4kxcke5ctht2vytipt6dsh4wq/artifactPaths/abc/def/versions/1",
"status": 404,
"target_service": "artifacts",
}
% oci raw-request --http-method GET --target-uri https://artifacts.us-phoenix-1.oci.oraclecloud.com/20160918/generic/repositories/ocid1.artifactrepository.oc1.phx.0.amaaaaaavhtzrhiahynl4ahak227pxyxcmy4kxcke5ctht2vytipt6dsh4wq/artifactPaths/abc%2Fdef/versions/1
{
"data": {
"artifactPath": "abc/def",
"compartmentId": "ocid1.compartment......,
...
"displayName": "abc/def:1",
"freeformTags": {},
"id": "ocid1.genericartifact.oc1.phx.0......",
... },
"headers": {
... },
"status": "200 OK"
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the oci artifacts generic artifact get-by-path entry point and compare its generated request endpoint with the oci raw-request example. The artifact path abc/def should be sent as abc%2Fdef, and the command should retrieve the artifact successfully instead of returning NotAuthorizedOrNotFound.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100