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

[regression][pilot] Fix upload using api_key_path + apple_id CLI options #18860

Merged

Conversation

crazymanish
Copy link
Member

@crazymanish crazymanish commented Jun 11, 2021

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've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Description

  • Pilot will do login on start if spaceship token is nil and input options have api_key_path

Testing Steps

  • Added the unit-tests for this new functionality 😇

  • Update Gemfile and run bundle install with

gem "fastlane", :git => "git@github.com:fastlane/fastlane.git", :branch => "crazymanish-pilot-upload-using-cli-with-api-key-fix"
  • Try pilot's upload using CLI with api_key_path and apple_id
bundle exec fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -p 1528xxxxxx`

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hear me out here... maybe the should_login argument on start() should only apply to Apple ID login 🤔

The reason that exists is because of avoiding 2FA stuff that was super annoying on CI and whatnot. So maybe we revert this change in BuildManager and instead...

  1. Login in start if there is a token
  2. If no token and should_login, then we attempt to login with Apple ID

I think that is essentially what this is doing but we should maybe move that to the start / login methods 🤷‍♂️

@crazymanish
Copy link
Member Author

maybe the should_login argument on start() should only apply to Apple ID login 🤔

Yes, this is it. this should be the case! You are 💯 right 💪

  • Login in start if there is a token
  • If no token and should_login, then we attempt to login with Apple ID

Okay, I think, i require your help in this PR...don't want to break our lovely pilot 😇 Do you want to take over, or shall I try first? 🙇

@joshdholtz
Copy link
Member

@crazymanish Ha! You can start if you'd like and then I can add a commit if I see anything that needs to change 🤷‍♂️ Otherwise I don't mind taking over from here! Your call 😊

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small thought otherwise this looks good!

pilot/lib/pilot/manager.rb Outdated Show resolved Hide resolved
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this solution! 😊 Thanks for reworking this ❤️

@joshdholtz joshdholtz merged commit 430fcb1 into master Jun 15, 2021
@joshdholtz joshdholtz deleted the crazymanish-pilot-upload-using-cli-with-api-key-fix branch June 15, 2021 21:48
@fastlane-bot
Copy link

Hey @crazymanish 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.186.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regression] fastlane pilot upload is failing when --apple_id (-p) is provided
3 participants