-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 PluginV1 fields backward compatibility #41944
Fix PluginV1 fields backward compatibility #41944
Conversation
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
6 similar comments
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this?
d60052e
to
dd7f0d0
Compare
dd7f0d0
to
bdb5920
Compare
@smallinsky See the table below for backport results.
|
What
Fix feature
UnmarshalPlugin
compatibilityExtending plugin struct
When a new plugin or new field is added to the PluginV1 struct:
the
UnmarshalPlugin
will marshal proto to the following JSON object:and the plugin will be successfully installed.
Downgrading Teleport Version
When Teleport is downgraded, the marshal function will fail with an unknown field error, producing a lot of periodic noise, and will not start the plugin, breaking backward compatibility.
This will also occurs when a new plugin type is added to
PluginSpecV1
To fix that the
AllowUnknownFields: true
needs to be set.