Add Scylla Sphinx Theme 1.0#815
Conversation
Upgrades the Scylla Theme to v1.x This change does not include any HP fixes or any other issues which will be handled with additional PRs. Please merge this FIRST.
Upgrades the Scylla Theme to v1.x This change does not include any HP fixes or any other issues which will be handled with additional PRs. Please merge this FIRST.
Update conf.py
|
The new workflow that runs on PRs will raise an error. This should be fixed by #807 |
tnozicka
left a comment
There was a problem hiding this comment.
thanks for updating our theme, few comments on CI setup and bash machinery
| @@ -0,0 +1,24 @@ | |||
| name: "Docs / Build PR" | |||
There was a problem hiding this comment.
just Docs GH will automatically append (pull_request) to PR contexts
There was a problem hiding this comment.
why not make just one definition with an optional last step to publish?
There was a problem hiding this comment.
The commands are different (make multiversion vs make test). Also, there are some repos that only need the "docs-pr", since the docs are published manually.
There was a problem hiding this comment.
Shouldn't you build and test the code before running publishing? That would suggest the same job (with optional publishing step for some), not 2 of them run at different times on different revisions. The code in master may differ from what is tested in the PR.
There was a problem hiding this comment.
Both workflows build and test the code, but in different ways:
-
docs-prcomplains if there are errors and warnings for the latest build. In Sphinx, warnings are suggestions to improve the rst / md syntax, but they do not prevent the site from being rendered. -
docs-pagesbuilds and test the docs for all versions before publishing (only errors, not warnings). If there are errors, the build does not publish.
There was a problem hiding this comment.
if a job is required to pass on a PR, why shouldn't it be required to pass on master / after the merge?
There was a problem hiding this comment.
It could also run after the merge.
I've open this issue to run make tests on master branch after merge: scylladb/sphinx-scylladb-theme#254
| - master | ||
| paths: | ||
| - "docs/**" | ||
| workflow_dispatch: |
There was a problem hiding this comment.
what's the use case here?
There was a problem hiding this comment.
workflow_dispatch allows you to trigger the workflow manually from the GitHub Actions panel. For more information, see GitHub Actions: Manual triggers with workflow_dispatch.
There was a problem hiding this comment.
Thx, I know what it does. I am asking about the usecase for it when we are automatically publishing master into doc pages, so it should always match. Why do you need to trigger it manually?
There was a problem hiding this comment.
Imagine you have to backport a doc related change to a version branch / tag. The workflow won't know about the change until the master branch receives an update, or the repo maintainer triggers the workflow manually.
In this situations, we recommended to trigger the latest workflow again, but it would be best to trigger a new workflow with workflow_dispatch.
There was a problem hiding this comment.
ok, I think I see where the confusion is coming from. Conventionally, we pin all of our dependencies which means we always build the same output on re-trigger. I've noticed our docs don't, which is why it needs "workflow dispatch" hack. If we were to pin all the dependencies to make reproducible builds (and I think we should), you'd update by sending a PR and bumping that version without needing this artificial step, also make sure the dependency update passes CI. If deps can change randomly on us our CI can get borked at any time by an external change which is bad.
There was a problem hiding this comment.
It's not about updating the theme, but about modifying the docs (contents) from a previous branch / version.
| - name: Build docs | ||
| run: make -C docs multiversion | ||
| - name: Deploy | ||
| run: ./docs/_utils/deploy.sh |
There was a problem hiding this comment.
set -x so CI logs contain the execution info
There was a problem hiding this comment.
Would this work?
| run: ./docs/_utils/deploy.sh | |
| run: | | |
| set -x | |
| make multiversion |
I'd prefer to apply this change first to the workflow files all projects are sharing. We can add set -x with the next theme release 1.1.
There was a problem hiding this comment.
it's i different command this time but it's the structure I had in mind
There was a problem hiding this comment.
Could you please open an issue or a PR here with your proposal? https://github.com/scylladb/sphinx-scylladb-theme Other projects could benefit from this change as well. Thanks!
|
@dgarcia360 @tnozicka what is missing to merge this PR? |
| - master | ||
| paths: | ||
| - "docs/**" | ||
| workflow_dispatch: |
There was a problem hiding this comment.
ok, I think I see where the confusion is coming from. Conventionally, we pin all of our dependencies which means we always build the same output on re-trigger. I've noticed our docs don't, which is why it needs "workflow dispatch" hack. If we were to pin all the dependencies to make reproducible builds (and I think we should), you'd update by sending a PR and bumping that version without needing this artificial step, also make sure the dependency update passes CI. If deps can change randomly on us our CI can get borked at any time by an external change which is bad.
| @@ -0,0 +1,24 @@ | |||
| name: "Docs / Build PR" | |||
There was a problem hiding this comment.
if a job is required to pass on a PR, why shouldn't it be required to pass on master / after the merge?
| pygments = "2.2.0" | ||
| recommonmark = "0.5.0" | ||
| sphinx-scylladb-theme = "~0.1.11" | ||
| sphinx-scylladb-theme = "~1.0.0" |
There was a problem hiding this comment.
I think here (and everywhere else) we should pin with equality for the reasons mentioned above
There was a problem hiding this comment.
"~" means update only if there is a new patch.
This allows us to release new theme versions with nonbreaking changes without having to submit a PR per repository.
If the major or minor is updated, the theme is not updated automatically.
More information: scylladb/sphinx-scylladb-theme#75
There was a problem hiding this comment.
I still believe we need to pin the dependencies but we could leave this and just add the poetry-lock file which solve this.
One of the goals of the CI run is reproducibility which would be negated by running with different dependency versions.
We needed to fix the python deps and while adding CI for it I had to pick most of the pieces from this PR in #886
|
Closing this in favor of #886 that has already landed. |
Replaces #802
Sphinx ScyllaDB Theme 1.0 is now released 🥳
We’ve made a number of updates to the look and feel of the theme to improve the overall user experience.
You can read more about all notable changes here.
This PR also cleans the file
conf.py, removing several unsued options.How to test this PR
Clone this PR. For more information, see Cloning pull requests locally.
Enter the docs folder, and run: