-
Notifications
You must be signed in to change notification settings - Fork 5
chore(fix): Installing mkdocs related decencies from docs.yml #402
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: develop
Are you sure you want to change the base?
Conversation
b69db9f
to
f854809
Compare
f854809
to
096ff6c
Compare
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.
Should this be a part of the docs
workflow in the first place?
Hey I agree, but few factors such as
these would prove as hindrance to achieve this . |
pip install mkdocs==1.6.1 mkdocs-material==9.6.9 poetry | ||
pip install poetry | ||
DOCS_FILE="" | ||
if [[ -f ".github/workflows/docs.yml" ]]; then |
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.
Instead of having to parse the docs.yml
workflow file to get the dependencies to install, it make more sense to keep those dependencies in the pyproject.toml
file under a specific group (i.e. docs) and then use directly from there to install these dependencies (using poetry install --only docs
).
WDYT?
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.
Agree.
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.
to give a bit of context on why it was done this way - so that doc dependencies can be upgraded separately and not to introduce new dependencies for TA teams
those dependencies would need to be added manually for every repository, we can't roll those out because it will mess poetry.lock
and devs would need to update it manually which is quite a procedure
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 agree with argument about updating poetry.lock
. On the other hand I don't really like current approach where versions are hardcoded in docs.yml
workflow:
- complex libs retrieval for validation - as in this PR
- if certain repo requires different libraries, template rollout will need to handle exceptions.
What about introducing requirements-docs.txt
for now and encouraging devs to introduce new group to pyproject.toml
as Darshan mentioned?
good points Siddharth, there are trade-offs with the solution that I propose, especially around your 3rd point; theoretically we can have a PR that would be merged even the documentation fails from regarding first point - it's controlled by template repo, this Jira https://splunk.atlassian.net/browse/ADDON-80483 might help us to mitigate this risk if implemented |
What about adding
If we want to enforce state of |
Discussed this topic with @pawel-dabro and came up with below idea:
Above approach will make sure that changes on TA repos are not negatively affecting docs while keeping docs related logic out of addonfactory-reusable-wf. |
Description
Add-ons can define different sets of MkDocs plugins in the plugins section of their
mkdocs.yml
files. In order to successfully validate and build the documentation for any given add-on, all the plugin dependencies listed must be installed beforehand.This PR introduces logic to dynamically parse the
mkdocs.yml
file, extract the plugin names specified, and install the corresponding Python packages at runtime. This ensures that themkdocs build
command can run successfully for any add-on without requiring manual intervention or hardcoded dependencies.Checklist
README.md
has been updated or is not requiredTesting done for validate-docs-change and enforce-docs-change for different add-ons
google-workspace: https://github.com/splunk/splunk-add-on-for-google-workspace/actions/runs/15015127274
MSCS: https://github.com/splunk/splunk-add-on-for-microsoft-cloud-services/actions/runs/15037460713
Salesforce: https://github.com/splunk/splunk-add-on-for-salesforce/actions/runs/15037974955