Skip to content

Apply AIR201-style replacements#65197

Merged
shahar1 merged 4 commits into
apache:mainfrom
Dev-iL:2604/AIR201
May 3, 2026
Merged

Apply AIR201-style replacements#65197
shahar1 merged 4 commits into
apache:mainfrom
Dev-iL:2604/AIR201

Conversation

@Dev-iL

@Dev-iL Dev-iL commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

Of these, 3 were detected using ruff, and the rest using the below regex:

  • Find: \{\{(\s?)task_instance\.xcom_pull\('([^']+)'\)
  • Replace: {{$1$2.output

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues provider:apache-beam provider:google Google (including GCP) related issues labels Apr 14, 2026
@Dev-iL Dev-iL marked this pull request as ready for review April 14, 2026 11:53
@Dev-iL Dev-iL force-pushed the 2604/AIR201 branch 2 times, most recently from 21ebd83 to cdd937d Compare April 14, 2026 20:09
Comment thread providers/amazon/tests/system/amazon/aws/example_dms_serverless.py
Comment thread providers/amazon/tests/system/amazon/aws/example_dms_serverless.py Outdated
Comment thread providers/amazon/tests/system/amazon/aws/example_dms_serverless.py Outdated

@Lee-W Lee-W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a few style to be unify, but mostly good

Comment thread providers/apache/beam/tests/system/apache/beam/example_python_dataflow.py Outdated
Comment thread providers/apache/beam/tests/system/apache/beam/example_go_dataflow.py Outdated
Comment thread providers/google/tests/system/google/cloud/dataflow/example_dataflow_go.py Outdated
Comment thread providers/google/tests/system/google/cloud/dataflow/example_dataflow_go.py Outdated
@Dev-iL Dev-iL force-pushed the 2604/AIR201 branch 2 times, most recently from d5de52a to 1bd9f4e Compare April 17, 2026 11:19
Comment thread providers/google/tests/system/google/cloud/dataprep/example_dataprep.py Outdated
Comment thread providers/apache/beam/tests/system/apache/beam/example_python_dataflow.py Outdated
Comment thread providers/apache/beam/tests/system/apache/beam/example_go_dataflow.py Outdated
@Dev-iL

Dev-iL commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator Author

Made another pass.

Some patterns like "{{ task_instance.xcom_pull('upload_sheet_to_gcs')[0] }}" were not replaced because of an integer index ([0]) and since XComArg.__getitem__ only accepts str keys:

# xcom_arg.py:216-220
def __getitem__(self, item: str) -> XComArg:
    if not isinstance(item, str):
        raise ValueError(f"XComArg only supports str lookup, received {type(item).__name__}")
    return PlainXComArg(operator=self.operator, key=item)

So upload_sheet_to_gcs.output[0] would raise at DAG parse time.

Dev-iL and others added 4 commits April 28, 2026 18:59
Of these, 3 were detected using ruff, and the rest using the below regex:
- Find: \{\{(\s?)task_instance\.xcom_pull\('([^']+)'\)
- Find: \{\{(\s?)ti\.xcom_pull\('([^']+)'\)
- Replace: {{$1$2.output
Each substitution now includes a comment showing the old task_instance.xcom_pull() or ti.xcom_pull() pattern for clarity during code review and historical reference.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: GPT 5.4 Mini <codex@openai.com>
@shahar1 shahar1 merged commit 1f84a56 into apache:main May 3, 2026
93 checks passed
@Dev-iL Dev-iL deleted the 2604/AIR201 branch May 3, 2026 05:27
shahar1 pushed a commit that referenced this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues provider:apache-beam provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants