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

Fix session backwards incompatibility with 1.6.x and earlier. #7398

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

mkeeler
Copy link
Member

@mkeeler mkeeler commented Mar 5, 2020

Fixes #7395

I did the following:

  1. Added back the Session field in the SessionSpecificRequest
  2. In the RPC api we "fixup" the request struct and copy the Session field to SessionID when SessionID == ""
  3. In the HTTP API we set both fields to the same value so that during upgrades sessions still work. Like where a server was just upgraded and its API was used to generate the RPC but since it was a write (like renewing a session) it gets sent along to the leader which may not be upgraded.

I have tests for 1 & 2 but can't really test item 3 there is no functional difference in the unit tests and without intercepting RPCs somehow and verifying that both fields are set, it would require a multi-version consul setup to force any error to begin with.

@mkeeler mkeeler added this to the 1.7.x milestone Mar 5, 2020
@mkeeler mkeeler requested a review from a team March 5, 2020 19:29
Copy link
Contributor

@freddygv freddygv left a comment

Choose a reason for hiding this comment

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

Should the fixup also be set on the Apply? Nevermind, it uses a different struct that wasn't changed.

Copy link
Contributor

@freddygv freddygv left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks for jumping on this.

@mkeeler
Copy link
Member Author

mkeeler commented Mar 5, 2020

I checked on the test failures - they are flakes.

@mkeeler mkeeler merged commit 7584dfe into master Mar 5, 2020
@mkeeler mkeeler deleted the bugfix/session-rpc-fixup branch March 5, 2020 20:34
mkeeler added a commit that referenced this pull request Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem upgrading from 1.6.2 to 1.7.1
2 participants