IDE-5067: CLI push and pull db command failing on code studio and IDE.#1999
Open
deepakmishra2 wants to merge 1 commit into
Open
IDE-5067: CLI push and pull db command failing on code studio and IDE.#1999deepakmishra2 wants to merge 1 commit into
deepakmishra2 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses database push/pull failures in Code Studio/IDE (MEO/codebase-UUID context) by improving environment/database handling and adding an execution flag to skip Drupal cache clearing when needed.
Changes:
- Add MEO-aware environment normalization in telemetry.
- Make
push:dbmore resilient to MEO database responses (null DB URL) and missing environment SSH URL (via fallback). - Add
pull:db --no-cache-clearto skipdrush cache:rebuildwhile still allowing other post-import steps.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Helpers/TelemetryHelper.php |
Adds MEO normalization branch for AH environment telemetry. |
src/Command/Push/PushDatabaseCommand.php |
Adds SSH URL fallback logic and supports DB name derivation when DatabaseResponse::url is null (MEO). |
src/Command/Pull/PullDatabaseCommand.php |
Introduces --no-cache-clear option and gates cache rebuild accordingly. |
src/Command/CommandBase.php |
Populates siteId for codebase/MEO context to enable SiteInstance DB API usage. |
tests/phpunit/src/Misc/TelemetryHelperTest.php |
Adds test coverage for MEO telemetry normalization. |
tests/phpunit/src/Commands/Push/PushDatabaseCommandTest.php |
Adds test coverage for pushing a DB when DatabaseResponse::url is null (MEO-style response). |
tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php |
Adds test coverage for --no-cache-clear behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| /** | ||
| * Test normalizeAhEnv() returns 'meo' when AH_CODEBASE_UUID is set. |
| $siteInstanceId = $this->determineSiteInstanceFromCodebaseUuid($chosenEnvironment, $input, $output); | ||
| if ($siteInstanceId) { | ||
| [$siteId] = explode('.', $siteInstanceId); | ||
| $this->siteId = $siteId; |
Comment on lines
+80
to
+89
| private function determineSshUrl(EnvironmentResponse $environment, DatabaseResponse $database): string | ||
| { | ||
| if (!empty($environment->sshUrl)) { | ||
| return $environment->sshUrl; | ||
| } | ||
| if (!empty($database->ssh_host)) { | ||
| return $environment->name . '@' . $database->ssh_host; | ||
| } | ||
| throw new AcquiaCliException('Cannot determine environment SSH URL. Check that you have SSH permissions on this environment.'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes #IDE-5067