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

Registry: validate language and component-type fields #1355

Open
chalin opened this issue May 17, 2022 · 0 comments · May be fixed by #5406
Open

Registry: validate language and component-type fields #1355

chalin opened this issue May 17, 2022 · 0 comments · May be fixed by #5406
Labels
e0-minutes Effort: < 60 min enhancement New feature or request p2-medium p3-low

Comments

@chalin
Copy link
Contributor

chalin commented May 17, 2022

The registry allows folks to add languages and component types on the fly. I think that's fine, but we need a way to ensure that this addition doesn't slip by unnoticed by reviewers.

Adding a cross-check against a fixed list/text file might be all we need. For example we could track the output of the following:

$ cd opentelemetry.io 
$ find content/en/registry/*.* -exec grep -e 'registryType:' {} \; | sort | uniq
registryType: core
registryType: exporter
registryType: extension
registryType: instrumentation
registryType: processor
registryType: receiver
registryType: utilities
$ find content/en/registry/*.* -exec grep -e 'language:' {} \; | sort | uniq    
language: kotlin
language: collector
language: cpp
language: dotnet
language: elixir
language: erlang
language: go
language: java
language: js
language: lua
language: php
language: python
language: ruby
language: rust
language: swift

And advantage of doing this outside of the build cycle is that it doesn't slow down the build. A disadvantage is that it might not be easy to run this check for users under Windows.

An alternative is to create data files with the currently supported values, and check each registry entry as it's page is generated.

Related:

@chalin chalin added enhancement New feature or request e0-minutes Effort: < 60 min p3-low p2-medium labels May 17, 2022
@svrnm svrnm linked a pull request Oct 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e0-minutes Effort: < 60 min enhancement New feature or request p2-medium p3-low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant