-
Notifications
You must be signed in to change notification settings - Fork 145
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
feat: func run support all build options #1693
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0f3754a
to
4a3e9a8
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1693 +/- ##
==========================================
+ Coverage 62.84% 63.23% +0.39%
==========================================
Files 93 93
Lines 12005 12049 +44
==========================================
+ Hits 7544 7619 +75
+ Misses 3772 3745 -27
+ Partials 689 685 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
0691119
to
656b290
Compare
cdc2b0f
to
cad68fc
Compare
cad68fc
to
a1ed87a
Compare
a1ed87a
to
bcb0c0f
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.
Looks great! I just have a couple of nits - and it needs a rebase.
// Another way to think of this is that runs are development-centric tests, | ||
// and thus most likely values changed such as environment variables, | ||
// builder, etc. would not be expected to persist and affect the next deploy. | ||
// Run is ephemeral, deploy is persistent. |
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.
I wonder if this should somehow be communicated to the user.
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.
Yes and at least one time when I was using run
locally, specifying --builder
, I was confused why it didn't use the same value the next time around.
So on the one hand I am pretty sure that we do not want invocations of run
to persist the value of flags which alter deploy
(and build
), but I also find that once accustomed to the value of flags persisting between commands, I expect them to be consistently persistent.
The only solution that comes to mind is that we actually have a separate set of flag values for running (a development/testing, inner-loop sort of paradigm) vs those used for the deployed function. These would be developer-specific (host scoped) and reside in .func/
in the same way as --remote
, etc.
This more complete solution is probably complex enough to warrant its own issue and PR, so for the purposes of this PR I just want to make sure that invoking run
with a different builder during development/testing doesn't alter the deployed function configuration!
- Refactors the run command to include all options from build, in the same manner as deploy. - Adds the --container flag (currently defaults to true) which will, when disabled, invoke the localhost-based runner which, in this commit, is not yet active. - Updates help text to match the other command format, and lays the verbal groundwork for the difference between containerized (currently default) and non-containerized runs.
Co-authored-by: Lance Ball <lball@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>
35bf71f
to
c082add
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
The docs were overlooked in the changes to deploy and run in knative#1693. This commit just updates the docs so they are consistent with the binary. Signed-off-by: Lance Ball <lball@redhat.com>
The docs were overlooked in the changes to deploy and run in #1693. This commit just updates the docs so they are consistent with the binary. Signed-off-by: Lance Ball <lball@redhat.com>
func run
supports build options and host (non-containerized) build optionRefactors the run command to include all options from build, in the same manner as deploy.
Updates help text to match the other command format, and lays the verbal groundwork for the difference between containerized (currently default) and non-containerized runs.
Adds the --container flag (currently defaults to true) which will, when disabled, invoke the localhost-based runner which, in this commit, is not yet active.
/kind enhancement