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

JFrog Artifactory git-lfs compatibility #4

Closed
bozaro opened this issue Dec 16, 2016 · 5 comments
Closed

JFrog Artifactory git-lfs compatibility #4

bozaro opened this issue Dec 16, 2016 · 5 comments

Comments

@bozaro
Copy link
Member

bozaro commented Dec 16, 2016

See bozaro/git-lfs-migrate#23

@bozaro
Copy link
Member Author

bozaro commented Dec 16, 2016

JFrog Artifactory 4.15.0 has incorrect Git LFS server implementation.

Batch API issues

https://github.com/git-lfs/git-lfs/blob/aceb2d22293cecf9788f7807f52acd0ad5b72f0f/docs/api/README.md

Invalid actions property name

objects/batch response uses _links property instead of actions.
For example:

{
  "objects" : [ {
    "oid" : "b810bbe954d51e380f395de0c301a0a42d16f115453f2feb4188ca9f7189074e",
    "size" : 28,
    "_links" : {
      "upload" : {
        "href" : "http://localhost:8081/artifactory/jfrog-lfs/objects/b8/10/b810bbe954d51e380f395de0c301a0a42d16f115453f2feb4188ca9f7189074e;sha256=b810bbe954d51e380f395de0c301a0a42d16f115453f2feb4188ca9f7189074e",
        "header" : {
        }
      }
    }
  } ]
}

Instead of:

{
  "objects" : [ {
    "oid" : "b810bbe954d51e380f395de0c301a0a42d16f115453f2feb4188ca9f7189074e",
    "size" : 28,
    "actions" : {
      "upload" : {
        "href" : "http://localhost:8081/artifactory/jfrog-lfs/objects/b8/10/b810bbe954d51e380f395de0c301a0a42d16f115453f2feb4188ca9f7189074e;sha256=b810bbe954d51e380f395de0c301a0a42d16f115453f2feb4188ca9f7189074e",
        "header" : {
        }
      }
    }
  } ]
}

If client don't recognise _links property, it will recognise object as already uploaded.

Incorrect request for already uploaded object

If a client requests to upload an object that the server already has, the server should omit the actions property completely.

Actifactory objects/batch response always send "upload" links for already uploaded objests, but by specification the server should omit the actions property completely.

@bozaro
Copy link
Member Author

bozaro commented Dec 16, 2016

Basic transfer issues

https://github.com/git-lfs/git-lfs/blob/aceb2d22293cecf9788f7807f52acd0ad5b72f0f/docs/api/basic-transfers.md

Invalid HTTP status code for created objects

PUT response has status code 201 for created objects instead of 200.

Invalid HTTP status code for already uploaded objects

A 200 response means that the object exists on the server.

PUT response has status code 403 for already uploaded objects instead of 200.

For example:

HTTP/1.1 403 Forbidden
Server: Artifactory/4.15.0
X-Artifactory-Id: 3e5d8ffe0d057e8a:-1ff10f82:15905fdf100:-8000
Content-Type: application/json;charset=ISO-8859-1
Date: Fri, 16 Dec 2016 05:21:16 GMT

{
  "errors" : [ {
    "status" : 403,
    "message" : "Not enough permissions to overwrite artifact 'jfrog-lfs:objects/2c/26/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae' (user 'test' needs DELETE permission)."
  } ]
}

@bozaro
Copy link
Member Author

bozaro commented Jan 1, 2017

JFrog ticket: 52635

@bozaro
Copy link
Member Author

bozaro commented Jan 2, 2017

@slonopotamus
Copy link
Collaborator

Both Artifactory issues were fixed back in 2017.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants