oclif: oclif promote shows NoSuchKey: The specified key does not exist.

I am not sure if this is a bug. However, based on the docs here, I should be able to push to S3 by using the command oclif promote.

However, after some fiddling around and trying to understand what is going wrong due to lack of documentation, I encounter this issue:

    NoSuchKey: The specified key does not exist.
    Code: NoSuchKey

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (8 by maintainers)

Most upvoted comments

@tuler @oap75 this was fixed a few weeks ago, make sure to update to latest oclif to get the fix. https://github.com/oclif/oclif/pull/1158

Hey all, @ryandagg and I were looking at this failure in the CLI promote pipeline, here’s what we found:

  1. oclif pack:deb generates deb pkgs for the targets defined in buildConfig.targets: https://github.com/oclif/oclif/blob/main/src/commands/pack/deb.ts#L94

these targets can be set by users in the CLI pjson (pjson.oclif.update.node.targets), and will default to these if the previous object is empty: https://github.com/oclif/oclif/blob/main/src/tarballs/config.ts#L13-L20

So, pack:deb will not generate a deb pkg for linux-x86. But even if you set that target manually in your pjson, oclif will fail to build the pkg because node dropped 32bits build for linux a long time ago: https://github.com/nodejs/build/issues/885

  1. oclif upload:deb tries to upload the i386 pkg: https://github.com/oclif/oclif/blob/f483d1cc509a11fd9c255655cf29fc099be1f6f6/src/commands/upload/deb.ts#L54

but skips it here because the file doesn’t exists: https://github.com/oclif/oclif/blob/f483d1cc509a11fd9c255655cf29fc099be1f6f6/src/commands/upload/deb.ts#L47

  1. oclif promote:deb picks targets the same way pack:deb does BUT you can also specify them via the --targets flag: https://github.com/oclif/oclif/blob/f483d1cc509a11fd9c255655cf29fc099be1f6f6/src/commands/promote.ts#L31 https://github.com/oclif/oclif/blob/f483d1cc509a11fd9c255655cf29fc099be1f6f6/src/commands/promote.ts#L20

the odd thing is that when promoting the deb pkgs it just hardcodes the i386 target (which again, hasn’t worked for a very long time now) https://github.com/oclif/oclif/blob/f483d1cc509a11fd9c255655cf29fc099be1f6f6/src/commands/promote.ts#L155-L156

Another issue with this is that promote:deb can never promote the arm deb pkg that pack:deb builds.

I don’t have a working example unfortunately. You might ask @mdonnalley, he might be able to provide you with one.