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

fix(instrumentation-aws-lambda): add 'lint:semconv-deps' #2569

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

Conversation

trentm
Copy link
Contributor

@trentm trentm commented Nov 30, 2024

This adds a lint step that checks that packages in the workspace
are following our 'rule' that uses of the semconv pkg 'incubating'
entry-point should pin the '@opentelemetry/semantic-conventions'
dep. This is because (though rare) the incubating/unstable
semconv exports can have breaking changes in minors.

Refs: #2549 (comment)
Refs: open-telemetry/opentelemetry-js#5182


That "rule" (to pin the semconv package dep when using the incubating entry-point) is the concensus from discussion on open-telemetry/opentelemetry-js#5182
I'm proposing this extra lint step (added to npm run lint) that will help check that this rule is followed.

This adds a lint step that checks that packages in the workspace
are following our 'rule' that uses of the semconv pkg 'incubating'
entry-point should *pin* the '@opentelemetry/semantic-conventions'
dep. This is because (though rare) the incubating/unstable
semconv exports can have breaking changes in minors.

Refs: open-telemetry#2549 (comment)
Refs: open-telemetry/opentelemetry-js#5182
@trentm trentm self-assigned this Nov 30, 2024
@trentm trentm requested a review from a team as a code owner November 30, 2024 00:58
@trentm
Copy link
Contributor Author

trentm commented Nov 30, 2024

Currently there is one package that is breaking this rule:

% npm run lint:semconv-deps

> [email protected] lint:semconv-deps
> ./scripts/lint-semconv-deps.mjs

lint-semconv-deps error: package @opentelemetry/instrumentation-aws-lambda (in plugins/node/opentelemetry-instrumentation-aws-lambda) imports "@opentelemetry/semantic-conventions/incubating" but does not *pin* the dependency: `"@opentelemetry/semantic-conventions": "^1.27.0"`

% echo $?
1

I'll update that dep in a commit on this PR.

@trentm trentm changed the title chore: add 'lint:semconv-deps' fix(instrumentation-aws-lambda): add 'lint:semconv-deps' Nov 30, 2024
Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.80%. Comparing base (0fc1ed3) to head (955ecbe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2569      +/-   ##
==========================================
+ Coverage   90.75%   90.80%   +0.04%     
==========================================
  Files         169      169              
  Lines        8018     8018              
  Branches     1632     1632              
==========================================
+ Hits         7277     7281       +4     
+ Misses        741      737       -4     

see 1 file with indirect coverage changes

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.

1 participant