Support tasks in resources read and write#116
Draft
vitolkachova wants to merge 2 commits into
Draft
Conversation
composer.json temporarily references the platformsh/client task branch; revert before merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for deployment tasks to the legacy resources:get / resources:set flow, so tasks can be displayed and have their profile size updated, plus introduces --task filtering alongside existing resource filters.
Changes:
- Extend deployment service aggregation and filtering to include
Taskobjects. - Update
resources:getandresources:setto expose--taskand to handle task-specific shape differences (no disk/instance_count/type). - Update
platformsh/clientdependency to a dev branch that provides theTaskdeployment model.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
legacy/src/Service/ResourcesUtil.php |
Adds task awareness to service listing, disk support, and filtering. |
legacy/src/Command/Resources/ResourcesSetCommand.php |
Adds --task (and other name filters) and handles task-specific resource fields while building updates/summaries. |
legacy/src/Command/Resources/ResourcesGetCommand.php |
Adds --task and renders tasks safely (no type/instances). |
legacy/composer.json |
Pins platformsh/client to a dev branch providing the Task model + adds VCS repository. |
legacy/composer.lock |
Locks the updated platformsh/client source and related dependency metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
152
to
153
| if ($input->hasOption('type') && ($requestedTypes = ArrayArgument::getOption($input, 'type'))) { | ||
| $byType = []; |
| ->addOption('force', 'f', InputOption::VALUE_NONE, 'Try to run the update, even if it might exceed your limits') | ||
| ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Show the changes that would be made, without changing anything'); | ||
| ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Show the changes that would be made, without changing anything') | ||
| ->addOption('service', 's', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Limit to a service name. This can select any service, including apps and workers.') |
| @@ -51,6 +52,7 @@ protected function configure(): void | |||
| ->addOption('service', 's', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Filter by service name. This can select any service, including apps and workers.') | |||
| "guzzlehttp/guzzle": "^7", | ||
| "platformsh/console-form": "^1@beta", | ||
| "platformsh/client": "^3@beta", | ||
| "platformsh/client": "dev-add-task-deployment-model as 3.0.0-beta5", |
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.
As a bonus, adding type filters to
resources:set, i.e.resources:set --task myagentDepends on platformsh/platformsh-client-php#107 , hence drafted for now.