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

cli: rpkg push surface renderstatus #3645

Merged
merged 3 commits into from
Nov 1, 2022

Conversation

droot
Copy link
Contributor

@droot droot commented Oct 31, 2022

This PR adds support for displaying render status as part of of kpt alpha rpkg push command.

Here is an example output in case of render failure:

$ ~/work/bin/kpt alpha rpkg push application-blueprints-33f255 /tmp/new-pkg -n default
Package is updated, but failed to render the package.
Error: fn.render: pkg /:
        pkg.render:
        pipeline.run: error: function failure
[RUNNING] "gcr.io/kpt-fn/set-namespace:v0.4.1"
[PASS] "gcr.io/kpt-fn/set-namespace:v0.4.1"
  Results:
    [info]: all namespaces are already "example". no value changed
[RUNNING] "gcr.io/kpt-fn/starlark:v0.4.3"
[FAIL] "gcr.io/kpt-fn/starlark:v0.4.3"
  Results:
    [error]: fail: Validation always fails

Here is an example output in case of successful run:

$ ~/work/bin/kpt alpha rpkg push application-blueprints-33f255a /tmp/new-pkg -n default
[RUNNING] "gcr.io/kpt-fn/set-namespace:v0.4.1"
[PASS] "gcr.io/kpt-fn/set-namespace:v0.4.1"
  Results:
    [info]: all namespaces are already "example". no value changed

xref: #3635

@droot droot force-pushed the rpkg-push-surface-renderstatus branch from f6f1949 to e99f70f Compare October 31, 2022 21:25
@droot droot requested a review from justinsb October 31, 2022 23:05
commands/alpha/rpkg/push/command.go Outdated Show resolved Hide resolved
commands/alpha/rpkg/push/command.go Outdated Show resolved Hide resolved
@droot droot force-pushed the rpkg-push-surface-renderstatus branch from c0612fc to e99f70f Compare November 1, 2022 02:54
@droot
Copy link
Contributor Author

droot commented Nov 1, 2022

/cc @ChristopherFry ExitCode field behavior in each of the result item is now fixed. It will be non-zero for functions returning error (the behavior was wrong for builtin functions).

@droot droot merged commit 0da1e20 into kptdev:main Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants