Skip to content
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

Fix App Store submission options for app-store-connect publish #452

Merged
merged 4 commits into from
Mar 26, 2025

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented Mar 26, 2025

Fixes #451.

Fix issues related to submitting apps to App Store using action app-store-connect publish with --app-store option.

Issue description

AppStoreConnect.publish first uploads the binaries using the private method _process_application_after_upload. If that succeeds, post-processing is carried out by another private method, _process_application_after_upload, which invokes additional actions based on the supplied CLI options.

The arguments for these actions are gathered using special dataclasses that mimic the signatures of the actions. However, the actions themselves were invoked via the Python API using dictionary unpacking, where arguments were passed as **dataclasses.asdict(action_args_dataclass). This conversion to a dictionary resulted in the loss of type information. Consequently, non-primitive values, such as:

[AppStoreVersionLocalizationInfo(locale='en-GB', ...)]

were converted to:

[{"locale": "en-GB", ...}]

which is not the expected format.

While it would be possible to use **action_args_dataclass.__dict__ instead of **dataclasses.asdict(action_args_dataclass) to retain the original types, a better approach for readability, linter, and type checker support would be to explicitly pass all values one by one. This ensures clarity and prevents type-related issues when invoking actions.

Updated actions

  • app-store-connect publish

@priitlatt priitlatt marked this pull request as ready for review March 26, 2025 13:02
@priitlatt priitlatt merged commit 691f743 into master Mar 26, 2025
13 checks passed
@priitlatt priitlatt deleted the bugfix/asc-publish-app-store-options branch March 26, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'dict' object has no attribute 'locale' when using --app-store-version-localizations
2 participants