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

Backport of ci: use gotestsum v1.10.1 [NET-4042] into release/1.15.x #18093

Merged

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #18088 to be assessed for backporting due to the inclusion of the label backport/1.15.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@nfi-hashicorp
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: unable to process merge commit: "23679674d7772776aefaebe72184e7adb02a7460", automatic backport requires rebase workflow

The below text is copied from the body of the original PR.


Specifically to for this fix: gotestyourself/gotestsum#338

Description

@freddygv reported (internally) that a subtest TestDecodeConfigEntry/service-defaults* was passing on retry when it should have failed repeatably.

Testing & Reproduction steps

You can see in the raw logs for e.g. https://github.com/hashicorp/consul/actions/runs/4930752511/jobs/8813642599?pr=17208 that the test was retried, failed, but that the job succeeded.

2023-05-09T22:12:05.3648472Z exec: [go test -json -test.run=^TestDecodeConfigEntry$/^service-defaults_(camel_case)$ -tags= -p 2 -cover -coverprofile=coverage.txt github.com/hashicorp/consul/agent/structs]
2023-05-09T22:12:05.3649057Z go test pid: 35074
2023-05-09T22:12:06.3734309Z �[32mPASS�[0m agent/structs.TestDecodeConfigEntry (re-run 1) (0.00s)
2023-05-09T22:12:06.3754607Z 	github.com/hashicorp/consul/agent/structs	coverage: 0.2% of statements
2023-05-09T22:12:06.3857592Z �[32mPASS�[0m agent/structs
2023-05-09T22:12:06.4021309Z 
2023-05-09T22:12:06.4021727Z exec: go version
2023-05-09T22:12:06.4022166Z === �[31mFailed�[0m
2023-05-09T22:12:06.4023043Z === �[31mFAIL�[0m: agent/structs TestDecodeConfigEntry/service-defaults_(snake_case) (0.00s)
2023-05-09T22:12:06.4025861Z     config_entry_test.go:2137: 
2023-05-09T22:12:06.4026561Z         	Error Trace:	/home/runner/work/consul/consul/agent/structs/config_entry_test.go:2137
2023-05-09T22:12:06.4032800Z         	            				/home/runner/work/consul/consul/agent/structs/config_entry_test.go:2142
2023-05-09T22:12:06.4033232Z         	Error:      	Not equal: 
2023-05-09T22:12:06.4040091Z         	            	expected: &structs.ServiceConfigEntry{Kind:"service-defaults", Name:"main", Protocol:"http", Mode:"", TransparentProxy:structs.TransparentProxyConfig{OutboundListenerPort:0, DialedDirectly:false}, MeshGateway:structs.MeshGatewayConfig{Mode:"remote"}, Expose:structs.ExposeConfig{Checks:false, Paths:[]structs.ExposePath(nil)}, ExternalSNI:"abc-123", UpstreamConfig:(*structs.UpstreamConfiguration)(0xc0002d0660), Destination:(*structs.DestinationConfig)(nil), MaxInboundConnections:0, LocalConnectTimeoutMs:0, LocalRequestTimeoutMs:0, BalanceInboundConnections:"exact_balance", EnvoyExtensions:structs.EnvoyExtensions(nil), Meta:map[string]string{"foo":"bar", "gir":"zim"}, EnterpriseMeta:acl.EnterpriseMeta{}, RaftIndex:structs.RaftIndex{CreateIndex:0x0, ModifyIndex:0x0}}
2023-05-09T22:12:06.4049478Z         	            	actual  : &structs.ServiceConfigEntry{Kind:"service-defaults", Name:"main", Protocol:"http", Mode:"", TransparentProxy:structs.TransparentProxyConfig{OutboundListenerPort:0, DialedDirectly:false}, MeshGateway:structs.MeshGatewayConfig{Mode:"remote"}, Expose:structs.ExposeConfig{Checks:false, Paths:[]structs.ExposePath(nil)}, ExternalSNI:"abc-123", UpstreamConfig:(*structs.UpstreamConfiguration)(0xc0002d0e40), Destination:(*structs.DestinationConfig)(nil), MaxInboundConnections:0, LocalConnectTimeoutMs:0, LocalRequestTimeoutMs:0, BalanceInboundConnections:"exact_balance", EnvoyExtensions:structs.EnvoyExtensions(nil), Meta:map[string]string{"foo":"bar", "gir":"zim"}, EnterpriseMeta:acl.EnterpriseMeta{}, RaftIndex:structs.RaftIndex{CreateIndex:0x0, ModifyIndex:0x0}}
2023-05-09T22:12:06.4050913Z         	            	
2023-05-09T22:12:06.4051267Z         	            	Diff:
2023-05-09T22:12:06.4051765Z         	            	--- Expected
2023-05-09T22:12:06.4052169Z         	            	+++ Actual
2023-05-09T22:12:06.4052659Z         	            	@@ -32,5 +32,5 @@
2023-05-09T22:12:06.4053239Z         	            	      MaxFailures: (uint32) 3,
2023-05-09T22:12:06.4054024Z         	            	-     EnforcingConsecutive5xx: (*uint32)(<nil>),
2023-05-09T22:12:06.4054781Z         	            	-     MaxEjectionPercent: (*uint32)(<nil>),
2023-05-09T22:12:06.4055618Z         	            	-     BaseEjectionTime: (*time.Duration)(<nil>)
2023-05-09T22:12:06.4056324Z         	            	+     EnforcingConsecutive5xx: (*uint32)(4),
2023-05-09T22:12:06.4056973Z         	            	+     MaxEjectionPercent: (*uint32)(5),
2023-05-09T22:12:06.4057712Z         	            	+     BaseEjectionTime: (*time.Duration)(6000000000)
2023-05-09T22:12:06.4058148Z         	            	     }),
2023-05-09T22:12:06.4058742Z         	Test:       	TestDecodeConfigEntry/service-defaults_(snake_case)
2023-05-09T22:12:06.4058971Z 
2023-05-09T22:12:06.4059328Z === �[31mFAIL�[0m: agent/structs TestDecodeConfigEntry/service-defaults_(camel_case) (0.00s)
2023-05-09T22:12:06.4059768Z     config_entry_test.go:2137: 
2023-05-09T22:12:06.4060624Z         	Error Trace:	/home/runner/work/consul/consul/agent/structs/config_entry_test.go:2137
2023-05-09T22:12:06.4061749Z         	            				/home/runner/work/consul/consul/agent/structs/config_entry_test.go:2145
2023-05-09T22:12:06.4062151Z         	Error:      	Not equal: 
2023-05-09T22:12:06.4072573Z         	            	expected: &structs.ServiceConfigEntry{Kind:"service-defaults", Name:"main", Protocol:"http", Mode:"", TransparentProxy:structs.TransparentProxyConfig{OutboundListenerPort:0, DialedDirectly:false}, MeshGateway:structs.MeshGatewayConfig{Mode:"remote"}, Expose:structs.ExposeConfig{Checks:false, Paths:[]structs.ExposePath(nil)}, ExternalSNI:"abc-123", UpstreamConfig:(*structs.UpstreamConfiguration)(0xc0002d0660), Destination:(*structs.DestinationConfig)(nil), MaxInboundConnections:0, LocalConnectTimeoutMs:0, LocalRequestTimeoutMs:0, BalanceInboundConnections:"exact_balance", EnvoyExtensions:structs.EnvoyExtensions(nil), Meta:map[string]string{"foo":"bar", "gir":"zim"}, EnterpriseMeta:acl.EnterpriseMeta{}, RaftIndex:structs.RaftIndex{CreateIndex:0x0, ModifyIndex:0x0}}
2023-05-09T22:12:06.4082041Z         	            	actual  : &structs.ServiceConfigEntry{Kind:"service-defaults", Name:"main", Protocol:"http", Mode:"", TransparentProxy:structs.TransparentProxyConfig{OutboundListenerPort:0, DialedDirectly:false}, MeshGateway:structs.MeshGatewayConfig{Mode:"remote"}, Expose:structs.ExposeConfig{Checks:false, Paths:[]structs.ExposePath(nil)}, ExternalSNI:"abc-123", UpstreamConfig:(*structs.UpstreamConfiguration)(0xc0002d11a0), Destination:(*structs.DestinationConfig)(nil), MaxInboundConnections:0, LocalConnectTimeoutMs:0, LocalRequestTimeoutMs:0, BalanceInboundConnections:"exact_balance", EnvoyExtensions:structs.EnvoyExtensions(nil), Meta:map[string]string{"foo":"bar", "gir":"zim"}, EnterpriseMeta:acl.EnterpriseMeta{}, RaftIndex:structs.RaftIndex{CreateIndex:0x0, ModifyIndex:0x0}}
2023-05-09T22:12:06.4084355Z         	            	
2023-05-09T22:12:06.4084812Z         	            	Diff:
2023-05-09T22:12:06.4085507Z         	            	--- Expected
2023-05-09T22:12:06.4086061Z         	            	+++ Actual
2023-05-09T22:12:06.4086796Z         	            	@@ -32,5 +32,5 @@
2023-05-09T22:12:06.4087667Z         	            	      MaxFailures: (uint32) 3,
2023-05-09T22:12:06.4088848Z         	            	-     EnforcingConsecutive5xx: (*uint32)(<nil>),
2023-05-09T22:12:06.4089983Z         	            	-     MaxEjectionPercent: (*uint32)(<nil>),
2023-05-09T22:12:06.4091157Z         	            	-     BaseEjectionTime: (*time.Duration)(<nil>)
2023-05-09T22:12:06.4092236Z         	            	+     EnforcingConsecutive5xx: (*uint32)(4),
2023-05-09T22:12:06.4093242Z         	            	+     MaxEjectionPercent: (*uint32)(5),
2023-05-09T22:12:06.4094358Z         	            	+     BaseEjectionTime: (*time.Duration)(6000000000)
2023-05-09T22:12:06.4095015Z         	            	     }),
2023-05-09T22:12:06.4095929Z         	Test:       	TestDecodeConfigEntry/service-defaults_(camel_case)
2023-05-09T22:12:06.4096281Z 
2023-05-09T22:12:06.4096681Z === �[31mFAIL�[0m: agent/structs TestDecodeConfigEntry (0.01s)
2023-05-09T22:12:06.4096999Z 
2023-05-09T22:12:06.4097232Z DONE 2 runs, 2135 tests, 3 failures in 140.880s

Running locally, I could repro with gotestsum versions up to the fixed one, 1.10.1.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@github-actions github-actions bot added type/ci Relating to continuous integration (CI) tooling for testing or releases theme/contributing Additions and enhancements to community contributing materials labels Jul 12, 2023
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging July 12, 2023 00:18 Inactive
@vercel vercel bot temporarily deployed to Preview – consul July 12, 2023 00:20 Inactive
@nfi-hashicorp nfi-hashicorp marked this pull request as ready for review July 12, 2023 16:57
@nfi-hashicorp nfi-hashicorp merged commit 40fd64b into release/1.15.x Jul 12, 2023
105 checks passed
@nfi-hashicorp nfi-hashicorp deleted the backport/gotestsum-1.10.1/actually-alive-calf branch July 12, 2023 16:57
@jira jira bot mentioned this pull request Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/contributing Additions and enhancements to community contributing materials type/ci Relating to continuous integration (CI) tooling for testing or releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants