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

Move glooctl tests to new framework #9718

Merged
merged 34 commits into from
Jul 12, 2024
Merged

Conversation

npolshakova
Copy link
Contributor

@npolshakova npolshakova commented Jul 2, 2024

Description

Adds new Glooctl tests in new framework. These tests can run for k8s Gateway and Edge Gateway apis.

API changes

None

Code changes

  • Small fix to check-crds to allow it to work in namespaces other than gloo-system
  • Small fix for datarace detected in debug tests:

Full logs

2024-07-08T16:38:16.7127482Z === RUN   TestGlooctlGlooGatewayEdgeGateway/Debug/TestLogsFile
2024-07-08T16:38:16.8222549Z ==================
2024-07-08T16:38:16.8223316Z WARNING: DATA RACE
2024-07-08T16:38:16.8224319Z Write at 0x00c0041db450 by goroutine 34873:
2024-07-08T16:38:16.8225734Z   github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/debug.DebugLogs.func1()
2024-07-08T16:38:16.8227720Z       /home/runner/work/gloo/gloo/projects/gloo/cli/pkg/cmd/debug/debug.go:62 +0x5ce
2024-07-08T16:38:16.8229096Z   golang.org/x/sync/errgroup.(*Group).Go.func1()
2024-07-08T16:38:16.8230659Z       /home/runner/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x91
2024-07-08T16:38:16.8231561Z 
2024-07-08T16:38:16.8232047Z Previous write at 0x00c0041db450 by goroutine 34874:
2024-07-08T16:38:16.8233505Z   github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/debug.DebugLogs.func1()
2024-07-08T16:38:16.8235616Z       /home/runner/work/gloo/gloo/projects/gloo/cli/pkg/cmd/debug/debug.go:62 +0x5ce
2024-07-08T16:38:16.8237141Z   golang.org/x/sync/errgroup.(*Group).Go.func1()
2024-07-08T16:38:16.8238628Z       /home/runner/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x91
2024-07-08T16:38:16.8239578Z 
2024-07-08T16:38:16.8239869Z Goroutine 34873 (running) created at:
2024-07-08T16:38:16.8240899Z   golang.org/x/sync/errgroup.(*Group).Go()
2024-07-08T16:38:16.8242349Z       /home/runner/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x124
2024-07-08T16:38:16.8243971Z   github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/debug.DebugLogs()
2024-07-08T16:38:16.8245761Z       /home/runner/work/gloo/gloo/projects/gloo/cli/pkg/cmd/debug/debug.go:52 +0x528
2024-07-08T16:38:16.8247364Z   github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/debug.DebugLogCmd.func1()
2024-07-08T16:38:16.8249010Z       /home/runner/work/gloo/gloo/projects/gloo/cli/pkg/cmd/debug/root.go:34 +0x48
2024-07-08T16:38:16.8250119Z   github.com/spf13/cobra.(*Command).execute()

CI changes

  • Added new e2e tests for k8s gateway and edge gateway glooctl tests
  • Removed glooctl tests from old K8s suite

Docs changes

None

Context

Part of moving kube2e tests to new framework

Interesting decisions

The helm manifest requires this set for the glooctl error checks to be correctly handled:

  validation:
    # These tests validate the glooctl properly reports errors and warnings on resources
    # Therefore, we accept all resources in our webhook
    alwaysAcceptResources: true

There is also a new Edge Gateway defined in the helm chart for test parity:

gatewayProxies:
  publicGw: # Proxy name for public access (Internet facing)
    disabled: false # overwrite the "default" value in the merge step
    kind:
      deployment:
        replicas: 2
    service:
      kubeResourceOverride: # workaround for https://github.com/solo-io/gloo/issues/5297
        spec:
          ports:
            - port: 443
              protocol: TCP
              name: https
              targetPort: 8443
          type: LoadBalancer
    gatewaySettings:
      customHttpsGateway: # using the default HTTPS Gateway
        virtualServiceSelector:
          gateway-type: public # label set on the VirtualService
      disableHttpGateway: true # disable the default HTTP Gateway

The K8s Glooctl manifest does not disable the default Edge proxy to test that the expected checks still pass when both are enabled.

Testing steps

  • Ran new e2e tests locally to confirm behavior with Gloo Edge Gateway and k8s Gateway

Notes for reviewers

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label Jul 2, 2024
@npolshakova npolshakova marked this pull request as ready for review July 5, 2024 21:11
@solo-changelog-bot
Copy link

Issues linked to changelog:
https://github.com/solo-io/solo-projects/issues/6303

Copy link

github-actions bot commented Jul 5, 2024

Visit the preview URL for this PR (updated for commit 258d7ea):

https://gloo-edge--pr9718-npolshak-glooctl-tes-issu9i2k.web.app

(expires Fri, 12 Jul 2024 21:27:17 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

@npolshakova npolshakova requested a review from a team as a code owner July 8, 2024 15:28
jbohanon
jbohanon previously approved these changes Jul 10, 2024
jbohanon
jbohanon previously approved these changes Jul 10, 2024
jbohanon
jbohanon previously approved these changes Jul 11, 2024
@soloio-bulldozer soloio-bulldozer bot merged commit 3c01bc9 into main Jul 12, 2024
19 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the npolshak/glooctl-tests branch July 12, 2024 13:18
npolshakova added a commit that referenced this pull request Jul 17, 2024
* initial move for glooctl tests

* combine glooctl helm manifest and edge gw manifest

* fix check crds

* move test helper values in glooContext

* fix crd check for not gloo-system ns

* passing tests

* passing eventually error test

* changelog, cleanup

* update references to old glooctl tests

* regen docs

* remove old glooctl test from workflow

* Adding changelog file to new location

* Deleting changelog file from old location

* fix race debug

* remove old glooctl tests from nightlys

* Adding changelog file to new location

* Deleting changelog file from old location

* Add back nightlys for 1.15 and 1.16

* add glooctl tests back

* remove tmp dir for check-crds

* Adding changelog file to new location

* Deleting changelog file from old location

* istio feedback from prev pr

* helm manifest typo

* chart uri

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>
npolshakova added a commit that referenced this pull request Jul 18, 2024
* cherrypick gloomtls tests

* Move glooctl tests to new framework (#9718)

* initial move for glooctl tests

* combine glooctl helm manifest and edge gw manifest

* fix check crds

* move test helper values in glooContext

* fix crd check for not gloo-system ns

* passing tests

* passing eventually error test

* changelog, cleanup

* update references to old glooctl tests

* regen docs

* remove old glooctl test from workflow

* Adding changelog file to new location

* Deleting changelog file from old location

* fix race debug

* remove old glooctl tests from nightlys

* Adding changelog file to new location

* Deleting changelog file from old location

* Add back nightlys for 1.15 and 1.16

* add glooctl tests back

* remove tmp dir for check-crds

* Adding changelog file to new location

* Deleting changelog file from old location

* istio feedback from prev pr

* helm manifest typo

* chart uri

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>

* changelog

* remove unnecessary workflow changes

* combine changelogs

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Sam Heilbron <SamHeilbron@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants