sonatype-nexus-community / nexus-repository-composer

Composer support for the Nexus Repository Manager (work in progress!)
Eclipse Public License 1.0
220 stars 87 forks source link

Composer Hosted - New package version not in package JSON ... #31

Closed jcolfej closed 4 years ago

jcolfej commented 6 years ago

I try to add new versions of my package on a hosted composer repo. New versions don't appear on https://my.nexus/repository/composer_hosted/p/vendor/package.json ... I only have my first package version.

Currently, I push a 1.0.0 version and few minutes after, I push 1.0.1, but json say :

{
  "packages": {
    "vendor/package": {
      "1.0.0": {
        "name": "vendor/package",
        "version": "1.0.0",
        "dist": {
          "url": "https://my.nexus/repository/composer_hosted/vendor/package/1.0.0/vendor/package-1.0.0.zip",
          "type": "zip",
          "reference": "xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx",
          "shasum": "xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx"
        },
        "time": "2018-10-01T12:39:52+00:00",
        "uid": 3251794098,
        "autoload": {
          "psr-4": {
            "Vendor\\Package\\": "src/"
          }
        },
        "authors": [
          {
            "name": "Me",
            "email": "me@me.me"
          }
        ],
        "description": "My package ..."
      }
    }
  }
}

Is anyone have same problem ?

jcolfej commented 6 years ago

After some tests, this problem is only in case if you use S3 as blobstore. Maybe a problem due to AWS S3 async process ?

DarthHater commented 6 years ago

That is interesting. @fjmilens3 or @ataylor284 might be interested.

bcastagna commented 5 years ago

I have the exact same problem and I dont use S3 as blobstore, just "default" blob storage type. I have posted on this issue few days ago because I thought the "Rebuild All Composer MetaData task" could solve this but if this task intend to do the same thing as the "Rebuild Index" button in the repo's admin panel, then it wont work. @fjmilens3 @TheBay0r Could you guys tell us what could cause this ?

bcastagna commented 5 years ago

Any news on this issue ? Please could someone point us why it does not update the JSON ? It's really a pity because it is the last small issue that prevents me from using this full-scale.... @DarthHater @ataylor284 @fjmilens3 Are you okay man ? 4 months without ANY commits makes me worry.

codercms commented 5 years ago

I ran into the same problem. But I found solution, in settings of composer-hosted repository you should allow redeploy. image

DarthHater commented 5 years ago

@bcastagna sadly @fjmilens3 has moved on to greener pastures from Sonatype, which doesn't mean he won't pop back in here, but it would be out of the kindness of his big heart (he has one for sure). I've been fairly busy helping get another person scaled up on working on this type of stuff, and we are working through a backlog on some other issues right now. I'll try and get either @bhamail or myself to pop in here some time soon!

zhwei commented 5 years ago

hi guys, i have the same problem, is there any update to tetram's pr ?

davidferlay commented 4 years ago

Encountered

I ran into the same problem. But I found solution, in settings of composer-hosted repository you should allow redeploy. image

+++

This is quite a critical issue imho

"Allow redeploy" is a very dangerous settings because it allows packages to be overwritten if an update is made but the version is not increased :

bhamail commented 4 years ago

I merged PR #44 from @tetram. Please give it a try and report any issues.