ci(docs): add new column detailing default provider enablement#57
Conversation
some providers are enabled by default in our distro whereas others require an environmental variable to be set when the container boots this commit makes that distinction clearer by adding it to our auto-generated docs Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
WalkthroughThe documentation table in distribution/README.md now includes an “Enabled by default?” column. scripts/gen_distro_docs.py was updated to compute and emit this column by detecting conditional provider patterns and marking them as not enabled by default; non-conditional providers are marked enabled. Sorting and other behaviors remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
actor Dev as Developer
participant Script as gen_distro_docs.py
participant Providers as Provider Configs
participant Table as Distro Table (README)
Dev->>Script: Run docs generation
Script->>Providers: Iterate API/provider pairs
loop For each pair
Script->>Script: Detect conditional pattern in provider_id<br/>(matches ${...:+...})
alt Conditional pattern found
Script->>Script: enabled_by_default = "No"
else No conditional
Script->>Script: enabled_by_default = "Yes"
end
Script->>Table: Append row (api_name, provider_type, enabled_by_default)
end
Script->>Table: Write header with 3 columns
Note right of Table: Table now includes "Enabled by default?" column
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
||
| # Check if provider_id contains the conditional syntax ${<something>:+<something>} | ||
| # This regex matches the pattern ${...} containing :+ | ||
| is_conditional = bool( |
There was a problem hiding this comment.
if provider_id is missing from config, it looks it will default to empty string and gets treated as "enabled by default", right? do we want to handle that case or assume provider_id will be there always...
otherwise, LGTM @nathan-weinberg . Thanks!
There was a problem hiding this comment.
Provider ID should always be there - otherwise it would be an invalid run.yaml and the CI would catch it elsewhere 😄
What does this PR do?
some providers are enabled by default in our distro whereas others require an environmental variable to be set when the container boots
this commit makes that distinction clearer by adding it to our auto-generated docs
Summary by CodeRabbit
Documentation
Chores