-
Notifications
You must be signed in to change notification settings - Fork 138
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 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
/approve Looking good |
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
[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 <fridrich.david19@gmail.com> * dont override direct deploy tag, more tests Signed-off-by: gauron99 <fridrich.david19@gmail.com> * fix Signed-off-by: gauron99 <fridrich.david19@gmail.com> * dont validate with tagged image, fix comment Signed-off-by: gauron99 <fridrich.david19@gmail.com> * init run fix for --image Signed-off-by: gauron99 <fridrich.david19@gmail.com> * init Signed-off-by: gauron99 <fridrich.david19@gmail.com> * int test, add valid untdigested images to run Signed-off-by: gauron99 <fridrich.david19@gmail.com> * check images passed to runner for func run command Signed-off-by: gauron99 <fridrich.david19@gmail.com> * fix build/deploy image passing bug add test Signed-off-by: gauron99 <fridrich.david19@gmail.com> * fix Signed-off-by: gauron99 <fridrich.david19@gmail.com> * remove extra printing Signed-off-by: gauron99 <fridrich.david19@gmail.com> * merge functions to digested Signed-off-by: gauron99 <fridrich.david19@gmail.com> * misspell Signed-off-by: gauron99 <fridrich.david19@gmail.com> * simplify Signed-off-by: David Fridrich <fridrich.david19@gmail.com> * quick fix Signed-off-by: David Fridrich <fridrich.david19@gmail.com> * remove prints, comment Signed-off-by: David Fridrich <fridrich.david19@gmail.com> --------- Signed-off-by: gauron99 <fridrich.david19@gmail.com> Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* 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 <matejvasek@gmail.com> * Update rust templates Cargo.lock Signed-off-by: Matej Vašek <matejvasek@gmail.com> --------- Signed-off-by: Matej Vašek <matejvasek@gmail.com> * allow digested images to be 'run' (#2445) * init fix Signed-off-by: gauron99 <fridrich.david19@gmail.com> * dont override direct deploy tag, more tests Signed-off-by: gauron99 <fridrich.david19@gmail.com> * fix Signed-off-by: gauron99 <fridrich.david19@gmail.com> * dont validate with tagged image, fix comment Signed-off-by: gauron99 <fridrich.david19@gmail.com> * init run fix for --image Signed-off-by: gauron99 <fridrich.david19@gmail.com> * init Signed-off-by: gauron99 <fridrich.david19@gmail.com> * int test, add valid untdigested images to run Signed-off-by: gauron99 <fridrich.david19@gmail.com> * check images passed to runner for func run command Signed-off-by: gauron99 <fridrich.david19@gmail.com> * fix build/deploy image passing bug add test Signed-off-by: gauron99 <fridrich.david19@gmail.com> * fix Signed-off-by: gauron99 <fridrich.david19@gmail.com> * remove extra printing Signed-off-by: gauron99 <fridrich.david19@gmail.com> * merge functions to digested Signed-off-by: gauron99 <fridrich.david19@gmail.com> * misspell Signed-off-by: gauron99 <fridrich.david19@gmail.com> * simplify Signed-off-by: David Fridrich <fridrich.david19@gmail.com> * quick fix Signed-off-by: David Fridrich <fridrich.david19@gmail.com> * remove prints, comment Signed-off-by: David Fridrich <fridrich.david19@gmail.com> --------- Signed-off-by: gauron99 <fridrich.david19@gmail.com> Signed-off-by: David Fridrich <fridrich.david19@gmail.com> * 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 <matejvasek@gmail.com> * 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 <matejvasek@gmail.com> * Better docker build caching This will cache dependencies between docker builds. Signed-off-by: Matej Vašek <matejvasek@gmail.com> * fixup: perms Signed-off-by: Matej Vašek <matejvasek@gmail.com> * fixup: remove broken check Signed-off-by: Matej Vašek <matejvasek@gmail.com> * fixup: remove test because of 'no space left on device' Signed-off-by: Matej Vašek <matejvasek@gmail.com> * Make func-util rootfull Signed-off-by: Matej Vašek <matejvasek@gmail.com> --------- Signed-off-by: Matej Vašek <matejvasek@gmail.com> * Incorporate s2i CLI into func-utils image. (#2473) Signed-off-by: Matej Vašek <matejvasek@gmail.com> * chore: update Quarkus platform version to 3.14.1 (#2474) Co-authored-by: Knative Automation <automation@knative.team> Signed-off-by: Matej Vašek <matejvasek@gmail.com> * chore: update Springboot platform version to 3.3.3 (#2465) Co-authored-by: Knative Automation <automation@knative.team> Signed-off-by: Matej Vašek <matejvasek@gmail.com> --------- Signed-off-by: Matej Vašek <matejvasek@gmail.com> Signed-off-by: gauron99 <fridrich.david19@gmail.com> Signed-off-by: David Fridrich <fridrich.david19@gmail.com> Co-authored-by: Jefferson Ramos <jeramos@redhat.com> Co-authored-by: David Fridrich <49119790+gauron99@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Knative Automation <automation@knative.team>
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