You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "1fanwang (via GitHub)" <gi...@apache.org> on 2026/07/23 19:16:18 UTC
[PR] Drop unused post_submit_commands copy from SparkSubmitOperator init [airflow]
1fanwang opened a new pull request, #70323:
URL: https://github.com/apache/airflow/pull/70323
`post_submit_commands` is a template field, so it is rendered after `__init__` runs. The constructor also kept a private `self._post_submit_commands = list(post_submit_commands) if post_submit_commands else []`, built from the un-rendered value. Nothing reads that copy: the operator forwards the rendered `self.post_submit_commands` to `SparkSubmitHook`, which builds its own list and runs the commands. Removing it stops the constructor reading the template field and clears its `validate-operators-init` exemption.
related: #70296
<details><summary>Testing Done</summary>
`validate_operators_init.py` on the operator, before (with the exemption removed):
```
SparkSubmitOperator's constructor applies logic to template fields. Template fields are
rendered after the constructor runs, so validation or transformation here acts on the
un-rendered Jinja expression and should move to execute():
line 266: self._post_submit_commands = list(post_submit_commands) if post_submit_commands else [] (post_submit_commands)
```
After removing the line, the validator exits 0.
`test_spark_submit.py` (operator suite): 69 passed. The removed attribute had no readers, so behaviour is unchanged.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Drop unused post_submit_commands copy from SparkSubmitOperator init [airflow]
Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 merged PR #70323:
URL: https://github.com/apache/airflow/pull/70323
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Drop unused post_submit_commands copy from SparkSubmitOperator init [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #70323:
URL: https://github.com/apache/airflow/pull/70323#issuecomment-5067394537
### Backport failed to create: v3-3-test. View the failure log <a href='https://github.com/apache/airflow/actions/runs/30076185087'> Run details </a>
Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>❌</td>
<td>v3-3-test</td>
<td><a href="https://github.com/apache/airflow/commit/dca1d97eaf47ab90dda546a46a167b05184365bc"><img src='https://img.shields.io/badge/Commit-dca1d97-red' alt='Commit Link'></a></td>
</tr>
</table>
You can attempt to backport this manually by running:
```bash
cherry_picker dca1d97 v3-3-test
```
This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.
After you have resolved the conflicts, you can continue the backport process by running:
```bash
cherry_picker --continue
```
If you don't have cherry-picker installed, see the [installation guide](https://github.com/apache/airflow/blob/main/dev/README.md#how-to-backport-pr-with-cherry-picker-cli).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org