This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Use semver to determine API compatibility #10
Merged
dyladan
merged 5 commits into
open-telemetry:main
from
dyladan:semver-compatibility-rebase
Feb 26, 2021
Merged
Use semver to determine API compatibility #10
dyladan
merged 5 commits into
open-telemetry:main
from
dyladan:semver-compatibility-rebase
Feb 26, 2021
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 93.77% 94.65% +0.87%
==========================================
Files 37 39 +2
Lines 466 505 +39
Branches 75 80 +5
==========================================
+ Hits 437 478 +41
+ Misses 29 27 -2
Continue to review full report at Codecov.
|
This was referenced Feb 24, 2021
dyladan
force-pushed
the
semver-compatibility-rebase
branch
from
February 25, 2021 18:26
3c20ab7
to
2d6eda2
Compare
dyladan
force-pushed
the
semver-compatibility-rebase
branch
from
February 25, 2021 20:53
2d6eda2
to
69ae974
Compare
dyladan
requested review from
Flarna,
johnbley,
legendecas,
markwolff,
mayurkale22,
mwear,
naseemkullah,
obecny,
OlivierAlbertini and
vmarchaud
as code owners
February 25, 2021 20:54
vmarchaud
reviewed
Feb 25, 2021
vmarchaud
approved these changes
Feb 25, 2021
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.
nit pick, otherwise lgtm
Flarna
approved these changes
Feb 26, 2021
This will prevent any chance of a version X API interfering with a version Y API if X and Y are different major versions.
obecny
approved these changes
Feb 26, 2021
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Replaces #6 and depends on #9.
This will be kept as a draft until #9 merges.This PR introduces the ability for the API to use its version to determine compatibility with the global API instance in a semver compatible manner, replacing the
API_COMPATIBILITY_VERSION
constant which had to be manually incremented.In order to do this, it introduces
registerGlobal
andunregisterGlobal
functions.registerGlobal
Takes a string which identifies the API type and an instance of that API. Checks that no API of that name has been registered. Also checks that it is compatible with previously registered API types so that we can be sure interoperation between APIs is safe. This is not exported and is not meant to be called by end users directly.
unregisterGlobal
This is called when the user disables an API. It removes the globally registered API instance identified by the string. This is not exported and is not meant to be called by end users directly.