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: Regenerate v0.20.0 protos #1498

Merged
merged 3 commits into from
Jul 27, 2023

Conversation

arielvalentin
Copy link
Contributor

@arielvalentin arielvalentin commented Jul 27, 2023

Description

This change does a few things:

  1. Adds a guide for maintainers to update protos
  2. Updates the rake task to regenerate code from protos using a clean directory.
    1. This ensures any changes upstream that deletes protos are applied to this repo
  3. Updates the rake task to fast fail when it encounters an error, e.g. protoc is not installed

What's an error generating code look like?

@arielvalentin ➜ /workspaces/opentelemetry-ruby/exporter/otlp (refactor-proto-script) $ bundle exec rake protobuf:generate
Cloning into 'opentelemetry-proto'...
remote: Enumerating objects: 2211, done.
remote: Counting objects: 100% (641/641), done.
remote: Compressing objects: 100% (238/238), done.
remote: Total 2211 (delta 449), reused 503 (delta 342), pack-reused 1570
Receiving objects: 100% (2211/2211), 671.91 KiB | 2.76 MiB/s, done.
Resolving deltas: 100% (906/906), done.
Note: switching to '1608f92cf08119f9aec237c910b200d1317ec696'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

rake aborted!
Errno::ENOENT: No such file or directory - protoc
/workspaces/opentelemetry-ruby/exporter/otlp/Rakefile:45:in `system'
/workspaces/opentelemetry-ruby/exporter/otlp/Rakefile:45:in `block (3 levels) in <top (required)>'
/workspaces/opentelemetry-ruby/exporter/otlp/Rakefile:44:in `each'
/workspaces/opentelemetry-ruby/exporter/otlp/Rakefile:44:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-3.2.2/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `eval'
/usr/local/rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `<main>'
Tasks: TOP => protobuf:generate
(See full trace by running task with --trace)

@arielvalentin arielvalentin self-assigned this Jul 27, 2023
@arielvalentin arielvalentin changed the title fix: Regenerate v0.20 protos fix: Regenerate v0.20.0 protos Jul 27, 2023
This change does a few things:

1. Adds a guide for maintainers to update protos
2. Updates the rake task to regenerate code from protos using a clean directory.
   1. This ensures any changes upstream that _deletes_ protos are applied to this repo
3. Updates the rake task to fast fail when it encounters an error, e.g. protoc is not installed
@robertlaurin robertlaurin merged commit 8e4da19 into open-telemetry:main Jul 27, 2023
45 checks passed
@arielvalentin arielvalentin deleted the refactor-proto-script branch June 11, 2024 23:22
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