Download tasks/aws__aws-cli-10243/solution/patch.diff from Ktanmay21/aws-cli-diff: direct link, hf CLI and curl.
- Browser
- Download file 2.95 kB
-
https://huggingface.co/datasets/Ktanmay21/aws-cli-diff/resolve/f50dbbb4f8bb7e071cea947b3db06ddb842934f4/tasks/aws__aws-cli-10243/solution/patch.diff
- Command line
-
hf download hf://datasets/Ktanmay21/aws-cli-diff@f50dbbb4f8bb7e071cea947b3db06ddb842934f4/tasks/aws__aws-cli-10243/solution/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Ktanmay21/aws-cli-diff/resolve/f50dbbb4f8bb7e071cea947b3db06ddb842934f4/tasks/aws__aws-cli-10243/solution/patch.diff
2.95 kB
| diff --git a/.changes/next-release/bugfix-cloudwatch-5230.json b/.changes/next-release/bugfix-cloudwatch-5230.json | |
| new file mode 100644 | |
| index 000000000000..88ca4e3ba078 | |
| --- /dev/null | |
| +++ b/.changes/next-release/bugfix-cloudwatch-5230.json | |
| +{ | |
| + "type": "bugfix", | |
| + "category": "``cloudwatch``", | |
| + "description": "Rename ``get-o-tel-enrichment``, ``start-o-tel-enrichment``, and ``stop-o-tel-enrichment`` commands to ``get-otel-enrichment``, ``start-otel-enrichment``, and ``stop-otel-enrichment``. The old names are kept as hidden aliases for backward compatibility." | |
| +} | |
| diff --git a/.changes/next-release/cloudwatch-otel-rename.json b/.changes/next-release/cloudwatch-otel-rename.json | |
| deleted file mode 100644 | |
| index d611abf8bab2..000000000000 | |
| --- a/.changes/next-release/cloudwatch-otel-rename.json | |
| +++ /dev/null | |
| -[ | |
| - { | |
| - "category": "``cloudwatch``", | |
| - "description": "Rename ``get-o-tel-enrichment``, ``start-o-tel-enrichment``, and ``stop-o-tel-enrichment`` commands to ``get-otel-enrichment``, ``start-otel-enrichment``, and ``stop-otel-enrichment``. The old names are kept as hidden aliases for backward compatibility.", | |
| - "type": "bugfix" | |
| - } | |
| -] | |
| diff --git a/awscli/customizations/cloudwatch.py b/awscli/customizations/cloudwatch.py | |
| index ea35d9738034..b8051d4da057 100644 | |
| --- a/awscli/customizations/cloudwatch.py | |
| +++ b/awscli/customizations/cloudwatch.py | |
| # ANY KIND, either express or implied. See the License for the specific | |
| # language governing permissions and limitations under the License. | |
| from awscli.customizations.utils import make_hidden_command_alias | |
| -from awscli.customizations.utils import rename_command | |
| def register_rename_otel_commands(event_emitter): | |
| event_emitter.register( | |
| - 'building-command-table.cloudwatch', | |
| - rename_otel_commands | |
| + 'building-command-table.cloudwatch', alias_otel_commands | |
| ) | |
| -def rename_otel_commands(command_table, **kwargs): | |
| - """Rename o-tel commands to otel, keeping o-tel as hidden aliases.""" | |
| - renames = { | |
| - 'get-o-tel-enrichment': 'get-otel-enrichment', | |
| - 'start-o-tel-enrichment': 'start-otel-enrichment', | |
| - 'stop-o-tel-enrichment': 'stop-otel-enrichment', | |
| +def alias_otel_commands(command_table, **kwargs): | |
| + aliases = { | |
| + 'get-otel-enrichment': 'get-o-tel-enrichment', | |
| + 'start-otel-enrichment': 'start-o-tel-enrichment', | |
| + 'stop-otel-enrichment': 'stop-o-tel-enrichment', | |
| } | |
| - for old_name, new_name in renames.items(): | |
| - if old_name in command_table: | |
| - rename_command(command_table, old_name, new_name) | |
| - make_hidden_command_alias( | |
| - command_table, new_name, old_name | |
| - ) | |
| + for existing_name, alias_name in aliases.items(): | |
| + if existing_name in command_table: | |
| + make_hidden_command_alias(command_table, existing_name, alias_name) | |