Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add the option to add an error to an ActivityResult #155

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

Merged
arjendev merged 3 commits into microsoft:main from MarvinSchenkel:main
May 12, 2025

Conversation

@MarvinSchenkel
Copy link
Contributor

@MarvinSchenkel MarvinSchenkel commented May 8, 2025
edited
Loading

This PR adds the possibility to mock error messages coming from ActivityResults with the status of FAILED. This will allow users to evaluate expression that depend on the error message, for example:

@contains(activity('Fetch some resources').Error.message, 'The specified resource does not exist.')

jacovg91 reacted with rocket emoji
Copy link
Collaborator

arjendev commented May 8, 2025

Hi @MarvinSchenkel,

Awesome addition, we definitely missed this error attribute. Would you be able to test this functionality by adding another test case in tests/unit/functions/test_data_factory_testing_framework_expression_evaluator.py as a param of def test_evaluate.

That would be great, thanks for the work!

LeonardHd reacted with thumbs up emoji

@arjendev arjendev requested a review from LeonardHd May 8, 2025 14:30
Copy link
Contributor Author

MarvinSchenkel commented May 9, 2025
edited
Loading

Hi @MarvinSchenkel,

Awesome addition, we definitely missed this error attribute. Would you be able to test this functionality by adding another test case in tests/unit/functions/test_data_factory_testing_framework_expression_evaluator.py as a param of def test_evaluate.

That would be great, thanks for the work!

Happy to! However, having some issue with getting the tests to run locally. What I did:

  • Installed the project with poetry install --with dev
  • Running tests with: poetry run coverage run --source=src -m pytest .
  • Error: ModuleNotFoundError: No module named 'data_factory_testing_framework'
  • Installed the project in editable mode: pip install -e "."
  • Error: ModuleNotFoundError: No module named 'Microsoft.Azure'
  • On MacOS with dotnet --version: 8.0.407
  • When setting coreclr as the PYTHONNET_RUNTIME, I can import basic .NET classes:
>>> from System import String
>>> String
<class 'System.String'>

However:

>>> import Microsoft.Azure
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Microsoft.Azure'

Any idea?

EDIT: dotnet build is required to build the project locally and adding the required .NET dependencies. I will update the dev docs to make this a bit more clear.

arjendev reacted with thumbs up emoji

Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Collaborator

@arjendev arjendev left a comment

Choose a reason for hiding this comment

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

@MarvinSchenkel, thank you for your contribution!

MarvinSchenkel reacted with hooray emoji
@arjendev arjendev removed the request for review from LeonardHd May 9, 2025 12:18
@arjendev arjendev merged commit d72a73c into microsoft:main May 12, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@arjendev arjendev arjendev approved these changes

@LeonardHd LeonardHd LeonardHd approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /