Skip to content

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

Merged
nfi-hashicorp merged 1 commit into
release/1.14.xfrom
backport/gotestsum-1.10.1/deadly-curious-crawdad
Jul 12, 2023
Merged

Backport of ci: use gotestsum v1.10.1 [NET-4042] into release/1.14.x#18092
nfi-hashicorp merged 1 commit into
release/1.14.xfrom
backport/gotestsum-1.10.1/deadly-curious-crawdad

Conversation

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

Backport

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

🚨

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

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/gotestsum-1.10.1/deadly-curious-crawdad branch from deb472d to 5fb2065 Compare July 12, 2023 00:14
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/gotestsum-1.10.1/deadly-curious-crawdad branch from 9f18e48 to caf46f3 Compare July 12, 2023 00:14
Copy link
Copy Markdown
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:19 Inactive
@nfi-hashicorp nfi-hashicorp marked this pull request as ready for review July 12, 2023 16:58
@nfi-hashicorp nfi-hashicorp merged commit 8b44ab1 into release/1.14.x Jul 12, 2023
@nfi-hashicorp nfi-hashicorp deleted the backport/gotestsum-1.10.1/deadly-curious-crawdad branch July 12, 2023 16:58
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.

3 participants