Skip to content

fix: reverse order of deployers during cleanup (#7284) (backport v1)#7927

Merged
aaron-prindle merged 2 commits into
GoogleContainerTools:v1from
chronicc:reverse-cleanup-order-backport-v1
Feb 6, 2023
Merged

fix: reverse order of deployers during cleanup (#7284) (backport v1)#7927
aaron-prindle merged 2 commits into
GoogleContainerTools:v1from
chronicc:reverse-cleanup-order-backport-v1

Conversation

@chronicc

@chronicc chronicc commented Oct 7, 2022

Copy link
Copy Markdown
Contributor

Fixes: #7284
Related: Relevant tracking issues, for context
Merge before/after: Dependent or prerequisite PRs

Description

Add a new deployer slice during cleanup function of the DeployerMux which is reversed in it's order. This change should be covered by the existing unittests since no new function was added.

This is a backport for v1.

User facing changes (remove if N/A)

Before:
Modules are undeployed in the same order as they are deployed. Visible in the console as

^CCleaning up...
release "postgresql" uninstalled
 - deployment.apps "example-django" deleted
INFO[0016] Cleanup completed in 886.10607ms              subtask=-1 task=DevLoop

After:
Modules are undeployed in reverse order.

^CCleaning up...
 - deployment.apps "example-django" deleted
release "postgresql" uninstalled
INFO[0328] Cleanup completed in 1.038 second             subtask=-1 task=DevLoop
@chronicc chronicc requested a review from a team as a code owner October 7, 2022 07:28
@chronicc chronicc requested review from gsquared94 and removed request for a team October 7, 2022 07:28
@chronicc chronicc changed the title fix: reverse order of deployers during cleanup (#7284) Oct 7, 2022
@chronicc chronicc force-pushed the reverse-cleanup-order-backport-v1 branch from a6f8c9e to 3b14aa0 Compare October 7, 2022 08:49
@ericzzzzzzz ericzzzzzzz added the kokoro:run runs the kokoro jobs on a PR label Oct 7, 2022
@codecov

codecov Bot commented Oct 7, 2022

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (v1@a3808f6). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff          @@
##             v1    #7927   +/-   ##
=====================================
  Coverage      ?   68.38%           
=====================================
  Files         ?      563           
  Lines         ?    26699           
  Branches      ?        0           
=====================================
  Hits          ?    18259           
  Misses        ?     7173           
  Partials      ?     1267           

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

@gsquared94 gsquared94 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

@chronicc chronicc force-pushed the reverse-cleanup-order-backport-v1 branch from 3b14aa0 to 9bb5a0d Compare October 12, 2022 20:07
@chronicc

Copy link
Copy Markdown
Contributor Author

I moved the reversal function into it's own method and added tests.

Comment thread pkg/skaffold/deploy/deploy_mux_test.go Outdated
@chronicc chronicc force-pushed the reverse-cleanup-order-backport-v1 branch 3 times, most recently from 711190b to 55795fa Compare October 14, 2022 13:23
@chronicc

Copy link
Copy Markdown
Contributor Author

I see, that I updated the wrong function in the rush of backporting it. Will fix this now.

@chronicc chronicc force-pushed the reverse-cleanup-order-backport-v1 branch from 55795fa to 382358c Compare October 19, 2022 09:57
.tool-versions is used by asdf (package manager) to set the go version
for this repository
@chronicc chronicc force-pushed the reverse-cleanup-order-backport-v1 branch from 382358c to 3602642 Compare November 21, 2022 07:44
@aaron-prindle aaron-prindle merged commit b084455 into GoogleContainerTools:v1 Feb 6, 2023
@chronicc chronicc deleted the reverse-cleanup-order-backport-v1 branch February 10, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kokoro:run runs the kokoro jobs on a PR size/M

4 participants