-
Notifications
You must be signed in to change notification settings - Fork 0
Playbook debugging #18
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
base: main
Are you sure you want to change the base?
Conversation
* This fails for me since my Apple account requires a hardware key, not supported and this type of auth is not supported by Xcodes
"xcodes" does not support hardware key auth making it unusable for secure Apple accounts
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
| - name: Installing Xcode 16.2 | ||
| when: xcode|bool | ||
| ansible.builtin.shell: | ||
| cmd: xcodes install 16.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point the xcodes package helped in the past: when the new version of xcode was not supported (I forgot why) and we easily downgraded after an autoupdate. Would it make sense to leave this choice to the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thesan I could leave this in. At one point (https://github.com/LedgerHQ/ledger-wallet-dx/pull/18/changes#r2713459615) I got xcodes installing via Ansible (removing the manual step) and was passing in the username and password via prompt (which was the error I was initially trying to fix).
The reason I got rid of it was that my Apple account uses a hardware key for auth, so xcodes gives me this error with or without being run through Ansible.
Account uses a hardware key for authentication but this is not supported yet
This makes xcodes unusable for my Apple account and I thought it would be true for others at Ledger 🤔
I might see if I can create a new Apple account without the hardware key auth and see if I can get that working but I didn't want to sink too much time into it. An alternative is that we remove if for now and if we need it again in the future we add it back in, at which point xcodes might have expanded their MFA support.
WDYT?
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
Proposed changes
The major changes addresses errors that currently block the complete running of the Ansible Playbook. There are also medium and minor fixes, most notably avoiding loosing an existing
.zshrc.List of all changes:
.zshrcfilexcodescan't handle authJIRA: No JIRA (should I create one?)
Types of changes
Further comments
I'm happy to break the changes into different PRs if there is an issue with any of them.
Also, you might like to review commit-by-commit to benefit from the commit messages. The only downside to that is the churn around xcode/xcodes that I eventually decided to remove.
1. Avoid already installed errors
There are a number of these checks spread across different commits. They are important as the errors currently stop the Playbook continuing/completing. I got it working but is it good? Feel free to propose an improved solution.
2. Avoid overriding existing
.zshrcfilePersonally I find this important. Previously we would copy-paste over the top of any existing
.zshrcwhen running the script. This can hurt the user. Now the template will go into a new file and a reference is added to any existing.zshrcSee e43fd90
3. Prefer manual install of Xcode
I've removed the use of xcodes from the repo since it won't work for any Apple account that uses a hardware key for MFA.
This is obviously a significant decision. Personally I feel it's fine since we were already asking the user to manually install
xcodes, now we just ask them to manually installXcode.Note: xcodes was first introduced due to a bug with the latest Xcode. This is not a current issue and if we need xcodes again in the future I propose we reintroduce it at that time, when hardware key MFA might be supported.
4. Provide sudo password to brew installs
zuluandinsomniawill not install withoutsudoandhomebrewwon't run insudomode. This seems like a good solution: 5fdae90