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

Update validate_assets.py: Ignore .whl files in build context #2896

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shivamMg
Copy link
Contributor

@shivamMg shivamMg commented May 14, 2024

Ignore python wheel files (.whl) when validating files in Env build context. Currently we try to read all files inside Env's build context. We need to commit .whl files for python packages that are not yet available on pypi. One such package is singularityrt: #2892

A failing GH Actions run for reference: https://github.com/Azure/azureml-assets/actions/runs/9065729716/job/24906950702?pr=2892

Traceback (most recent call last):
  File "/home/runner/work/azureml-assets/azureml-assets/scripts/azureml-assets/azureml/assets/validate_assets.py", line 1150, in <module>
    success = validate_assets(input_dirs=input_dirs,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/azureml-assets/azureml-assets/scripts/azureml-assets/azureml/assets/validate_assets.py", line 1057, in validate_assets
    error_count += validate_build_context(asset_config.extra_config_as_object())
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/azureml-assets/azureml-assets/scripts/azureml-assets/azureml/assets/validate_assets.py", line 303, in validate_build_context
    contents = f.read()
               ^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbc in position 15: invalid start byte

Ignore python wheel files (.whl) when validating files in Env build context.

```python
Traceback (most recent call last):
  File "/home/runner/work/azureml-assets/azureml-assets/scripts/azureml-assets/azureml/assets/validate_assets.py", line 1150, in <module>
    success = validate_assets(input_dirs=input_dirs,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/azureml-assets/azureml-assets/scripts/azureml-assets/azureml/assets/validate_assets.py", line 1057, in validate_assets
    error_count += validate_build_context(asset_config.extra_config_as_object())
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/azureml-assets/azureml-assets/scripts/azureml-assets/azureml/assets/validate_assets.py", line 303, in validate_build_context
    contents = f.read()
               ^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbc in position 15: invalid start byte
```
Copy link

github-actions bot commented May 14, 2024

Test Results for scripts-test

62 tests   61 ✅  6m 46s ⏱️
 1 suites   0 💤
 1 files     1 ❌

For more details on these failures, see this check.

Results for commit 09c9f49.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@vizhur vizhur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need more context on that

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

Successfully merging this pull request may close these issues.

None yet

2 participants