Skip to content

feat: new k8s task and exec env for custom actions#8755

Merged
aaron-prindle merged 9 commits into
GoogleContainerTools:mainfrom
renzodavid9:ca-feature-8521
May 16, 2023
Merged

feat: new k8s task and exec env for custom actions#8755
aaron-prindle merged 9 commits into
GoogleContainerTools:mainfrom
renzodavid9:ca-feature-8521

Conversation

@renzodavid9

@renzodavid9 renzodavid9 commented May 8, 2023

Copy link
Copy Markdown
Contributor

Fixes: #8521 #8560
Description
This PR adds the logic to execute k8s custom actions as jobs inside the cluster.

@codecov

codecov Bot commented May 8, 2023

Copy link
Copy Markdown

Codecov Report

Merging #8755 (2ce3cff) into main (290280e) will decrease coverage by 6.55%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main    #8755      +/-   ##
==========================================
- Coverage   70.48%   63.94%   -6.55%     
==========================================
  Files         515      620     +105     
  Lines       23150    31455    +8305     
==========================================
+ Hits        16317    20113    +3796     
- Misses       5776     9837    +4061     
- Partials     1057     1505     +448     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 40 more

... and 410 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@renzodavid9 renzodavid9 force-pushed the ca-feature-8521 branch 4 times, most recently from 38b4f5b to 11770e6 Compare May 10, 2023 15:29
err = a.Exec(ctx, out)
log.Entry(ctx).Debugf("Finished execution for %v", a.name)
r.cleanup(ctx, out, []Task{a}, []ExecEnv{execEnv})
r.cleanup(context.TODO(), out, []Task{a}, []ExecEnv{execEnv})

@renzodavid9 renzodavid9 May 10, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the ctx is cancelled due to an event not related with the actions runner, e.g, a CTRL+C event, the cleanup will fail due to the canceled context that is using, so, we need to send a context.TODO() to avoid this case.

@renzodavid9 renzodavid9 added the kokoro:force-run forces a kokoro re-run on a PR label May 11, 2023
@kokoro-team kokoro-team removed the kokoro:force-run forces a kokoro re-run on a PR label May 11, 2023
@renzodavid9 renzodavid9 force-pushed the ca-feature-8521 branch 3 times, most recently from 7713c9f to 02cc8cc Compare May 12, 2023 17:27
@renzodavid9 renzodavid9 marked this pull request as ready for review May 12, 2023 20:26

@aaron-prindle aaron-prindle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants