-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Add more transport version validation cases #134597
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
Conversation
This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages.
Pinging @elastic/es-core-infra (Team:Core/Infra) |
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.
LGTM
...groovy/org/elasticsearch/gradle/internal/transport/TransportVersionGenerationFuncTest.groovy
Outdated
Show resolved
Hide resolved
when: | ||
def result = validateResourcesFails() | ||
then: | ||
assertValidateResourcesFailure(result, "Transport version definition file " + |
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.
Do I get the same error if entire file is removed? Say, I commit a TV change and then revert the entire thing?
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.
No. In that case you would get an error about a referenced transport version that doesn't have a definition.
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.
I mean if you reverted the entire change. So you removed any references as well. Would we catch such a revert?
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.
We do not, at least not directly, but sort of by design. We have to be able to remove transport versions eventually. The trick is we have to remove them from the tail end. However, if someone were to just remove a transport version in the middle of the known transport versions, we should eventually catch this with our primary id density check. But we can't do that until we've migrated more transport versions to remove the gap we currently have.
This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages.
This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages.
This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages.
This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages.
This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages.
* Add more transport version validation cases (#134597) This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages. * Only validate primary ids on release branches (#135044) Primary ids are only incremented on the main branch. For release branches only patch ids will be created. The primary id validation won't always work on release branches because only some of the primary ids will be backported. This commit skips primary id validation if we are sure we are on a release branch. We can tell this by looking at the current upper bound compared to other upper bounds. If there is a newer one, we know we are on a release branch. If there isn't a newer one, we _might_ be on a release branch, or on main, but in this case doing primary id validation is ok because there's effectively no difference, we are looking at the latest upper bound. * fix compile
* Add more transport version validation cases (#134597) This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages. * Only validate primary ids on release branches (#135044) Primary ids are only incremented on the main branch. For release branches only patch ids will be created. The primary id validation won't always work on release branches because only some of the primary ids will be backported. This commit skips primary id validation if we are sure we are on a release branch. We can tell this by looking at the current upper bound compared to other upper bounds. If there is a newer one, we know we are on a release branch. If there isn't a newer one, we _might_ be on a release branch, or on main, but in this case doing primary id validation is ok because there's effectively no difference, we are looking at the latest upper bound. * fix compile
* Add more transport version validation cases (#134597) This commit adds a few more validations: * we cannot jump the primary id more than the normal increment * we cannot remove an existing id Also fixed definition path output in some validation error messages. * Only validate primary ids on release branches (#135044) Primary ids are only incremented on the main branch. For release branches only patch ids will be created. The primary id validation won't always work on release branches because only some of the primary ids will be backported. This commit skips primary id validation if we are sure we are on a release branch. We can tell this by looking at the current upper bound compared to other upper bounds. If there is a newer one, we know we are on a release branch. If there isn't a newer one, we _might_ be on a release branch, or on main, but in this case doing primary id validation is ok because there's effectively no difference, we are looking at the latest upper bound.
This commit adds a few more validations:
Also fixed definition path output in some validation error messages.