azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Restarting failed job can fix python - storage - ci pipeline failure

Open xiafu-msft opened this issue 4 years ago • 2 comments

https://dev.azure.com/azure-sdk/public/_build/results?buildId=803085&view=ms.vss-test-web.build-test-results-tab image

the failure is because: in the below code block, with open(file_name, 'rb') as stream: cannot find this file blob_strict_mode.temp.dat (which seems get deleted by another running test?), while that file is just created by this line with open(file_name, 'wb') as stream:.

        file_name = 'blob_strict_mode.temp.dat'
        with open(file_name, 'wb') as stream:
            stream.write(content)
        with open(file_name, 'rb') as stream:
            with self.assertRaises(ValueError):
                blob.upload_blob(stream, blob_type=service)

xiafu-msft avatar Mar 25 '21 21:03 xiafu-msft

Test should use tmpfile, and not a hardcoded file. If filename is required, then a tmpdir. Since it's on the test design side, re-assigning from engsys to storage crew.

lmazuel avatar Dec 17 '21 23:12 lmazuel

Reviving this item as we still see some issues with local files occasionally so would be good to switch to tmpfile or alike as Laurent has suggested.

jalauzon-msft avatar Nov 10 '22 21:11 jalauzon-msft

Hi @xiafu-msft, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

github-actions[bot] avatar Mar 15 '24 18:03 github-actions[bot]