-
Notifications
You must be signed in to change notification settings - Fork 22
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
docs: Optional is False by default rather than True. #5288
docs: Optional is False by default rather than True. #5288
Conversation
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.
We can't merge this as is. The reason is that attribute.mdx is a generated file (by invoke docs.generate
), so this change needs to happen in the source location.
It also highlights the fact that the CI should have failed for this PR but doesn't as the job would have been filtered out. We need to change the CI to ensure that we run the job that executes invoke docs.validate
if any of these files are changed. Currently this doesn't happen:
validate-generated-documentation:
if: |
always() && !cancelled() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
needs.files-changed.outputs.python == 'true'
needs: ["files-changed", "yaml-lint", "python-lint"]
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: "Setup Python environment"
run: |
pipx install poetry
poetry config virtualenvs.create true --local
poetry env use 3.12
- name: "Install dependencies"
run: "poetry install --no-interaction --no-ansi"
- name: "Setup environment"
run: "pip install invoke toml"
- name: "Validate generated documentation"
run: "poetry run invoke docs.validate"
This file is auto-generated by invoke docs.generate, so your changes will be rewrite in the next generation. |
CodSpeed Performance ReportMerging #5288 will degrade performances by 50.17%Comparing Summary
Benchmarks breakdown
|
…enerated docs changes.
I believe I have this trigger correctly now. I tested this in https://github.com/opsmill/infrahub/actions/runs/12469863582/job/34803886595?pr=5288. |
Addressed by adding doc file paths to be validated
* Optional is by default rather than . * Update source of attribute optional doc so it will be auto-generated. * Testing to see if pipeline works with new changes to check for auto generated docs changes. * Add back the upstream Python change for optional attribute default to be False.
* Optional is by default rather than . * Update source of attribute optional doc so it will be auto-generated. * Testing to see if pipeline works with new changes to check for auto generated docs changes. * Add back the upstream Python change for optional attribute default to be False.
The documentation advises that
optional
istrue
by default, but it's actuallyfalse
.