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

ci: add workflow to update otel dependencies #2536

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

We currently have to update @opentelemetry/* dependencies by manually opening a PR to do so (see #2535, for example). With the script that @trentm added (scripts/update-otel-deps.js) this process is almost fully automated already, and just has to be reviewed by a human.

This PR adds a workflow that makes @opentelemetrybot open the PR based on the changes made by the script, similar to how release PRs work in the core repo.

Ideally this workflow will help us spread the load of releasing even further by making it a bit simpler. Once merged and once we've tried running it - I'll update the core repo's releasing.md to include the instructions to run this workflow. We may even be able to have it run automatically when there's a new OTel JS core release. 🙂

@pichlermarc pichlermarc requested a review from a team as a code owner November 18, 2024 12:39
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.75%. Comparing base (e674b1b) to head (8c57efa).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2536   +/-   ##
=======================================
  Coverage   90.75%   90.75%           
=======================================
  Files         169      169           
  Lines        8026     8026           
  Branches     1635     1635           
=======================================
  Hits         7284     7284           
  Misses        742      742           

name: Create or Update OpenTelemetry Update PR

on:
workflow_dispatch:
Copy link
Contributor

Choose a reason for hiding this comment

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

  • The first time this workflow fails I'll want to see the output with DEBUG=1 ... turned on. I guess we could run it locally to try to reproduce the failure. Eventually we may want a way to run the workflow with DEBUG=1.
  • Currently update-otel-deps.js will console.warn(...) in some cases and carry on. Should we (I could) change the script (possibly optionally, or make it the default) to fail for those cases? One warning case is when the script notices that not all otel deps were updated (usually for some complex transitive dep issue).
  • Would we notice if this update script failed? I don't regularly look at https://github.com/open-telemetry/opentelemetry-js-contrib/actions for failed workflow runs. Do you know if there an prior art in any OTel repos for notifications from GH Action workflows?

Copy link
Member Author

Choose a reason for hiding this comment

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

The first time this workflow fails I'll want to see the output with DEBUG=1 ... turned on. I guess we could run it locally to try to reproduce the failure. Eventually we may want a way to run the workflow with DEBUG=1.

Yep, I think having an option to do so would be good - I'll follow up with a PR to add a toggle so that we can turn it on if needed.

Currently update-otel-deps.js will console.warn(...) in some cases and carry on. Should we (I could) change the script (possibly optionally, or make it the default) to fail for those cases? One warning case is when the script notices that not all otel deps were updated (usually for some complex transitive dep issue).

I think we could do that - we have to carefully review the PR anyway for now so I'd definitely review it in-depth before merging

Would we notice if this update script failed? I don't regularly look at https://github.com/open-telemetry/opentelemetry-js-contrib/actions for failed workflow runs. Do you know if there an prior art in any OTel repos for notifications from GH Action workflows?

For workflow runs that fail usually the person that triggered it gets a GitHub notification - are you looking for something more verbose like an automation to create issues, perhaps? 🤔

@pichlermarc pichlermarc merged commit fa78668 into open-telemetry:main Dec 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants