Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK] Fix list error when run flow snapshot is incomplete (#1811)
# Description This pull request includes changes to improve error handling and add tests for specific scenarios. The most important changes include adding error handling in the `__init__` method of the `LocalStorageOperations` class and adding code to test the behavior of accessing operations and converting a run object to a dictionary. Error handling improvements: * [`src/promptflow/promptflow/_sdk/operations/_local_storage_operations.py`](diffhunk://#diff-1a5c2463c2ef997c5203a6b2e77b247d812961b7a6df5f0f45c02579b6656719R222-R227): Added error handling in the `__init__` method of the `LocalStorageOperations` class to handle cases where the `dag.yaml` file does not exist. Testing improvements: * [`src/promptflow/tests/sdk_cli_test/e2etests/test_flow_run.py`](diffhunk://#diff-94a59a05643476869fa3c6bc45466f1582944a935488075e2e63b6a6a196958fR1268-R1285): Added code to test the behavior of accessing operations and converting a run object to a dictionary after the dag has been removed. # All Promptflow Contribution checklist: - [ ] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [ ] Title of the pull request is clear and informative. - [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes.
- Loading branch information