Conversation
…es status to the tickets (cherry picked from commit 14b7365)
Bumps the python-production group with 1 update: [boto3](https://github.com/boto/boto3). Updates `boto3` from 1.42.34 to 1.42.39 - [Release notes](https://github.com/boto/boto3/releases) - [Commits](boto/boto3@1.42.34...1.42.39) --- updated-dependencies: - dependency-name: boto3 dependency-version: 1.42.39 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-production ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 126c651)
…with 3 updates Bumps the python-development group with 3 updates in the / directory: [boto3-stubs](https://github.com/youtype/mypy_boto3_builder), [botocore-stubs](https://github.com/youtype/botocore-stubs) and [ipython](https://github.com/ipython/ipython). Updates `boto3-stubs` from 1.42.34 to 1.42.40 - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) Updates `botocore-stubs` from 1.42.34 to 1.42.40 - [Release notes](https://github.com/youtype/botocore-stubs/releases) - [Commits](https://github.com/youtype/botocore-stubs/commits) Updates `ipython` from 9.9.0 to 9.10.0 - [Release notes](https://github.com/ipython/ipython/releases) - [Commits](ipython/ipython@9.9.0...9.10.0) --- updated-dependencies: - dependency-name: boto3-stubs dependency-version: 1.42.40 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-development - dependency-name: botocore-stubs dependency-version: 1.42.40 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-development - dependency-name: ipython dependency-version: 9.10.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-development ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 0322464)
(cherry picked from commit a01296d)
(cherry picked from commit 7d51144)
(cherry picked from commit 4be5a27)
📝 WalkthroughWalkthroughThis PR refactors the order validation pipeline by introducing a new Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
swo_aws_extension/parameters.py (1)
296-302:⚠️ Potential issue | 🟠 MajorNormalize missing values to a string to prevent
.capitalize()crashes.
fulfillment_param.get("value", "")can still returnNonewhen the key exists with a null value, which will raiseAttributeErrorin callers that do.capitalize(). Useor ""to guarantee a string.🛠️ Proposed fix
- return fulfillment_param.get("value", "") + return fulfillment_param.get("value") or ""- return fulfillment_param.get("value", "") + return fulfillment_param.get("value") or ""Also applies to: 374-380
🤖 Fix all issues with AI agents
In `@swo_aws_extension/flows/steps/crm_tickets/onboard_services.py`:
- Around line 57-58: Guard against None returned by
get_channel_handshake_approval_status and get_customer_roles_deployed before
calling .capitalize(): when populating handshake_approved and
customer_roles_deployed, coerce the helper results to a safe string (e.g., use a
default like "" or "Unknown") or check for None and handle accordingly, then
call .capitalize() on the ensured string; locate the calls to
get_channel_handshake_approval_status(context.order) and
get_customer_roles_deployed(context.order) in the onboarding step and replace
them with the guarded/coerced expressions so .capitalize() never receives None.
In `@swo_aws_extension/flows/steps/crm_tickets/templates/onboard_services.py`:
- Around line 39-40: Replace the awkward CTA string in the template in
onboard_services.py: change "Please reach out the account manager to contact the
customer regarding additional services.!!" to a grammatically correct sentence
such as "Please ask the account manager to contact the customer about additional
services." — remove the double exclamation marks, fix "reach out the account
manager" to "ask the account manager" (or "reach out to the account manager")
and use "about" instead of "regarding" for conciseness in the string shown in
the diff.
🧹 Nitpick comments (2)
swo_aws_extension/flows/steps/crm_tickets/onboard_services.py (1)
48-49: Consider defaulting PMA to empty string.
Ifcontext.pm_account_idis missing, the summary will renderNone. A small guard keeps the ticket clean.♻️ Optional tweak
- pm_account_id=context.pm_account_id, + pm_account_id=context.pm_account_id or "",tests/flows/validation/test_base.py (1)
40-42: Remove unused variable assignment.The
new_account_instructions_paramvariable assigned here is never used before being reassigned at line 46. This assignment can be removed.🧹 Proposed fix
order = set_order_parameter_constraints( order, OrderParametersEnum.NEW_ACCOUNT_INSTRUCTIONS.value, constraints={"hidden": True, "required": False, "readonly": False}, ) - new_account_instructions_param = get_ordering_parameter( - OrderParametersEnum.NEW_ACCOUNT_INSTRUCTIONS.value, order - ) result = validate_order(mock_client, order)
|
Coverage in the new code will be fixed in the next release. |


Closes MPT-17588
Changes
Order Parameters: Added three new enum members to
OrderParametersEnum(NEW_ACCOUNT_INSTRUCTIONS,TECHNICAL_CONTACT_INFO,CONNECT_AWS_BILLING_ACCOUNT) and introducedAWS_ITEMS_SKUSconstant for AWS Usage items.Validation Pipeline: Replaced
update_parameters_visibilitywith newvalidate_order(client, order)function that provides structured validation orchestration including new account constraint validation, account-type-based parameter constraints, and default line item injection.Account Type Configuration: Refactored
ACCOUNT_TYPE_CONFIGto update parameter visibility and reset rules for bothNEW_AWS_ENVIRONMENTandEXISTING_AWS_ENVIRONMENTaccount types with expanded visibility constraints.CRM Ticket Enhancements: Extended all CRM ticket summaries (Deploy Roles, New Account, Onboard Services, Order Fail, PLS, Terminate Order) with four new fields:
seller_country,pm_account_id,handshake_approved, andcustomer_roles_deployed.CRM Ticket Templates: Updated HTML templates for all ticket types to display the new fields (Seller Country, PMA, Handshake Approved, Customer Roles Deployed) and added call-to-action messaging for Onboard Services tickets.
Parameter Defaults: Updated
get_customer_roles_deployedandget_channel_handshake_approval_statusto return empty string ("") instead ofNonewhen parameter values are missing.Test Infrastructure: Updated test fixtures and test cases to align with the new
validate_ordervalidation approach, including refactored parameter assertions focused on constraint visibility and updated mock fixtures.Code Quality: Updated
pyproject.tomlto include WPS210 suppression for test_base.py validation tests.