oclif/plugin-update

Update doesn't works by using S3 bucket with Oclif V2

Clebiez opened this issue · 6 comments

Since oclif has updated their version in V2, the way to generate and publish standalone changes.

Buildmanifest name has changed

You have to make oclif pack tarballs + oclif upload tarballs
Then you have to promote your version to a specific channel.
oclif promote --version <VERSION> --sha <SHA> --channel <CHANNEL>

The result on a s3 buckets looks like:
image
Look the manifest name: myproject-linux-x64-buildmanifest

When using oclif-update-plugin, the update command search the manifest's old name: linux-x64 in this case.

The result is a non-working command:

image

Stable channel release is not on the root of the bucket

By no specifying any channel to the promote command, you will promote your version to the stable channel.

Before, manifests of the current version of your CLI on the stable channel was copied on the root of your bucket:
image

Now, the promote command create another folder stable inside the channels folder.

image

The result is a non-working command because it can't found stable manifest.

I have a similar problem: it's trin to read a JSON inde of the available versions, but the upload command doesn't create it, at least for tarballs:

oclif pack tarballs -t win32-x86,linux-x64
oclif upload tarballs -t win32-x86,linux-x64
mycli update -a 

Results in (with debug on,censored)

...
  mycli:update init version: @oclif/core@1.3.6 argv: [ '-a' ] +0ms
  http → GET https://mybucket.s3.eu-west-1.amazonaws.com/mycli/versions/mycli-linux-x64-tar-gz.json
  http   user-agent: 'mycli/0.2.1 linux-x64 node-v14.15.4' +0ms
  http ← GET https://mybucket.s3.eu-west-1.amazonaws.com/mycli/versions/mycli-linux-x64-tar-gz.json 403
  http   connection: 'close'
  http   content-type: 'application/xml'
  http   date: 'Wed, 02 Mar 2022 11:09:34 GMT'
  http   server: 'AmazonS3'
  http   transfer-encoding: 'chunked'
  http   x-amz-id-2: 'Q3SzCvyo1JDBylkfXen8F+z6Wd4kQ/OQ6auBde2vAjIcgux3KSDC7756DZV/b5Ssu/RcvyQkEBI='
  http   x-amz-request-id: '0GASQABH0YQ1AZB1'
  http '<?xml version="1.0" encoding="UTF-8"?>\n' +
  http   '<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>0GASQABH0YQ1AZB1</RequestId><HostId>Q3SzCvyo1JDBylkfXen8F+z6Wd4kQ/OQ6auBde2vAjIcgux3KSDC7756DZV/b5Ssu/RcvyQkEBI=</HostId></Error>' +135ms
Error: No version indices exist for mycli.
...

Seeing the same thing as @marcellourbani. Are there any plans to fix this either in the oclif upload command or in the update command?

+1 on this issue. This is blocking our migration to oclif-dev o oclif v2.

Experiencing the same problems as described above. The update isn't working. This issue is over a year old. Any plans to fix this? Updating the documentation to say that the update function isn't working would save a lot of headaches.

Thank you!

I've been running into the same issues with oclif 4.4.16 and plugin-update 4.1.10

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.