Fix produce passing incorrect teamId when modifying capabilities #21885
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Implementation of updating bundleIdCapabilities was incorrectly assuming that seedId was always equals to the teamId of the team that the bundle identifiers is created under. Unsure why this happens, but we've observed a number of bundle identifiers that show this behaviour.
This functionality to modify capabilities is now described in the public Appstore Connect APIs here which uses the
DELETE
andPOST
HTTP methods, but since the current implementation utilising the private "PATCH" method is still working, I've opted to fix the current requests rather than implement based on the appstore connect APIs since that looks to requires a pretty hefty rewrite and testing of the bundle id related calls such asproduce
andmodify_services
.Description
Fixed the request body sent in
patch_bundle_id_capability
to pass the correct values forteamId
andseedId
, as well as addingedit
anddelete
permissions to fix a BadRequest error when sending the request from the spaceship CLI (matches patch calls in the dev portal).Tested from the CLI using web login.
Testing Steps