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

project.toml is not being recognized? #33

Open
dmitry-mightydevops opened this issue Sep 5, 2021 · 3 comments
Open

project.toml is not being recognized? #33

dmitry-mightydevops opened this issue Sep 5, 2021 · 3 comments
Labels
good for mentorship A good issue for a mentorship project. roadmap/configurability Issues/PRs that make the build process more flexible from an app developer perspective. type/enhancement Issue that requests a new feature or improvement.

Comments

@dmitry-mightydevops
Copy link

so /cnb/lifecycle/creator has the argument

  -project-metadata string
    	path to project-metadata.toml (default "<layers>/project-metadata.toml")

which technically should support the project.toml file if I am not mistaken. Howevery no matter what I do - anything that I put inside this file has no effect on the buildpack. I'm using latest google buildpack builder

gcr.io/buildpacks/gcp/run@sha256:4c7a95e9f39fac91b12357b834c7aab723c14a75ba23b0a92a38ed01a7fb0fc8

my project.toml:

[[build.env]]
name =  "GOOGLE_RUNTIME_VERSION"
value = "3.8.2"

yet when I run

/cnb/lifecycle/creator \
  -app=/workspace/app/. \
  -project-metadata=/workspace/app/project.toml \
  -cache-dir=/cache \
  -layers=/layers \
  -platform=/platform \
  -report=/layers/report.toml \
  -cache-image="" \
  -uid=1000 \
  -gid=1000 \
  -process-type=web \
  -skip-restore=false \
  -previous-image=xxx.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22 \
  -run-image=xxx.dkr.ecr.us-west-2.amazonaws.com/vp/prod/buildpacks/google/runner:v1 \
  xxx.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22

I always get 3.9.5

===> DETECTING
google.python.runtime    0.9.1
google.python.pip        0.9.2
google.config.entrypoint 0.9.0
google.utils.label       0.0.1
===> ANALYZING
Previous image with name "332927762005.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22" not found
===> RESTORING
===> BUILDING
=== Python - Runtime (google.python.runtime@0.9.1) ===
Installing Python v3.9.5
Upgrading pip to the latest version and installing build tools

I had to create a file in /platform/env/

$ cat /platform/env/GOOGLE_RUNTIME_VERSION 
3.8.2

/cnb/lifecycle/creator \
  -app=/workspace/app/. \
....
....

===> DETECTING
google.python.runtime    0.9.1
google.python.pip        0.9.2
google.config.entrypoint 0.9.0
google.utils.label       0.0.1
===> ANALYZING
Previous image with name "332927762005.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22" not found
===> RESTORING
===> BUILDING
=== Python - Runtime (google.python.runtime@0.9.1) ===
Using runtime version from GOOGLE_RUNTIME_VERSION: 3.8.2
Installing Python v3.8.2
Upgrading pip to the latest version and installing build tools

so how to make project.toml supported?

I saw this implementation, but it seems hackish in nature, assuming buildpacks spec if supported.

@jromero
Copy link
Member

jromero commented Sep 10, 2021

At this point in time, the project.toml file is a platform concern meaning it has to be implemented by every platform. In this particular case, we haven't yet added the support for it in Tekton.

A recent relevant conversation: buildpacks/rfcs#182

@jromero
Copy link
Member

jromero commented Sep 10, 2021

FWIW, support for project.toml is an extension spec. That means that it's not currently expected to be supported for platforms to be compliant. That said, we're trying to find the best way to expand its support.

We would accept a PR that brings about this support for Tekton as an example 😉.

@jromero jromero added good for mentorship A good issue for a mentorship project. roadmap/configurability Issues/PRs that make the build process more flexible from an app developer perspective. type/enhancement Issue that requests a new feature or improvement. labels Sep 10, 2021
@nickzelei
Copy link

Any update on this issue?
Was pretty surprised to see that the project.toml is not supported when using buildpacks through Tekton. All of the docs for paketo/buildpacks show to use this file to update things like python version, etc. Using pack cli was working and couldn't figure out why it wasn't working when building through Tekton.

Will have to resort to parsing the project.toml and pushing the build envs into the pipeline run..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good for mentorship A good issue for a mentorship project. roadmap/configurability Issues/PRs that make the build process more flexible from an app developer perspective. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

No branches or pull requests

3 participants