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

Update build-tools version to 0.25.0 and add display_name to all registry attribute groups #985

Merged
merged 7 commits into from
Jul 15, 2024

Conversation

AlexanderWert
Copy link
Member

Fixes #978

@AlexanderWert
Copy link
Member Author

AlexanderWert commented Apr 30, 2024

To make CI happy we need also: open-telemetry/build-tools#316

Copy link
Contributor

@trisch-me trisch-me left a comment

Choose a reason for hiding this comment

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

thanks for quick implementing it. @jsuereth could add this now into the final PR to populate correct name

Copy link
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

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

LGTM

@trisch-me
Copy link
Contributor

One question though - should we enforce then a presence of this property for registry?

@AlexanderWert
Copy link
Member Author

One question though - should we enforce then a presence of this property for registry?

yeah, I guess we could extend open-telemetry/build-tools#316 to include it in the validity checks

Copy link
Contributor

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

Could you please create an issue to update schema definition (or just update the schema definition) in the https://github.com/open-telemetry/build-tools/blob/main/semantic-conventions/semconv.schema.json to include it?

We want to move it to this repo #916, but it's not done yet

Copy link
Contributor

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM

@noahfalk
Copy link
Contributor

@JamesNK (Just fyi - This looks like a minor cosmetic change)

@jsuereth
Copy link
Contributor

jsuereth commented May 1, 2024

One question though - should we enforce then a presence of this property for registry?

Once we get the rule-engine/checker working in weaver, this is a simple configuration for semantic-conventions. Let's see if we can get that prioritized as a the next feature we need from weaver for semconv.

Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

Thanks for adding all of these.

We need to update both build-tools and weaver. I merged your build-tools change (will need a release) but we'll also need to update weaver.

Since the weaver PR merged, you should be able to actually update the weaver attribute_group.md.j2 template to use this value in this PR.

@AlexanderWert
Copy link
Member Author

Could you please create an issue to update schema definition (or just update the schema definition) in the https://github.com/open-telemetry/build-tools/blob/main/semantic-conventions/semconv.schema.json to include it?

Done, see: open-telemetry/build-tools#317

@AlexanderWert
Copy link
Member Author

Since the weaver PR merged, you should be able to actually update the weaver attribute_group.md.j2 template to use this value in this PR.

@jsuereth Done with the last commit.

@lmolkova
Copy link
Contributor

lmolkova commented May 2, 2024

@AlexanderWert I think you need to run make table-generation to re-generate registry MD files with display name.

@AlexanderWert
Copy link
Member Author

@AlexanderWert I think you need to run make table-generation to re-generate registry MD files with display name.

That's not working yet, I'm getting a validation error from weaver. So, as @jsuereth mentioned above, we need to fix weaver validation first and release a new docker image, I guess.

@jsuereth What exactly needs to be done to fix the weaver validation? Is it just about adding display_name as a property in this struct?: https://github.com/open-telemetry/weaver/blob/261e4f42518fee67a00b1a81be4029a82fd19799/crates/weaver_semconv/src/group.rs#L21

@jsuereth
Copy link
Contributor

jsuereth commented May 6, 2024

@AlexanderWert Yes - I think that change (and propagation of its value) should be what you need to do in weaver.

There's also a TemplateGroup: https://github.com/open-telemetry/weaver/blob/main/crates/weaver_forge/src/registry.rs#L29

Once you have Group / TemplateGroup updated and wired - we can immediately start rendering this attribute in the registry.

Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@AlexanderWert
Copy link
Member Author

The only thing is: Should we mark the new field as required? The Jinja template now assumes it is but if one attribute group misses it the md rendering will fail (I think).

Can we make it required only for registry attribute groups?

@trisch-me
Copy link
Contributor

we can enforce through the policies that this attribute is required for registry

@joaopgrassi
Copy link
Member

Can we make it required only for registry attribute groups?

Hum I think not, specially in the JSON schema but also on Weaver. What we can do is in the jinja template we check if display name exists and if not, we use the old behavior. I gave that a try and it worked for me locally.

@joaopgrassi
Copy link
Member

we can enforce through the policies that this attribute is required for registry

Ah really? Then forget my comment above 👍

@trisch-me
Copy link
Contributor

Then forget my comment above

but until we have it implemented we can just use the workaround you proposed

@joaopgrassi
Copy link
Member

@AlexanderWert are you able to continue this work, or should one of us take over?

@AlexanderWert
Copy link
Member Author

@AlexanderWert are you able to continue this work, or should one of us take over?

I'll update the PR with your proposal

@AlexanderWert AlexanderWert requested a review from a team June 17, 2024 10:01
@AlexanderWert
Copy link
Member Author

@joaopgrassi updated this PR

I think we need both releasing and updating the weaver version AND build tools, right?

@joaopgrassi
Copy link
Member

I think we need both releasing and updating the weaver version AND build tools, right?

Weaver for sure we need a new release. For build-tools I'm not sure.. but I assume we might (maybe bcs of the JSON schema?)

@lquerel can we have a new Weaver release?

@lmolkova
Copy link
Contributor

lmolkova commented Jul 8, 2024

Oh, I think we still need a build-tools release for this.

@lquerel
Copy link
Contributor

lquerel commented Jul 8, 2024

I think we need both releasing and updating the weaver version AND build tools, right?

Weaver for sure we need a new release. For build-tools I'm not sure.. but I assume we might (maybe bcs of the JSON schema?)

@lquerel can we have a new Weaver release?

@joaopgrassi The release v0.5.0 of Weaver contains this feature.

@joaopgrassi
Copy link
Member

Yes, we have the release and already updated Weaver version in semconv. @AlexanderWert will update the PR because it needs some changes before merging.

@AlexanderWert
Copy link
Member Author

@joaopgrassi @lmolkova @lquerel
Updated my PR.

PTAL, I also changed the order of the generated groups to make sure deprecated attributes are always listed at the end (instead of pure alphabetical order)

@AlexanderWert
Copy link
Member Author

AlexanderWert commented Jul 12, 2024

@lmolkova The compatibility check still fails.

That has been actually fixed in these PRs, but we did not have a build-tools release since then:
https://github.com/open-telemetry/build-tools/pulls?q=is%3Apr+display_name+is%3Aclosed

So, I guess we need to do a new release of the build tools and update it here.

@lmolkova
Copy link
Contributor

@AlexanderWert build-tools v0.25.0 were just published, could you try updating? Thanks!

Signed-off-by: Alexander Wert <[email protected]>
…ed groups to make deprecated groups to be always at the end.

Signed-off-by: Alexander Wert <[email protected]>
Signed-off-by: Alexander Wert <[email protected]>
Signed-off-by: Alexander Wert <[email protected]>
@AlexanderWert AlexanderWert changed the title Added display_name property to all registry attribute groups Update build-tools version to 0.25.0 and add display_name to all registry attribute groups Jul 15, 2024
@AlexanderWert AlexanderWert merged commit 4e7c42e into open-telemetry:main Jul 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
never stale PRs marked with this label will be never staled and automatically closed Skip Changelog Label to skip the changelog check
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add name property on registry attribute groups
8 participants