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

docs: align all supported versions to a common format #2196

Open
wants to merge 54 commits into
base: main
Choose a base branch
from

Conversation

blumamir
Copy link
Member

@blumamir blumamir commented May 11, 2024

This PR is not breaking any existing behavior, it only aligns everywhere to use a consistent versioning syntax and documentation, as well as capping supportedVersions for any existing instrumentation

  • make sure there is upper limit on all supported versions so that they do not attempt to patch a new major version
  • align the range to a common format. It seems many instrumentation where using >=x.y.z <w writing so I used it
  • README.md: added where missing, moved to always be after Installation section, added package name and npm link before version range to give more context.
  • added section to GUIDELINES.md
  • replace all the use of astrix * for unordered list style in makrdown to use dash -, it causes errors in markdown linter after introducing new sections.

related: open-telemetry/opentelemetry-js#4693
related: open-telemetry/opentelemetry-js#4696

blumamir and others added 18 commits May 15, 2024 09:49
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Copy link

linux-foundation-easycla bot commented May 18, 2024

@blumamir
Copy link
Member Author

@trentm @JamieDanielson I think I addressed all the comments from your reviews. Since these are a lot of changes, please have a look again. I think EasyCLA is having hard time with the commits done via the code suggestion feature of PR comments in the UI. I will squash and merge all the commits after your review so to not lose and existing comments.

The one last thing I am not sure about is if we should choose caret ^ range when the version range is just one major version. I am split on this, but tend to prefer replacing it with >=1.0.0 <2 instead of ^1.0.0. WDYT?

Thanks again for those great comments suggestions and catches.

Copy link
Contributor

@trentm trentm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits. I think it would be good to not have this labelled as purely a "docs" PR because it does include code changes for a few modules to add an upper limit on the instrumented versions.

@@ -74,6 +74,8 @@ import {
} from './utils';
import { VERSION } from './version';

const supportedVersions = ['>=0.5.5 <1'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Perhaps this is academic because there isn't an amqplib 1.x release, and I'm guessing there isn't one in the short term. However, this is a "docs:" PR that changes instr-amqplib code. Perhaps mention this change is adding an upper limit for this instr?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I allowed myself to do that, because I was looking at the current major and capped it there. While very unlikely that any user will be affected by this, I don't mind documenting it just in case. Do you think the scope should change from docs to fix!?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the scope be docs, chore: ...? I suppose it could be fix as well. I don't think it is realistically a breaking change for any of the instrumentations changed, but I'm not opposed to a very conservative fix!.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I prefer to err on the side of conservative, and point out possible behavior changes even if they are unlikely. Renaming from docs tochore could be sufficient here (...depending on the definition of chore, which differs across resources as it could be "non-source changes" - disqualifying this - or "routine tasks" - where this fits... but that might be too far off-course to have that convo here 😅 )

@@ -40,7 +40,7 @@ export default class Instrumentation extends InstrumentationBase {
return [
new InstrumentationNodeModuleDefinition(
MODULE_NAME,
['>=3'],
['^3.0.0'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Similar to the amqplib point above. This PR is slightly more than just a docs PR.

@@ -21,7 +21,7 @@ npm install @opentelemetry/instrumentation-graphql

### Supported Versions

`^14.0 | ^15.0 | ^16.0`
- [`graphql`](https://www.npmjs.com/package/graphql) versions `'>=14.0.0 <17'`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`graphql`](https://www.npmjs.com/package/graphql) versions `'>=14.0.0 <17'`
- [`graphql`](https://www.npmjs.com/package/graphql) versions `>=14.0.0 <17`


Specific guidelines for different cases:

- For `Different Modules`, instrumentations can use an upper limit on patched packages but it is unknown which future versions of the instrumented package will continue to use it. Thus it is ok to use an open upper limit `>=1.2.3` for the instrumented package.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- For `Different Modules`, instrumentations can use an upper limit on patched packages but it is unknown which future versions of the instrumented package will continue to use it. Thus it is ok to use an open upper limit `>=1.2.3` for the instrumented package.
- For `Different Modules`, instrumentations can use an upper limit on patched packages but it is unknown which future versions of the instrumented package will continue to use it. Thus it is ok to use an open upper limit, for example `>=1.2.3`, for the instrumented package.

- [ ] Test the instrumentation with the new version to ensure it works as expected.
- [ ] Update the supported versions list in the instrumentation code, perhaps with different patches and additional `InstrumentationNodeModuleDefinition`s that target the new version.
- [ ] Update the README file to reflect the support for new versions.
- [ ] For instrumentations that use test-all-versions `.tav.yaml`, add the new version to the list of versions to test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [ ] For instrumentations that use test-all-versions `.tav.yaml`, add the new version to the list of versions to test.
- [ ] For instrumentations that use test-all-versions `.tav.yml`, add the new version to the list of versions to test.

@JamieDanielson
Copy link
Member

The one last thing I am not sure about is if we should choose caret ^ range when the version range is just one major version. I am split on this, but tend to prefer replacing it with >=1.0.0 <2 instead of ^1.0.0. WDYT?

I actually prefer >=1.0.0 <2 over ^1.0.0 and would support using that. It also makes it more consistent with the other larger ranges.

@JamieDanielson
Copy link
Member

/easycla

@trentm
Copy link
Contributor

trentm commented May 22, 2024

I actually prefer >=1.0.0 <2 over ^1.0.0

Same.

Copy link
Member

@JamieDanielson JamieDanielson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have similar nits to what Trent pointed out, aside from those LGTM 👍

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