Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
rev: v0.14.10
hooks:
- id: ruff-check
- id: ruff-format
Expand Down
30 changes: 15 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ dev = [
"flake8==7.3.0", # also update in pre-commit config
"flake8-aaa==0.17.*", # also update in pre-commit config
"flake8-pyproject==1.2.*", # also update in pre-commit config
"freezegun==1.4.*",
"freezegun==1.5.*",
"ipdb==0.13.*",
"ipython==8.*",
"mypy==1.8.*",
"pre-commit==3.6.*",
"pytest==7.4.*",
"pytest-cov==4.1.*",
"pytest-deadfixtures==2.2.*",
"pytest-django==4.7.*",
"pytest-mock==3.12.*",
"pytest-randomly==3.15.*",
"pytest-xdist==3.5.*",
"ipython==9.*",
"mypy==1.19.*",
"pre-commit==4.5.*",
"pytest==9.0.*",
"pytest-cov==7.0.*",
"pytest-deadfixtures==3.0.*",
"pytest-django==4.11.*",
"pytest-mock==3.15.*",
"pytest-randomly==4.0.*",
"pytest-xdist==3.8.*",
"requests-mock==1.12.*",
"responses==0.24.*",
"ruff==0.12.11", # force ruff version to have same formatting everywhere
"responses==0.25.*",
"ruff==0.14.10", # force ruff version to have same formatting everywhere
"types-openpyxl==3.1.*",
"types-requests==2.31.*",
"wemake-python-styleguide==1.3.*",
"types-requests==2.32.*",
"wemake-python-styleguide==1.4.*",
]
runtime = [
"azure-monitor-opentelemetry-exporter==1.0.0b25",
Expand Down
2 changes: 1 addition & 1 deletion swo_aws_extension/flows/fulfillment/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def strip_trace_id(traceback_msg: str) -> str:
# Should be removed with the new SDK error handling mechanism.
def pipeline_error_handler(error: Exception, context: Context, next_step):
"""Custom error handler for AWS pipelines."""
logger.error("%s - Unexpected error in AWS pipeline: %s", context.order_id, str(error))
logger.error("%s - Unexpected error in AWS pipeline: %s", context.order_id, error)
traceback_id = strip_trace_id(traceback.format_exc())
TeamsNotificationManager().notify_one_time_error(
"Order fulfillment unhandled exception!",
Expand Down
6 changes: 4 additions & 2 deletions swo_aws_extension/flows/steps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ def __call__(
self.pre_step(context)
except ConfigurationStepError as error:
logger.info(
"%s - Stop - Stop step due to configuration error: %s", context.order_id, str(error)
"%s - Stop - Stop step due to configuration error: %s",
context.order_id,
error,
)
return

try:
self.process(context)
except UnexpectedStopError as error:
logger.info("%s - Unexpected Stop: %s", context.order_id, str(error))
logger.info("%s - Unexpected Stop: %s", context.order_id, error)
TeamsNotificationManager().notify_one_time_error(error.title, error.message)
return

Expand Down
8 changes: 5 additions & 3 deletions tests/swo/mpt/sync/test_syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,11 @@ def test_dry_run(self, mpt_client, caplog, agreement_factory, mock_update_agreem

assert caplog.messages == [
"AGR-2119-4550-8674-5962 - synchronizing responsibility transfer ID: PMA-123456",
"AGR-2119-4550-8674-5962 - dry run mode - skipping update with parameters: "
"{'fulfillment': [{'externalId': 'responsibilityTransferId', 'value': "
"'PMA-123456'}]}",
(
"AGR-2119-4550-8674-5962 - dry run mode - skipping update with parameters: "
"{'fulfillment': [{'externalId': 'responsibilityTransferId', 'value': "
"'PMA-123456'}]}"
),
]
mock_update_agreement.assert_not_called()

Expand Down
Loading