chore(legacy): subtree merge legacy-cli 5.x updates#19
Merged
miguelsanchez-upsun merged 3 commits intomainfrom Apr 28, 2026
Merged
chore(legacy): subtree merge legacy-cli 5.x updates#19miguelsanchez-upsun merged 3 commits intomainfrom
miguelsanchez-upsun merged 3 commits intomainfrom
Conversation
444c3f3 to
247c263
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR merges 31 commits from the platformsh/legacy-cli 5.x branch and ports upstream variable app-scope tests to integration-tests/. It includes bug fixes for CurlCli stdout handling during 401 retries and data race issues in api_curl_test, plus additions to the mockapi Variable struct.
Changes:
- Added
ApplicationScopefield to mockapi Variable struct and ported upstream app-scope tests - Fixed CurlCli stdout double-write bug in 401 retry path and data race in api_curl_test
- Updated legacy-cli configuration files to reflect Upsun branding and removed legacy test file
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/mockapi/model.go | Added ApplicationScope field to Variable struct |
| legacy/tests/Local/LocalProjectTest.php | Removed legacy project test file |
| legacy/src/Service/VariableCommandUtil.php | Added application_scope field with validation for variable commands |
| legacy/src/Service/Relationships.php | Added isOracleDB method for database type checking |
| legacy/src/Service/CurlCli.php | Fixed stdout buffering to prevent double-write during 401 retries |
| legacy/src/Service/ActivityMonitor.php | Fixed result name reference to use RESULT_NAMES constant |
| legacy/src/Service/ActivityLoader.php | Added environment.alert activity type |
| legacy/src/Command/Organization/OrganizationCreateCommand.php | Added avoidQuestion flag to organization type field |
| legacy/src/Command/Organization/Billing/OrganizationProfileCommand.php | Removed security_contact from writable properties |
| legacy/src/Command/Metrics/MetricsCommandBase.php | Added blank line formatting |
| legacy/src/Command/Environment/EnvironmentPushCommand.php | Added deploy-strategy option with validation |
| legacy/src/Command/Db/DbDumpCommand.php | Added --no-tablespaces flag for non-Oracle MySQL databases |
| legacy/src/Command/Autoscaling/AutoscalingSettingsSetCommand.php | Extended autoscaling support to services with capability checks |
| legacy/src/Command/Autoscaling/AutoscalingSettingsGetCommand.php | Added filtering for autoscaling settings display |
| legacy/src/Command/Activity/ActivityListCommand.php | Added example for including activity type in output |
| legacy/config.yaml | Updated branding from Platform.sh to Upsun with new URLs |
| legacy/config-defaults.yaml | Updated logo to SVG format and added rolling deployment error message |
| legacy/README.md | Updated references from Platform.sh to Upsun |
| legacy/Makefile | Removed Go test targets |
| legacy/CONTRIBUTING.md | Updated repository references and formatting |
| integration-tests/variable_write_test.go | Added comprehensive tests for variable app-scope functionality |
| integration-tests/api_curl_test.go | Fixed data race with tokenState struct and mutex protection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge 31 commits from platformsh/legacy-cli 5.x (adb14ee..08be158). Notable upstream changes: - Autoscaling settings: expanded get/set commands - Variable app-scope: new --app-scope option for var:create/update - CurlCli: stdout buffering for 401 retry - Environment push: additional options - Db dump: new options - Various config and metadata updates Conflicts resolved: - legacy/src/Service/CurlCli.php: took upstream changes, fixed stdout double-write bug in retry block - legacy/go-tests/: removed (moved to integration-tests/ in this repo) Additional changes in this repo: - Port variable app-scope tests to integration-tests/ with setupVariableTest helper and two new test functions - Add ApplicationScope field to mockapi Variable struct - Remove legacy Makefile go-tests targets (now in integration-tests/) - Fix data race in api_curl_test with tokenState struct - Suppress phpstan false positive in CurlCli.php Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
e2f1547 to
53d6c29
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 23 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- DbDumpCommand: invert --no-tablespaces condition so the flag is applied for oracle-mysql (where mysqldump lacks the PROCESS privilege to dump tablespaces). The upstream fix in platformsh/legacy-cli#1593 has the inverse condition: it adds the flag for non-Oracle DBs, leaving oracle-mysql still failing with "Access denied; you need (at least one of) the PROCESS privilege(s) for this operation". This local fix should also be sent upstream. - VariableCommandUtil::listApps: guard against a null default_branch before calling Api::getEnvironment(string), which would otherwise TypeError. Matches the existing null check in DomainCommandBase. - AutoscalingSettingsGet/Set: update AsCommand descriptions to mention services. Upstream PR #1587 added service-level autoscaling but left the help text saying "apps and workers" only. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
miguelsanchez-upsun
approved these changes
Apr 28, 2026
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.
Subtree merge of
platformsh/legacy-cli5.x (adb14ee..08be158).The legacy phar in this fork now matches upstream
legacy-cli5.x, catching up on releases v4.28.0 through v4.30.0 plus a few post-release fixes from the5.xbranch.Catch-up to upstream releases
From v4.30.0:
var:create/var:update: new--app-scopeoption to scope variables to specific applications.db:dump: avoidPROCESS privilegeerror on oracle-mysql databases. (Upstream's fix had its condition inverted; corrected on this PR.)environment.alertactivity type.From v4.29.0:
autoscaling:get/autoscaling:set: support configuring autoscaling for services that declare horizontal scaling, in addition to apps and workers.org:create: skip the interactive "type" question.metrics: restore the--intervaloption.push(rolling): return a non-zero exit code when a rolling deployment fails.From v4.28.2:
resources:build:get: hidden when sizing is disabled on the project.push: fix error when pushing a new local branch.From v4.28.0:
push: new--deploy-strategyoption (rollingorstopstart).activity:list: help text gains an example for adding the activity-type column.org:billing-profile:security_contactremoved from the writable properties.metrics: don't throw when the backend returns no values for a timestamp.Unreleased upstream fixes (5.x branch, post-v4.30.0)
api:curl: don't write the raw 401 response body to stdout when transparently retrying after a token refresh.var:create/var:update: handleEnvironmentStateExceptionwhen listing apps for--app-scopevalidation.New (upsun/cli only) fixes
db:dump(oracle-mysql): correct the inverted--no-tablespacescondition from upstream's fix (to be sent upstream).var:create/var:update: guard against a nulldefault_branchwhen validating--app-scope.autoscaling:get/autoscaling:set: command descriptions updated to mention services.🤖 Generated with Claude Code