Enable integration target version ranges#338
Merged
colin-higgins merged 6 commits intodevelopfrom May 7, 2019
Merged
Conversation
| return false; | ||
| } | ||
|
|
||
| if (target.min_v_major > metadata.majorVersion) { |
Member
There was a problem hiding this comment.
I was thinking about how we could move this code that compares versions somewhere else and realized there's already a Version struct that we can probably use here. We can add relational operators to it (it already has an equality operator) and do comparisons like:
// compares major, minor, etc
if (target.min_version <= metadata.version &&
metadata.version <= target.max_version) {
// version is inside valid range
}We could also add a method to parse from a string, and maybe even a conversion from ASSEMBLYMETADATA.
Member
Author
There was a problem hiding this comment.
Yeah, that's perfect. Is it okay if I visit that in the next PR? I'll be applying this to all existing integrations per the docs, as well as adding exclusion reasons as logs.
lucaspimentel
approved these changes
May 7, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enables specifying safe version ranges for targeted methods in integrations.
Example: An integration which is only safe to load for v6 of the Elasticsearch.Net client
Filtering happens at
ModuleLoadFinished, not theJITCompilationStartedevent. Future enhancement would be to add another check withinJITCompilationStarted.