-
Notifications
You must be signed in to change notification settings - Fork 35
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
Generate semantic conventions using sbt #336
Conversation
No, I don't think so. If we are already on an alpha version, Steward should suggest newer alphas.
Allowing pre-release updates means that it will propose updates to pre-releases even if you are currently on a stable version. |
To test this, can just setup the infra in this PR, but not do the actual update? As soon as it merges Steward should make a PR, and we can see if its working. |
val genAttributes = List( | ||
"docker", | ||
"run", | ||
"--rm", |
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.
Hmm. Is Scala Steward able to run docker images? 🤔 I think it may be running in a docker itself.
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.
Ah, I forgot Scala Steward runs in docker. Then it won't work. 🙁
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.
Actually, I might be wrong about this. Maybe the public steward is running in docker, but I think the Typelevel steward is just running in ordinary GHA.
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.
🤔 let's give it a try.
Currently, there is only one release in the https://github.com/open-telemetry/semantic-conventions-java.
A new release of the Semantic Conventions should be published soon open-telemetry/semantic-conventions#380. Java release will follow eventually.
Then, Scala Steward will try to do its work.
Alright, I removed Scala Steward's hook. Scala Steward will let us know if there is a new version and then we can run the generator manually. |
Can we add some sort of check to CI so that the PR fails if the version is not matching the generated code? |
4be1977
to
2df0f11
Compare
Good point, I added tests for this particular case. |
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.
this looks correct(ish) to me, though I confess not to be super well-versed in docker
According to this discussion open-telemetry/semantic-conventions-java#27 (comment), we occasionally need to manually add deprecated attributes to the template. On the bright side, MiMa will let us know if we forgot to add an attribute. Unless we can automate the update of the template, for example, by parsing So, the workflow will be the following:
|
I also explicitly set I've updated the template and the attributes are in sync now. |
*/ | ||
@deprecated("Use SemanticAttributes.HttpResponseContentLength instead", "") | ||
@deprecated("Use SemanticAttributes.HttpResponseContentLength instead", "Semantic Conventions 1.13.0") |
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.
Is it worth mentioning in which version of the semantic conventions the attribute has been deprecated?
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.
In general, since
refers to the version of the library. In contrast, I mention the version of a third-party semantic convention.
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.
This was previously discussed in:
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.
Thanks, I reverted this change.
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.
can we put an otel4s version in there rather than an empty string?
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.
I don't see reasons why we shouldn't.
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.
The semconv
module wasn't published yet. Can we set since = 0.3.0
everywhere?
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.
that sounds right.
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.
I've updated the deprecation annotation.
09e1e61
to
d1d5222
Compare
d1d5222
to
58dbcc5
Compare
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.
thanks, this was a really good idea. I think it looks good! we will see when the next update rolls in 😅
it seems like scala steward did not notify us, and we're behind |
Motivation
The
otel4s-semconv
module has been out of sync for a while. I see two options:Here is my attempt to semi-automate the process.
The workflow
opentelemetry-semconv
sbt semanticConventionsGenerate
commandA question
Will
-alpha
suffix in the version prevent Scala Steward from picking new versions?~Do we need to allow pre-release updates in
.scala-steward.conf
?: