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

[spaceship][ci][fix] For App Store Connect API 2.4, beta_tester_metrics is empty, update beta_tester attr #21453

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Xjkstar
Copy link

@Xjkstar Xjkstar commented Aug 10, 2023

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Due to changes in App Store Connect API 2.4, beta_tester_metrics for betaTesters in Spaceship are invalid, resulting in Tester status information no longer being available, beta_tester_metrics is empty.

Description

Based on the betaTesters interface (appstoreconnect.apple.com/iris/v1/betaTesters), updated beta_tester.

Testing Steps

user_id = params[:user_id].to_s
user_password = params[:user_password].to_s
ios_app_id = params[:ios_app_id].to_s
team_id = params[:portal_team_id].to_s
itc_team_id = params[:itc_team_id].to_s

client = Spaceship::ConnectAPI::Client.login(user_id, user_password, portal_team_id: team_id, tunes_team_id: itc_team_id)
puts 'ConnectAPI login success🎉'

puts "#{DateTime.now.to_time} Start getting a list of testers, take a cup of tea🍵……"
testers = client.get_beta_testers(filter: { apps: ios_app_id, isDeleted: false },
                                  includes: 'betaTesterMetrics', 
                                  sort: 'betaTesterMetrics.betaTesterState', 
                                  limit: 10)

testers.each do |tester|
  unless tester.respond_to?(:beta_tester_state)
    puts "\n\n~~~~~~~~~~ 🏃Exception skip: illegal BetaTester data ~~~~~~~~~~"
  end

  puts "TesterID:#{tester.id.to_s} state-#{tester.beta_tester_state}"
end

[spaceship][fix] For App Store Connect API 2.4, beta_tester_metrics is empty, update beta_tester attr
@Xjkstar
Copy link
Author

Xjkstar commented Aug 11, 2023

the reason of check error for macOS(Xcode 11.7.0, Xcode 13.0.0) is Xcode 13.0.0 is not supported and Xcode 11.7 is no longer supported in circleci

https://circleci.com/docs/testing-ios/#supported-xcode-versions

image

circleci supported Xcode versions update(no 13.0.0, no 11)
@Xjkstar Xjkstar changed the title [spaceship][fix] For App Store Connect API 2.4, beta_tester_metrics is empty, update beta_tester attr [spaceship][ci][fix] For App Store Connect API 2.4, beta_tester_metrics is empty, update beta_tester attr Aug 11, 2023
@Xjkstar Xjkstar mentioned this pull request Aug 11, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants