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

Let FastlanePty detect when externally invoked programs crash, harden it when using popen, and expose process statuses. #21618

Merged
merged 8 commits into from Nov 17, 2023

Conversation

lacostej
Copy link
Collaborator

@lacostej lacostej commented Nov 6, 2023

While looking into #21536, I noticed that tests seem to be missing on FastlanePty. Adding some

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.
  • I've added or updated relevant unit tests.

Here's the test that is failing e31a1d1

@lacostej lacostej changed the title Add Tests for FastlanePty Add Tests for FastlanePty and harden it in the case of crashes Nov 6, 2023
fastlane_core/lib/fastlane_core/fastlane_pty.rb Outdated Show resolved Hide resolved
fastlane_core/lib/fastlane_core/fastlane_pty.rb Outdated Show resolved Hide resolved
fastlane_core/lib/fastlane_core/fastlane_pty.rb Outdated Show resolved Hide resolved
fastlane_core/lib/fastlane_core/fastlane_pty.rb Outdated Show resolved Hide resolved
fastlane_core/spec/fastlane_pty_spec.rb Outdated Show resolved Hide resolved
@lacostej lacostej changed the title Add Tests for FastlanePty and harden it in the case of crashes Let FastlanePty detect when externally invoked programs crash, harden it when using popen, and expose process statuses. Nov 17, 2023
@lacostej lacostej merged commit 3489c89 into fastlane:master Nov 17, 2023
2 checks passed
@lacostej lacostej deleted the fix/add_tests_for_pty branch November 17, 2023 14:19
TheMetalCode added a commit to TheMetalCode/fastlane that referenced this pull request Nov 22, 2023
lacostej pushed a commit that referenced this pull request Dec 14, 2023
…xecutor crashes (#21536)

* Force FastlanePty.spawn to return exit code if it ends up being nil for whatever reason

* Actually, let's implement the fix right where the problem occurs, and add a test

* Update fastlane_core/lib/fastlane_core/itunes_transporter.rb

Co-authored-by: Aaron Brager <getaaron@gmail.com>

* Remove unneeded nil catch given #21618

* Write more accurate test

---------

Co-authored-by: Aaron Brager <getaaron@gmail.com>
SubhrajyotiSen pushed a commit to KeepTruckin/fastlane that referenced this pull request Jan 17, 2024
…stlane#21618)

Main changes:
* Let FastlanePty detect when externally invoked programs crash
* Harden it when using popen
* Expose process_status into FastlanePtyError
* Add unit tests
* Add a helper C program used to investigate ruby behavior
SubhrajyotiSen pushed a commit to KeepTruckin/fastlane that referenced this pull request Jan 17, 2024
…xecutor crashes (fastlane#21536)

* Force FastlanePty.spawn to return exit code if it ends up being nil for whatever reason

* Actually, let's implement the fix right where the problem occurs, and add a test

* Update fastlane_core/lib/fastlane_core/itunes_transporter.rb

Co-authored-by: Aaron Brager <getaaron@gmail.com>

* Remove unneeded nil catch given fastlane#21618

* Write more accurate test

---------

Co-authored-by: Aaron Brager <getaaron@gmail.com>
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.

None yet

2 participants