Skip to content
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

Build config: validate that elements of extra_requirements are strings #9458

Open
supersergiy opened this issue Jul 29, 2022 · 1 comment
Open
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@supersergiy
Copy link

Details:

Expected Result

Docs to build or give a meaningful error message

Actual Result

Docs did not build or give a meaningful error message

@humitos
Copy link
Member

humitos commented Aug 1, 2022

I think I found the issue with this build.

It seems that you are specifying extra_requirements as [docs] when it should be only docs in this line https://github.com/ZettaAI/zetta_utils/blob/99a103068a6a8821ddff396054562ec3099eef68/.readthedocs.yml#L27. Can you please change that line and let me know if that works?

We should validate this in our config file and show a better error message to the user. We are validating python.extra_requirements to be a list, but we should also validate that each item of that list is a string in this part of the code:

# Validate extra_requirements.
if 'extra_requirements' in raw_python:
raw_extra_requirements = raw_python['extra_requirements']
if not isinstance(raw_extra_requirements, list):
self.error(
'python.extra_requirements',
self.PYTHON_EXTRA_REQUIREMENTS_INVALID_MESSAGE,
code=PYTHON_INVALID,
)

cc @stsewd

@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap labels Aug 1, 2022
@humitos humitos added this to the YAML File Completion milestone Aug 1, 2022
@stsewd stsewd changed the title Build error with build id #17570682 Build config: validate that elements of extra_requirements are strings Aug 18, 2022
@humitos humitos changed the title Build config: validate that elements of extra_requirements are strings Build config: validate that elements of extra_requirements are strings Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
Status: Planned
Development

No branches or pull requests

2 participants