-
Notifications
You must be signed in to change notification settings - Fork 57
Update version-support.md via update-kubernetes script #678
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
base: main
Are you sure you want to change the base?
Update version-support.md via update-kubernetes script #678
Conversation
for more information, see https://pre-commit.ci
| def format_sources(existing, new): | ||
| items = [ | ||
| s.strip().lstrip("-").strip() | ||
| for s in existing.replace("<br>", ",").split(",") | ||
| if s.strip() | ||
| ] | ||
| # Add new provider if not already present | ||
| if new not in items: | ||
| items.append(new) | ||
| return " <br> - " + " <br> - ".join(items) |
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 function seems out of place. Why is it being defined in here?
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 tried to add this function as a formatter for displaying the service sources names for any version.
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.
Sure, but defining this as a function within another function is a little strange given that it doesn't require any variables from the scope of the parent function. It would be best to define this at the module level.
| if ( | ||
| "Extended Support" in existing_source | ||
| and provider not in existing_source | ||
| ): | ||
| version["support_source"] = format_sources( | ||
| existing_source, provider | ||
| ) | ||
| elif existing_source == "OSS Standard Support": | ||
| version["support_source"] = f"- {provider} Extended Support" |
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 code is a little hard to follow, I expect there is a simpler way to implement this. The goal here should be to show which providers are extending the support of each version.
This is how the version support table is gonna look like.

Link to the issue - #656
The script is formatted such that it can look up any changes in the version support added to the main application and make necessary changes to the table.