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

support extensions in update_builder command #302

Merged

Conversation

mhdawson
Copy link
Member

@mhdawson mhdawson commented Sep 27, 2023

Summary

Add handling of extension sections in builder toml files
Refs: #294

Use Cases

Supports update of toml files for builders that use extensions

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Signed-off-by: Michael Dawson <mdawson@devrus.com>
@mhdawson mhdawson requested a review from a team as a code owner September 27, 2023 15:34
@ForestEckhardt ForestEckhardt linked an issue Sep 27, 2023 that may be closed by this pull request
@ForestEckhardt ForestEckhardt added the semver:minor A change requiring a minor version bump label Sep 27, 2023
@mhdawson
Copy link
Member Author

mhdawson commented Sep 27, 2023

NOTE: All tests in CI passed so I guess this can be ignored :)

I'm not sure why some of the changes in the test are needed, for example:

[[buildpacks]]
	-uri = "docker://REGISTRY-URI/paketobuildpacks/nodejs:0.20.22"
  +uri = "docker://REGISTRY-URI/paketobuildpacks/nodejs:0.20.22"
  version = "0.20.22"

As I would have expected tests to fail without that change before, they do fail on my local runs without those changes so not quite sure what is going on.

In my local Fedora environment there are some failures in the tests without of my changes. I'm assuming that is something environment related and that they won't show in the CI. These are the failures I see without any of my changes:

[user1@fedora jam]$ !cat
cat temp1 |grep FAIL
--- FAIL: TestJam (30.15s)
    --- FAIL: TestJam/jam (26.31s)
        --- FAIL: TestJam/jam/create-stack/builds_an_example_stack (7.45s)
FAIL
FAIL	github.com/paketo-buildpacks/jam/v2/integration	30.160s
--- FAIL: TestUnitIHOP (19.45s)
    --- FAIL: TestUnitIHOP/ihop (17.58s)
        --- FAIL: TestUnitIHOP/ihop/Client/Build/failure_cases/when_the_image_build_fails/returns_an_error (0.35s)
FAIL
FAIL	github.com/paketo-buildpacks/jam/v2/internal/ihop	19.467s
FAIL

Copy link
Member

@robdimsdale robdimsdale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have one clarifying - and non-blocking - question in line

commands/update_builder.go Show resolved Hide resolved
@robdimsdale
Copy link
Member

NOTE: All tests in CI passed so I guess this can be ignored :)

I'm not sure why some of the changes in the test are needed, for example:

[[buildpacks]]
	-uri = "docker://REGISTRY-URI/paketobuildpacks/nodejs:0.20.22"
  +uri = "docker://REGISTRY-URI/paketobuildpacks/nodejs:0.20.22"
  version = "0.20.22"

As I would have expected tests to fail without that change before, they do fail on my local runs without those changes so not quite sure what is going on.

In my local Fedora environment there are some failures in the tests without of my changes. I'm assuming that is something environment related and that they won't show in the CI. These are the failures I see without any of my changes:

[user1@fedora jam]$ !cat
cat temp1 |grep FAIL
--- FAIL: TestJam (30.15s)
    --- FAIL: TestJam/jam (26.31s)
        --- FAIL: TestJam/jam/create-stack/builds_an_example_stack (7.45s)
FAIL
FAIL	github.com/paketo-buildpacks/jam/v2/integration	30.160s
--- FAIL: TestUnitIHOP (19.45s)
    --- FAIL: TestUnitIHOP/ihop (17.58s)
        --- FAIL: TestUnitIHOP/ihop/Client/Build/failure_cases/when_the_image_build_fails/returns_an_error (0.35s)
FAIL
FAIL	github.com/paketo-buildpacks/jam/v2/internal/ihop	19.467s
FAIL

I've noticed that some jam tests fail on one of my machines due to a different umask that what is assumed by the tests. I didn't dig into whether this was the same tests failures you saw, but I just wanted to let you know.

@robdimsdale robdimsdale merged commit 3c822ff into paketo-buildpacks:main Sep 27, 2023
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jam update-builder is clobbering extensions
3 participants