-
Notifications
You must be signed in to change notification settings - Fork 928
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
[RFC0028] Support for Cloud Native Buildpacks lifecycle #2871
Conversation
9cc994c
to
b967d16
Compare
c6389b0
to
ee145a4
Compare
@cloudfoundry/toc Do you know who could be asked to review this one? |
Hi @loewenstein-sap, I asked in the CLI slack channel. |
0bdafee
to
c1d9a1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM.
Is it possible to add integration tests?
@a-b would it be sufficient to simply enable CNB tests which are part of CATS? cloudfoundry/cf-acceptance-tests#1136 with Otherwise we would have to basically create test duplicates and test same things multiple times with no additional benefits. |
bc883c5
to
b8b96d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
27f04c8
to
8647baf
Compare
@a-b could you assist us fixing the failing checks? The CVE check fails to download the Grype DB. Regarding the failed integration tests we are wondering if the targeted CF already supports Cloud Native Buildpacks and if the required feature-flag ( |
At the moment, the integration test is being run against cf-deployment_version: v40.15.0. We do not support modifications to feature flags, but I will discuss with the team to explore potential solutions. One possible approach to support feature flags would be to introduce a file in the repository with a BOSH opsfile that could be applied prior to running tests. Please, let us know what you think about this approach. |
Basic support for CNBs was released with v42.2.0, but it looks like our most recent changes are not released yet. Bumping the version now would not solve the issue, so I guess this will take a little longer. Regarding the feature flag, we're using:
would that be enough once the integration tests consume the necessary cf-deployment version? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general looks good, but the tests are failing I am guessing it is because we changed the output. Can you please check that?
Added some other nit's related to formatting the code.
}, nil | ||
} | ||
|
||
func (cmd PushCommand) ValidateFlags() error { | ||
switch { | ||
// Lifecycle buildpack requested | ||
|
||
case cmd.Lifecycle == constant.AppLifecycleTypeBuildpack && cmd.DockerImage.Path != "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are checking for dockerImage and docker-username, would it make sense to also test for docker-password?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong input combinations, in regards to docker, are checked earlier. I guess it does not make sense to check it again.
@a-b |
6e30e58
to
ddc8a7c
Compare
The |
@dependabot /rebase |
ddc8a7c
to
ecce4e1
Compare
Great news! Version |
Fixed environment deployment. |
ecce4e1
to
fc0894b
Compare
It seems that both 1 and 2 integrations test failures are related to build packs and CNB:
I also noticed the following error:
during the push app step. |
bd97558
to
2ae190c
Compare
2ae190c
to
5a1dbf8
Compare
I do not have write access to your branch, but essentially to fix tests, you want something like the following patch: commit 54c988b260c238264014b1831c0563dccd25c5fc
Author: Al Berez <al.berez@broadcom.com>
Date: Fri Sep 20 14:19:55 2024 -0700
Fix push command help integration test
diff --git a/integration/v7/push/help_test.go b/integration/v7/push/help_test.go
index 328459207..7503e313a 100644
--- a/integration/v7/push/help_test.go
+++ b/integration/v7/push/help_test.go
@@ -26,6 +26,7 @@ var _ = Describe("help", func() {
"[-b BUILDPACK_NAME]",
"[-c COMMAND]",
"[-f MANIFEST_PATH | --no-manifest]",
+ "[--lifecycle (buildpack | docker | cnb)]",
"[--no-start]",
"[--no-wait]",
"[-i NUM_INSTANCES]",
|
Question (blocking): Do you have all help updates, like docker mode, covered? |
Suggestion: To expedite interactions with approvers in the future, when creating a PR, please enable approvers to push changes to your branch by checking the corresponding checkbox in your PR. |
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com> Co-authored-by: Pavel Busko <pavel.busko@sap.com> Co-authored-by: Nicolas Bender <nicolas.bender@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com> Co-authored-by: Nicolas Bender <nicolas.bender@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: João Pereira <joaopapereira@gmail.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
5a1dbf8
to
db7b0f0
Compare
@a-b thank you for your help, we've updated the PR with your suggestion |
Broken linter is a known issue that is is progress. I'll go ahead and merge, as integration tests and CATs are green. |
Where this PR should be backported?
Description of the Change
This change introduces changes as described by RFC 0028 Cloud Native Buildpacks Lifecycle.
cf push
accepts--lifecycle [buildpacks|docker|cnb]
flagcf push
supportslifecycle
option in the manifestcf create-app --app-type
extended withcnb
optionWhy Is This PR Valuable?
What benefits will be realized by the code change? What users would want this change? What user need is this change addressing?
Applicable Issues
List any applicable GitHub Issues here
How Urgent Is The Change?
Depends on cloudfoundry/cloud_controller_ng#3778 to be merged first
Other Relevant Parties
Who else is affected by the change?