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

CI/CD Pipeline Failures Due to HACS Validation Errors and Pytest ImportError #24

Open
040medien opened this issue Oct 29, 2024 · 0 comments

Comments

@040medien
Copy link
Contributor

040medien commented Oct 29, 2024

I'm encountering failures in the CI/CD pipeline that are not related to recent pull requests. The issues seem to stem from validation errors and a testing ImportError.

HACS Action Validation Errors

Error Messages:

Error:  <Validation hacsjson> failed:  extra keys not allowed @ data['domains']. Got ['sensor'] (More info: https://hacs.xyz/docs/publish/include#check-hacs-manifest )
Error:  <Validation integration_manifest> failed:  required key not provided @ data['issue_tracker'] (More info: https://hacs.xyz/docs/publish/include#check-manifest )
Error:  <Integration 040medien/sensor.stadtreinigung_hamburg> 2/3 checks failed

Summary:

The HACS action is failing due to validation errors in hacs.json and manifest.json.
hacs.json Issue: The domains key is not allowed and causes a validation error.
manifest.json Issue: The required issue_tracker field is missing.

2. Pytest ImportError with Jinja2

Error Message:

ImportError: cannot import name 'contextfilter' from 'jinja2' (/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/jinja2/__init__.py)
Error: Process completed with exit code 1.
Summary:

The test suite fails because contextfilter has been removed in Jinja2 version 3.1.0.
The version of Home Assistant used in tests is incompatible with Jinja2 >= 3.1.0.

Steps to Reproduce:

Trigger the CI/CD pipeline (e.g., by opening a pull request or pushing to the repository).
Observe the pipeline failing during the HACS action and testing stages.
Suggested Solutions:

For HACS Validation Errors:

Update hacs.json: Remove the domains key since it's not allowed.
Update manifest.json: Add the issue_tracker field with the appropriate URL.
For Pytest ImportError:

Pin Jinja2 Version: Modify requirements_test_all.txt to pin Jinja2 to a version less than 3.1.0 by adding Jinja2<3.1.0.
Additional Information:

Addressing these issues will fix the CI/CD pipeline failures and ensure that future contributions can be tested and merged smoothly.

Let me know if I can assist with making these changes or if further information is needed.

Thank you for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant