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

Avoid the need to have 2-step deployments to get rid of a module #773

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

AronNovak
Copy link
Member

@AronNovak AronNovak commented Dec 20, 2024

#735

Status

image

@AronNovak AronNovak changed the title Avoid the need to have 2-step deployments to get rid of a module WIP: Avoid the need to have 2-step deployments to get rid of a module Dec 20, 2024
@AronNovak AronNovak changed the title WIP: Avoid the need to have 2-step deployments to get rid of a module Avoid the need to have 2-step deployments to get rid of a module Dec 20, 2024
@AronNovak
Copy link
Member Author

We should try it at a client project where this need arises next time.

AronNovak and others added 5 commits January 6, 2025 14:57
Comment on lines +835 to +838
$uninstall_success = $this->taskExec("terminus remote:drush $pantheon_terminus_environment -- pm:uninstall " . implode(' ', $modules_to_uninstall) . " --yes")
->run()
->getExitCode();
$needs_revert = !$uninstall_success;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$uninstall_success = $this->taskExec("terminus remote:drush $pantheon_terminus_environment -- pm:uninstall " . implode(' ', $modules_to_uninstall) . " --yes")
->run()
->getExitCode();
$needs_revert = !$uninstall_success;
$needs_revert = $this->taskExec("terminus remote:drush $pantheon_terminus_environment -- pm:uninstall " . implode(' ', $modules_to_uninstall) . " --yes")
->run()
->getExitCode();

Exit code 0 is success.

Copy link
Collaborator

@mariano-dagostino mariano-dagostino left a comment

Choose a reason for hiding this comment

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

Based on some real tests this is not working as expected. It seems negating the exit code is not working.

Screenshot_2025-02-25_13-40-41

@AronNovak
Copy link
Member Author

@mariano-dagostino Thanks for trying it out! Do you have the full build log possibly? As I see the build was restarted in debug mode, so I cannot access it anymore.
Anyways, I will take a look how it can happen that it does not detect the status properly.

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.

4 participants