-
Notifications
You must be signed in to change notification settings - Fork 174
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
Implement code-generation hints to drop/rename attributes in case of a collision #1462
Labels
tooling
Regarding build, workflows, build-tools, ...
Comments
Scenarios to consider
ProposalCombining with #1419 to keep it consistent with deprecation if possible. Scenarios 1 & 2i- id: registry.foo
...
attributes:
- id: foo.bar_id
deprecated: # not in the scope of this item
action: rename
renamed_to: foo.bar.id
code_generation_hint: # <-- this is the proposal for scenarios 1 and 2i above
action: exclude # <-- this is the proposal for scenarios 1 and 2i above Scenarios 2ii & 3- id: registry.foo
...
attributes:
- id: foo.bar_code
type: int
deprecated:
action: remove
note: Renamed to `foo.bar.code` and type changed to string
- id: foo.bar.code
type: string
code_generation_hint: # <-- this is the proposal for scenario 2ii
code_friendly_name: foo_bar_code2 # <-- this is the proposal for scenario 2ii
- id: pprof::foo.bar
code_generation_hint: # <-- this is the proposal for scenario 3
code_friendly_name: pprof_foo_bar # <-- this is the proposal for scenario 3 Alternative proposal- id: registry.foo
...
attributes:
- id: foo.bar_id
deprecated: # not in the scope of this item
action: rename
renamed_to: foo.bar.id
code_generation_hint: exclude # <-- this is the proposal for scenarios 1 and 2i above
- id: pprof::foo.bar
code_friendly_name: pprof_foo_bar # <-- this is the proposal for scenario 2ii & 3 |
The following policies will be necessary:
|
This was referenced Oct 9, 2024
Based on the discussions on slack there is a preference for option 1: code_generation_hint:
action: exclude
code_friendly_name: <> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a tracking issue for #1118 (comment) Phase 2
Currently we don't allow collisions between attribute/event/etc names in the code-friendly representation of them (
.
replaced with_
).But we have some attributes that would benefit from renaming (e.g.
db.cosmosdb.client_id
should stay consistent withmessaging.client.id
).We can resolve it by providing code-generation hints in the yaml that would help code-generator to resolve collisions.
The text was updated successfully, but these errors were encountered: