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} Include all files under data as package_data #22148

Merged
merged 1 commit into from Apr 22, 2022

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Apr 22, 2022

Description

#22056 added some file types that are not included while building the test package:

  • data/assetTrack.ttml
  • data/sampleIsmFile.ism

causing CI to fail:

https://dev.azure.com/azure-sdk/public/_build/results?buildId=1523127&view=logs&jobId=47870e38-5a53-5929-70f9-c65c4a436be8&j=47870e38-5a53-5929-70f9-c65c4a436be8&t=4b4323e2-b1dc-59ac-6bbb-9f51b3f2dde3

ex = FileNotFoundError(2, 'No such file or directory')

    def file_related_exception_handler(ex):
        from azure.cli.core.azclierror import FileOperationError
        if isinstance(ex, FileNotFoundError):
>           raise FileOperationError(ex, recommendation='Please check the file path.')
E           azure.cli.core.azclierror.FileOperationError: [Errno 2] No such file or directory: '/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/ams/tests/latest/data/assetTrack.ttml'

This mistake has happened several times:

Now we include all files under data as package_data.

See

@ghost ghost added Auto-Assign Auto assign by bot CI CI labels Apr 22, 2022
@ghost ghost requested a review from yonzhan April 22, 2022 02:49
@ghost ghost assigned wangzelin007 Apr 22, 2022
@jiasli jiasli merged commit 70d4c77 into Azure:dev Apr 22, 2022
@jiasli jiasli deleted the package_data branch April 22, 2022 03:53
@@ -171,9 +171,7 @@ cat >>$testsrc_dir/setup.py <<EOL
'**/*.txt',
'**/*.txt',
'**/*.xml',
Copy link
Member Author

Choose a reason for hiding this comment

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

Even though the document https://setuptools.pypa.io/en/latest/userguide/datafiles.html mentions:

The package_data argument is a dictionary that maps from package names to lists of glob patterns.

** actually doesn't work:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot CI CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants