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

Implement operator== for license struct #8195

Merged
merged 3 commits into from
Jan 14, 2023

Conversation

graphcareful
Copy link
Contributor

@graphcareful graphcareful commented Jan 12, 2023

Fix for an issue that manifested to a customer in newer versions of redpanda, where licenses could not be re-uploaded. The cause occurres when comparing two security::licenses via operator==, where this method was actually called on the superclass of security::license which is serde::envelope. The envelopes will always be the same in the scenario, so this comparison would always return true, preventing users from uploading newer licenses.

The fix is to correctly implement operator== for security::license.

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

Release Notes

Bug Fixes

  • Fixes a bug where licenses could not be re-uploaded.

- Fixes bug due to operator== being called on the inherited
serde::envelope struct which will always return true.

- Deletes spacheship operator overload as it could result in the same
bug and it is currently not called on this type
@dotnwat
Copy link
Member

dotnwat commented Jan 13, 2023

Looks like the license test is failing test_id: rptest.tests.rpk_cluster_test.RpkClusterTest.test_upload_and_query_cluster_license_rpk

@graphcareful
Copy link
Contributor Author

Tests have been fixed, all license tests pass on CI

@graphcareful graphcareful merged commit 4acc197 into redpanda-data:dev Jan 14, 2023
@graphcareful
Copy link
Contributor Author

/backport v22.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants