-
Notifications
You must be signed in to change notification settings - Fork 139
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
allow digested images to be 'run' #2445
Conversation
Skipping CI for Draft Pull Request. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2445 +/- ##
==========================================
+ Coverage 61.22% 66.73% +5.51%
==========================================
Files 130 130
Lines 15354 11950 -3404
==========================================
- Hits 9400 7975 -1425
+ Misses 5029 3012 -2017
- Partials 925 963 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 particularly like the new unit tests.
Looks great as-is! I added a couple of questions/suggestions.
/hold for optional changes from review comments
ctx, cancel := context.WithTimeout(context.Background(), time.Minute*10) | ||
t.Cleanup(cancel) | ||
|
||
image := testImageWithDigest |
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.
Would it be possible to first build the image, get its digested image name, and then use that digested image for testing "func run" (from a new temporary directory such that the build stamp from .func
is not considered)? That would slow the test a bit, but would remove the need for a pre-built external container for the test
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: gauron99 <[email protected]>
Signed-off-by: David Fridrich <[email protected]>
Signed-off-by: David Fridrich <[email protected]>
/approve Looking good |
Signed-off-by: David Fridrich <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gauron99, 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 |
/unhold |
* init fix Signed-off-by: gauron99 <[email protected]> * dont override direct deploy tag, more tests Signed-off-by: gauron99 <[email protected]> * fix Signed-off-by: gauron99 <[email protected]> * dont validate with tagged image, fix comment Signed-off-by: gauron99 <[email protected]> * init run fix for --image Signed-off-by: gauron99 <[email protected]> * init Signed-off-by: gauron99 <[email protected]> * int test, add valid untdigested images to run Signed-off-by: gauron99 <[email protected]> * check images passed to runner for func run command Signed-off-by: gauron99 <[email protected]> * fix build/deploy image passing bug add test Signed-off-by: gauron99 <[email protected]> * fix Signed-off-by: gauron99 <[email protected]> * remove extra printing Signed-off-by: gauron99 <[email protected]> * merge functions to digested Signed-off-by: gauron99 <[email protected]> * misspell Signed-off-by: gauron99 <[email protected]> * simplify Signed-off-by: David Fridrich <[email protected]> * quick fix Signed-off-by: David Fridrich <[email protected]> * remove prints, comment Signed-off-by: David Fridrich <[email protected]> --------- Signed-off-by: gauron99 <[email protected]> Signed-off-by: David Fridrich <[email protected]>
* test: adding GO s2i to e2e test suite (#2401) * Remove superfluous equals sign from envvar (#2446) * Remove superfluous equals sign from envvar Signed-off-by: Matej Vašek <[email protected]> * Update rust templates Cargo.lock Signed-off-by: Matej Vašek <[email protected]> --------- Signed-off-by: Matej Vašek <[email protected]> * allow digested images to be 'run' (#2445) * init fix Signed-off-by: gauron99 <[email protected]> * dont override direct deploy tag, more tests Signed-off-by: gauron99 <[email protected]> * fix Signed-off-by: gauron99 <[email protected]> * dont validate with tagged image, fix comment Signed-off-by: gauron99 <[email protected]> * init run fix for --image Signed-off-by: gauron99 <[email protected]> * init Signed-off-by: gauron99 <[email protected]> * int test, add valid untdigested images to run Signed-off-by: gauron99 <[email protected]> * check images passed to runner for func run command Signed-off-by: gauron99 <[email protected]> * fix build/deploy image passing bug add test Signed-off-by: gauron99 <[email protected]> * fix Signed-off-by: gauron99 <[email protected]> * remove extra printing Signed-off-by: gauron99 <[email protected]> * merge functions to digested Signed-off-by: gauron99 <[email protected]> * misspell Signed-off-by: gauron99 <[email protected]> * simplify Signed-off-by: David Fridrich <[email protected]> * quick fix Signed-off-by: David Fridrich <[email protected]> * remove prints, comment Signed-off-by: David Fridrich <[email protected]> --------- Signed-off-by: gauron99 <[email protected]> Signed-off-by: David Fridrich <[email protected]> * On cluster s2i build for Go (alternative version) (#2471) * Prepare util image to accomodate multiple cmds As of now func-util image has only one command of our own -- "deploy". This commits prepares grounds for one additional command named "scaffolding". The commands will be implemented in one binary and dispatched over argv[0] using symlinks. Kinda like busybox does. Signed-off-by: Matej Vašek <[email protected]> * Add scaffolding for on-cluster build Added new build step in tekton pipeline that scaffolds main() for Go porject when using s2i builder. Signed-off-by: Matej Vašek <[email protected]> * Better docker build caching This will cache dependencies between docker builds. Signed-off-by: Matej Vašek <[email protected]> * fixup: perms Signed-off-by: Matej Vašek <[email protected]> * fixup: remove broken check Signed-off-by: Matej Vašek <[email protected]> * fixup: remove test because of 'no space left on device' Signed-off-by: Matej Vašek <[email protected]> * Make func-util rootfull Signed-off-by: Matej Vašek <[email protected]> --------- Signed-off-by: Matej Vašek <[email protected]> * Incorporate s2i CLI into func-utils image. (#2473) Signed-off-by: Matej Vašek <[email protected]> * chore: update Quarkus platform version to 3.14.1 (#2474) Co-authored-by: Knative Automation <[email protected]> Signed-off-by: Matej Vašek <[email protected]> * chore: update Springboot platform version to 3.3.3 (#2465) Co-authored-by: Knative Automation <[email protected]> Signed-off-by: Matej Vašek <[email protected]> --------- Signed-off-by: Matej Vašek <[email protected]> Signed-off-by: gauron99 <[email protected]> Signed-off-by: David Fridrich <[email protected]> Co-authored-by: Jefferson Ramos <[email protected]> Co-authored-by: David Fridrich <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Knative Automation <[email protected]>
In order to match the
deploy
command, make it possible torun
digested images as well when building into the containerchanges
run (
func run
) images directly ~ for convenienceIve added a way to use digested/ valid undigested images to be run using
func run
cmd. With--build=false
one can also run the undigested images directly via skipping the build and using the--image
for the image name that they want to deploy.tests
Ive also added tests that cover which image gets passed on to
.Build.Image
(which is the image used for the runner) and therefore what image actually gets "run".new
client.Push
return valueAdded a return value to
client.Push
which now matches build function (bool indicating if the current push/build was successful or not)todo:
.Build.Image
) when--container=true
--build=false
flag