Skip to content
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

flow improvements #715

Merged
merged 3 commits into from
Apr 9, 2024
Merged

flow improvements #715

merged 3 commits into from
Apr 9, 2024

Conversation

kon-angelo
Copy link
Contributor

@kon-angelo kon-angelo commented Mar 19, 2024

How to categorize this PR?

/area control-plane
/kind enhancement
/platform gcp

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

[infrastructure] General stability flow reconciliation improvements.
[infrastructure] Fix a bug where the firewall rules were not properly filtered for infrastructure deletion by the flow reconciler

@kon-angelo kon-angelo requested review from a team as code owners March 19, 2024 12:57
@kon-angelo
Copy link
Contributor Author

/hold

@kon-angelo
Copy link
Contributor Author

/test

@testmachinery
Copy link

testmachinery bot commented Mar 19, 2024

🔥 Oops, something went wrong @kon-angelo
unable to create Testrun

Command test
Runs a testrun that is either specified by command line flags or in the default values.
The specified path is rendered as testrun and the current repository is injected as a default location.


Example: /test [sub-command] [--flags]

Usage:
      --dry-run              Print the rendered testrun
      --set stringArray      sets additional helm values
      --template             run go templating on the configured file before execution
      --testrunPath string   path to the testrun file that should be executed

Instructions for interacting with me using PR comments are available here

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 19, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Mar 19, 2024
@kon-angelo
Copy link
Contributor Author

/test

@testmachinery
Copy link

testmachinery bot commented Mar 19, 2024

Testrun: e2e-gpfp2
Workflow: e2e-gpfp2-wf
Phase: Failed

+---------------------+---------------------+-----------+----------+
|        NAME         |        STEP         |   PHASE   | DURATION |
+---------------------+---------------------+-----------+----------+
| infrastructure-test | infra-flow-test     | Failed    | 12m4s    |
| infrastructure-test | infra-migrate-test  | Failed    | 13m15s   |
| bastion-test        | bastion-test        | Succeeded | 11m12s   |
| infrastructure-test | infrastructure-test | Failed    | 11m35s   |
+---------------------+---------------------+-----------+----------+

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Mar 19, 2024
@gardener-robot gardener-robot added needs/review Needs review kind/api-change API change with impact on API users needs/second-opinion Needs second review by someone else area/control-plane Control plane related platform/gcp Google cloud platform/infrastructure labels Mar 19, 2024
@gardener-robot
Copy link

@kon-angelo Label kind/enhancements does not exist.

@gardener-robot gardener-robot added size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies labels Mar 19, 2024
@kon-angelo
Copy link
Contributor Author

/test

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 19, 2024
@testmachinery
Copy link

testmachinery bot commented Mar 19, 2024

Testrun: e2e-tzvmv
Workflow: e2e-tzvmv-wf
Phase: Succeeded

+---------------------+---------------------+-----------+----------+
|        NAME         |        STEP         |   PHASE   | DURATION |
+---------------------+---------------------+-----------+----------+
| bastion-test        | bastion-test        | Succeeded | 10m28s   |
| infrastructure-test | infra-migrate-test  | Succeeded | 11m45s   |
| infrastructure-test | infrastructure-test | Succeeded | 10m34s   |
| infrastructure-test | infra-flow-test     | Succeeded | 11m4s    |
+---------------------+---------------------+-----------+----------+

@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 19, 2024
@gardener-robot gardener-robot added the kind/enhancement Enhancement, improvement, extension label Mar 19, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 20, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 20, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 20, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 20, 2024
@kon-angelo
Copy link
Contributor Author

/test

@testmachinery
Copy link

testmachinery bot commented Mar 20, 2024

Testrun: e2e-zk2j6
Workflow: e2e-zk2j6-wf
Phase: Succeeded

+---------------------+---------------------+-----------+----------+
|        NAME         |        STEP         |   PHASE   | DURATION |
+---------------------+---------------------+-----------+----------+
| bastion-test        | bastion-test        | Succeeded | 10m7s    |
| infrastructure-test | infra-flow-test     | Succeeded | 11m7s    |
| infrastructure-test | infra-migrate-test  | Succeeded | 11m47s   |
| infrastructure-test | infrastructure-test | Succeeded | 10m38s   |
+---------------------+---------------------+-----------+----------+

@kon-angelo
Copy link
Contributor Author

/unhold

@gardener-robot gardener-robot removed the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Mar 20, 2024
pkg/apis/gcp/v1alpha1/types_infrastructure.go Show resolved Hide resolved
delta := int(time.Since(w.start).Seconds())
w.log.Info(fmt.Sprintf("%s [%ds]", w.message.Load(), delta), w.keysAndValues...)
delta := time.Since(w.start)
w.log.Info(fmt.Sprintf("%s [%s]", w.message.Load(), delta.Round(time.Second).String()), w.keysAndValues...)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
w.log.Info(fmt.Sprintf("%s [%s]", w.message.Load(), delta.Round(time.Second).String()), w.keysAndValues...)
w.log.Info(fmt.Sprintf("%s [%.2f s]", w.message.Load(), delta.Seconds()), w.keysAndValues...)

Just an Idea, feel free to discard.

pkg/controller/infrastructure/infraflow/graph.go Outdated Show resolved Hide resolved
pkg/controller/infrastructure/infraflow/reconciler.go Outdated Show resolved Hide resolved
pkg/controller/infrastructure/actuator.go Outdated Show resolved Hide resolved
pkg/controller/infrastructure/strategyselector.go Outdated Show resolved Hide resolved
pkg/controller/infrastructure/actuator.go Show resolved Hide resolved
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 20, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 20, 2024
return fmt.Errorf("failed to create flow context: %v", err)
}

status, state, err := fctx.Reconcile(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we maybe come up with something more meaningful then status and state.
Some suggestions: privState, currentState, progState, progress...

@kon-angelo
Copy link
Contributor Author

/test

@testmachinery
Copy link

testmachinery bot commented Apr 2, 2024

Testrun: e2e-xp895
Workflow: e2e-xp895-wf
Phase: Failed

+---------------------+---------------------+-----------+----------+
|        NAME         |        STEP         |   PHASE   | DURATION |
+---------------------+---------------------+-----------+----------+
| bastion-test        | bastion-test        | Succeeded | 8m24s    |
| infrastructure-test | infrastructure-test | Failed    | 2m29s    |
| infrastructure-test | infra-flow-test     | Omitted   | 0s       |
| infrastructure-test | infra-migrate-test  | Omitted   | 0s       |
+---------------------+---------------------+-----------+----------+

@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 2, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 2, 2024
AndreasBurger
AndreasBurger previously approved these changes Apr 4, 2024
Copy link
Member

@AndreasBurger AndreasBurger left a comment

Choose a reason for hiding this comment

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

lgtm

vpcName := fctx.vpcNameFromConfig()

routes, err := fctx.computeClient.ListRoutes(ctx, client.RouteListOpts{
// Filter: fmt.Sprintf("network~'%s'", vpcName),
Copy link
Member

Choose a reason for hiding this comment

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

Leftover from development? If so rm. If this is here for future reference consider adding a few words as to why

for _, name := range names {
log.Info(fmt.Sprintf("destroying route[name=%s]", name))
err := c.computeClient.DeleteRoute(ctx, name)
log.Info(fmt.Sprintf("destroying route[name=%s]", route.Name))
Copy link
Member

Choose a reason for hiding this comment

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

missing whitespace in route[name=…

Comment on lines 208 to 211
// Data: map[string]string{
//
// CreatedResourcesExistKey: ptr.Deref(fctx.whiteboard.Get(CreatedResourcesExistKey), ""),
// },
Copy link
Member

Choose a reason for hiding this comment

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

Rm, unless you plan to use it in future

@@ -271,6 +271,7 @@ func IsValidValue(value string) bool {
return value != "" && value != deleted
}

// ObjectKeys returns a slice containing the keys of the Whiteboard in ascending order.
Copy link
Member

Choose a reason for hiding this comment

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

That should be in l.287 I think

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 5, 2024
@kon-angelo
Copy link
Contributor Author

/test

@testmachinery
Copy link

testmachinery bot commented Apr 5, 2024

Testrun: e2e-9cmvf
Workflow: e2e-9cmvf-wf
Phase: Succeeded

+---------------------+---------------------+-----------+----------+
|        NAME         |        STEP         |   PHASE   | DURATION |
+---------------------+---------------------+-----------+----------+
| bastion-test        | bastion-test        | Succeeded | 7m56s    |
| infrastructure-test | infrastructure-test | Succeeded | 8m18s    |
| infrastructure-test | infra-flow-test     | Succeeded | 8m32s    |
| infrastructure-test | infra-migrate-test  | Succeeded | 8m39s    |
+---------------------+---------------------+-----------+----------+

Copy link
Member

@AndreasBurger AndreasBurger left a comment

Choose a reason for hiding this comment

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

lgtm

@kon-angelo kon-angelo merged commit 5fa95f4 into gardener:master Apr 9, 2024
10 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Apr 9, 2024
@kon-angelo kon-angelo deleted the update-this branch May 24, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Control plane related kind/api-change API change with impact on API users kind/enhancement Enhancement, improvement, extension needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/rebase Needs git rebase needs/review Needs review needs/second-opinion Needs second review by someone else platform/gcp Google cloud platform/infrastructure size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants