redhat-buildpacks / testing

Project aiming to help us to perform e2e tests using Buildpacks
Apache License 2.0
0 stars 3 forks source link

failed to add extensions to builder: invalid extension #27

Closed cmoulliard closed 1 year ago

cmoulliard commented 1 year ago

Issue

The following job : https://github.com/redhat-buildpacks/testing/actions/runs/5806022816/job/15738110728?pr=26 reported such an error

ERROR: failed to add extensions to builder: invalid extension: extension from URI
'file:////home/runner/work/testing/testing/ubi-nodejs-extension' 
has ID 'paketo-community/ubi-nodejs-extension' which does not match
ID 'redhat-runtimes/nodejs' from builder config

during the execution of the step Test Nodejs UBI extension - code

cmoulliard commented 1 year ago

Can you have a look please ? @mhdawson

cmoulliard commented 1 year ago

The error seems to be related to the fact that we reference a local folder which do not exist under this github testing repository repository but instead here: paketo-community/ubi-nodejs-extension

cmoulliard commented 1 year ago

I updated the builder.toml file to include as uri the tgz archive of the project an extension

          [[extensions]]
          id = "redhat-runtimes/nodejs"
          version = "0.0.1"
          uri = "https://github.com/paketo-community/ubi-nodejs-extension/archive/main.tar.gz"

but when we try to build using pack the image, we got such an error

ERROR: failed to add extensions to builder: downloading extension: extracting from 'https://github.com/paketo-community/ubi-nodejs-extension/archive/main.tar.gz': reading extension: reading extension.toml: could not find entry path 'extension.toml': not exist

even if the archive includes an extension.toml file: https://github.com/paketo-community/ubi-nodejs-extension/blob/main/extension.toml

cmoulliard commented 1 year ago

Commit 698266f fixed the issue

pacostas commented 1 year ago

can you also try to update on the builder.toml the stack section with

[stack]
  id = "io.buildpacks.stacks.ubi8"
  build-image = "paketocommunity/build-ubi-base"
  run-image = "paketocommunity/run-ubi-base"

The builder.toml file has changed slightly since last time. https://github.com/paketo-community/ubi-nodejs-extension/blob/main/README.md

pacostas commented 1 year ago

same with the lifecycle

[lifecycle]
  version = "0.17.0-pre.2"
pacostas commented 1 year ago

also the pack has to be version v0.30.0-pre2 or greater