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

test: fix compat integration error from new access log api #15827

Closed
wants to merge 1 commit into from

Conversation

DanStough
Copy link
Contributor

Description

This fixes failures in the integration test suite for upgrades. The problem was caused by using the latest version of api module, with new fields, against the upgrade source of Consul, resulting in a 400 error. This causes the tests to timeout.

This isn't a fix for the problem so much as removing a nice-to-have step. All the values in the proxy-default are assumed to be the fault, so the effect is negligible.

@DanStough DanStough added the pr/no-changelog PR does not need a corresponding .changelog entry label Dec 16, 2022
@huikang
Copy link
Contributor

huikang commented Dec 17, 2022

Description

This fixes failures in the integration test suite for upgrades. The problem was caused by using the latest version of api module, with new fields, against the upgrade source of Consul, resulting in a 400 error. This causes the tests to timeout.

@DanStough , thanks for fixing this. Having a question about what caused the problem: I observed that the error occurs when the test code constructs clusters using images of old version

acceptingCluster, acceptingClient, _ = libcluster.CreatingAcceptingClusterAndSetup(t, 3, tc.oldversion, acceptingPeerName)
wg.Done()
}()
defer func() {
terminate(t, acceptingCluster)
}()
wg.Add(1)
go func() {
dialingCluster, dialingClient, _ = libcluster.CreateDialingClusterAndSetup(t, tc.oldversion, dialingPeerName)

So should the root cause be using the latest version of apimodule, with new fields, against the __old__ source of Consul, resulting in a 400 error.? Please correct me if I am wrong.

        	            				./test/integration/consul-container/test/upgrade/peers_http_test.go:60
        	            				./test/integration/consul-container/test/upgrade/asm_amd64.s:1594
        	Error:      	Received unexpected error:
        	            	Unexpected response code: 400 (Request decoding failed: 1 error occurred:
        	            		* invalid config key "AccessLogs")
        	Test:       	TestPeering_UpgradeToTarget_fromLatest/upgrade_from_1.14_to_local
2022/12/16 19:45:23 Container is ready id: 604bbd9dd3bd image: consul:1.14
    helpers.go:67: 
        	Error Trace:	/test/integration/consul-container/test/upgrade/helpers.go:67
        	            				/test/integration/consul-container/test/upgrade/peers_http_test.go:51
        	            				/test/integration/consul-container/test/upgrade/asm_amd64.s:1594
        	Error:      	Received unexpected error:
        	            	Unexpected response code: 400 (Request decoding failed: 1 error occurred:
        	            		* invalid config key "AccessLogs")

@eculver
Copy link
Contributor

eculver commented Dec 17, 2022

I'm having a hard time with the fact that new fields in the request cause failures, but that's a separate issue altogether. We should definitely revisit this at some point.

Copy link
Contributor

@eculver eculver left a comment

Choose a reason for hiding this comment

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

I was able to get this working by pinning a version of the api submodule and using that instead of the local version. I will link to the PR shortly.

@eculver
Copy link
Contributor

eculver commented Dec 17, 2022

I was able to get this working by pinning a version of the api submodule and using that instead of the local version. I will link to the PR shortly.

See #15830.

@DanStough
Copy link
Contributor Author

Closing this PR in favor of #15831

@DanStough DanStough closed this Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog PR does not need a corresponding .changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants