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

iosnapshot/history: fix test flake #9630

Merged
merged 5 commits into from
Jun 17, 2024
Merged

Conversation

sam-heilbron
Copy link
Contributor

@sam-heilbron sam-heilbron commented Jun 17, 2024

Description

Fix a test flake on the iosnapshot/history_test

Context

Logs of flake: https://storage.googleapis.com/solo-public-build-logs/log-f65eaca6-a7b3-4b7d-9f51-1c65d0b916da.txt
Error:

Step #1 - "run-tests": Step #7 - "run-tests": [1718636270] [1mIOSnapshot Suite[0m - 6/6 specs [38;5;10m•[0m[38;5;10m•[0m[38;5;10m•[0m[38;5;10m•[0m[38;5;10m•[0m
Step #1 - "run-tests": Step #7 - "run-tests": [38;5;243m------------------------------[0m
Step #1 - "run-tests": Step #7 - "run-tests": [38;5;9m• [FAILED] [0.003 seconds][0m
Step #1 - "run-tests": Step #7 - "run-tests": [0mHistory [38;5;243mGetInputSnapshot [38;5;9m[1m[It] include Kubernetes Gateway[0m
Step #1 - "run-tests": Step #7 - "run-tests": [38;5;243m/workspace/gloo/projects/gloo/pkg/servers/iosnapshot/history_test.go:169[0m
Step #1 - "run-tests": Step #7 - "run-tests": 
Step #1 - "run-tests": Step #7 - "run-tests":   [38;5;9m[FAILED] Gateway should be included in input snap
Step #1 - "run-tests": Step #7 - "run-tests":   Expected
Step #1 - "run-tests": Step #7 - "run-tests":       <map[string]interface {} | len:16>: {
Step #1 - "run-tests": Step #7 - "run-tests":           "RouteTables": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "TcpGateways": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "Gateways": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "HttpGateways": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "Ratelimitconfigs": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "RouteOptions": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "Upstreams": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "VirtualHostOptions": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "VirtualServices": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "Endpoints": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "Proxies": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "Secrets": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "UpstreamGroups": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "Artifacts": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "AuthConfigs": nil,
Step #1 - "run-tests": Step #7 - "run-tests":           "GraphqlApis": nil,
Step #1 - "run-tests": Step #7 - "run-tests":       }
Step #1 - "run-tests": Step #7 - "run-tests":   to have key
Step #1 - "run-tests": Step #7 - "run-tests":       <string>: gateway.networking.k8s.io.Gateway[0m
Step #1 - "run-tests": Step #7 - "run-tests":   [38;5;9mIn [1m[It][0m[38;5;9m at: [1m/workspace/gloo/projects/gloo/pkg/servers/iosnapshot/history_test.go:194[0m [38;5;243m@ 06/17/24 15:13:44.01[0m
Step #1 - "run-tests": Step #7 - "run-tests": 
Step #1 - "run-tests": Step #7 - "run-tests":   [38;5;9mFull Stack Trace[0m
Step #1 - "run-tests": Step #7 - "run-tests":     github.com/solo-io/gloo/projects/gloo/pkg/servers/iosnapshot.init.func1.3.3()
Step #1 - "run-tests": Step #7 - "run-tests":     	/workspace/gloo/projects/gloo/pkg/servers/iosnapshot/history_test.go:194 +0x6a3
Step #1 - "run-tests": Step #7 - "run-tests": [38;5;243m------------------------------[0m
Step #1 - "run-tests": Step #7 - "run-tests": 
Step #1 - "run-tests": Step #7 - "run-tests": [38;5;9m[1mSummarizing 1 Failure:[0m
Step #1 - "run-tests": Step #7 - "run-tests":   [38;5;9m[FAIL][0m [0mHistory [38;5;243mGetInputSnapshot [38;5;9m[1m[It] include Kubernetes Gateway[0m
Step #1 - "run-tests": Step #7 - "run-tests":   [38;5;243m/workspace/gloo/projects/gloo/pkg/servers/iosnapshot/history_test.go:194[0m
Step #1 - "run-tests": Step #7 - "run-tests": 
Step #1 - "run-tests": Step #7 - "run-tests": [38;5;9m[1mRan 6 of 6 Specs in 0.271 seconds[0m
Step #1 - "run-tests": Step #7 - "run-tests": [38;5;9m[1mFAIL![0m -- [38;5;10m[1m5 Passed[0m | [38;5;9m[1m1 Failed[0m | [38;5;11m[1m0 Pending[0m | [38;5;14m[1m0 Skipped[0m
Step #1 - "run-tests": Step #7 - "run-tests": --- FAIL: TestIoSnapshot (0.29s)

Internal slack ref: https://solo-io-corp.slack.com/archives/C06C8RA01NF/p1718639733601789

Interesting decisions

Testing steps

To prove the tests work:

 TEST_PKG=projects/gloo/pkg/servers/iosnapshot/ make test

To prove the tests are flake-free:

TEST_PKG=projects/gloo/pkg/servers/iosnapshot/ make test GINKGO_USER_FLAGS=--until-it-fails

Notes for reviewers

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 Jun 17, 2024
Copy link
Contributor

@jbohanon jbohanon left a comment

Choose a reason for hiding this comment

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

🪨
🚀

@soloio-bulldozer soloio-bulldozer bot merged commit 69c8ba4 into main Jun 17, 2024
23 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the sam/snapshot-test-flake branch June 17, 2024 17:52
sam-heilbron added a commit that referenced this pull request Jun 20, 2024
* fix test flake

* add changelog

* skip kube tests

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
soloio-bulldozer bot added a commit that referenced this pull request Jun 20, 2024
* iosnapshot/history: fix test flake (#9630)

* fix test flake

* add changelog

* skip kube tests

---------

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

* helm: support webhook.enablePolicyApi (#9632)

* update helm api and docs

* bad .

* more restrictive check

* add test case

* add changelog

* undo debugging step

* update helm api description

* improve helm description

---------

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

* introduce test coverage reporting, update devel with Gloo Gateway references (#9646)

* devel/ : Gloo Edge -> Gloo Gateway

* more changes

* update workflows, add go-test-with-coverage

* run unit tests on PR

* update name

* fix coverage file path

* consistent step names

* disable race to prove out test coverage

* add working dir

* properly specify outputdir

* test coverage update

* install test tools

* install tools and coverage tools

* update thresholds, ignore errors in CI

* update test coverage def

* add changleog

* update commet in gha

* re-add race flag

* E.T phone home

* Apply suggestions from code review

Co-authored-by: Jacob Bohanon <jacob.bohanon@solo.io>

* Apply suggestions from code review

Co-authored-by: Nadine Spies <17709352+Nadine2016@users.noreply.github.com>

* more suggestions

* skip kube tests

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Jacob Bohanon <jacob.bohanon@solo.io>
Co-authored-by: Nadine Spies <17709352+Nadine2016@users.noreply.github.com>

* consolidate changelog

* gateway2/deployer: fix race due to context cancellation (#9651)

* fix helm race

* tidy

* update commentary, and function asignautres

---------

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

* cleanup changelog

* delete readme, was moved to devel folder

---------

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Jacob Bohanon <jacob.bohanon@solo.io>
Co-authored-by: Nadine Spies <17709352+Nadine2016@users.noreply.github.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.

3 participants