You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "bugraoz93 (via GitHub)" <gi...@apache.org> on 2025/06/07 17:58:02 UTC
[PR] Mark flaky airflowctl test [airflow]
bugraoz93 opened a new pull request, #51505:
URL: https://github.com/apache/airflow/pull/51505
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2953049735
Okay, added the definition too. Now, both implementation and definition should be there. I am still don't know % 100 why this definition is not needed in airflow-core but it is for airflow-ctl
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2953019849
> BTW. I am not sure if **just** defining marker without implementing the logic will solve the problem - I am not sure which of the plugins of pytest adds it - but one of them likely adds "flaky" as dependency - that's why we have it already when we install all other plugins.
Yes, this one adds it `pytest-rerunfailures` from devel-common.
--
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] Mark flaky airflowctl test [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2952987165
> Checking the error. This package should have already come from devel-common 🤔
Just to explain it. The `dev` dependency group of airflow-ctl (which is the default dependency group when airflow-ctl is installed by `uv` using pyproject.toml` - only loads `apache-airflow-cll[dev]` extra deps:
```pyproject.toml
[dependency-groups]
# To build docs:
#
# uv run --group docs build-docs
#
# To enable auto-refreshing build with server:
#
# uv run --group docs build-docs --autobuild
#
# To see more options:
#
# uv run --group docs build-docs --help
#
docs = [
"apache-airflow-devel-common[docs]"
]
dev = [
"apache-airflow-ctl[dev]",
]
codegen = [
"datamodel-code-generator[http]==0.28.2",
"apache-airflow-devel-common"
]
```
And the apache-airlfow-ctl dev extra only installs keyring
```
[project.optional-dependencies]
"dev" = [
"keyrings.alt>=5.0.2",
]
```
The `devel-common` has pytest dependencies in the `pytest` extra:
```pyproject.toml
"pytest" = [
# General pytest devel tools
# We need to adjust all our tests to work with "proper" handling of the async loops in pytest-asyncio
# Implemented in Pytest-asyncio 0.25.1 and 0.25.2. See: https://github.com/apache/airflow/issues/45355
"pytest-asyncio>=0.24.0,<0.25.1",
"pytest-cov>=4.1.0",
"pytest-custom-exit-code>=0.3.0",
"pytest-icdiff>=0.9",
"pytest-instafail>=0.5.0",
"pytest-mock>=3.14.0",
"pytest-rerunfailures>=13.0",
"pytest-timeouts>=1.2.1",
"pytest-unordered>=0.6.1",
"pytest-xdist>=3.5.0",
"pytest>=8.3.3",
]
```
The "devel-common" has "apache-airflow-devel-common[basic]" added as default dependency - and this extra looks like that:
```pyproject.toml
"basic" = [
"apache-airflow-devel-common[coverage,debuggers,mypy,pytest]"
]
```
I saw you added the marker manually - but likely it's better to add `apache-airflow-devel-common` as dev dependency, but if you want to get all the "devel-common" pytest and other packages as dependency, you should add "apache-airflow-devel-common" as a dependency in the "dev" dependency group.
This way you will install same plugins as regular "airflow" and provider tests.
--
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] Mark flaky airflowctl test [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2952991014
BTW. I am not sure if **just** defining marker without implementing the logic will solve the problem - I am not sure which of the plugins of pytest adds it - but one of them likely adds "flaky" as dependency - that's why we have it already when we install all other plugins.
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2953005666
I assumed that Workspace was already installing devel-common for us. Missed the dev part :)
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2953004254
> > Checking the error. This package should have already come from devel-common 🤔
>
> Just to explain it. The `dev` dependency group of airflow-ctl (which is the default dependency group when airflow-ctl is installed by `uv` using pyproject.toml`- only loads`apache-airflow-cll[dev]` extra deps:
>
> ```toml
> [dependency-groups]
> # To build docs:
> #
> # uv run --group docs build-docs
> #
> # To enable auto-refreshing build with server:
> #
> # uv run --group docs build-docs --autobuild
> #
> # To see more options:
> #
> # uv run --group docs build-docs --help
> #
> docs = [
> "apache-airflow-devel-common[docs]"
> ]
> dev = [
> "apache-airflow-ctl[dev]",
> ]
> codegen = [
> "datamodel-code-generator[http]==0.28.2",
> "apache-airflow-devel-common"
> ]
> ```
>
> And the apache-airlfow-ctl dev extra only installs keyring
>
> ```
> [project.optional-dependencies]
> "dev" = [
> "keyrings.alt>=5.0.2",
> ]
> ```
>
> The `devel-common` has pytest dependencies in the `pytest` extra:
>
> ```toml
> "pytest" = [
> # General pytest devel tools
> # We need to adjust all our tests to work with "proper" handling of the async loops in pytest-asyncio
> # Implemented in Pytest-asyncio 0.25.1 and 0.25.2. See: https://github.com/apache/airflow/issues/45355
> "pytest-asyncio>=0.24.0,<0.25.1",
> "pytest-cov>=4.1.0",
> "pytest-custom-exit-code>=0.3.0",
> "pytest-icdiff>=0.9",
> "pytest-instafail>=0.5.0",
> "pytest-mock>=3.14.0",
> "pytest-rerunfailures>=13.0",
> "pytest-timeouts>=1.2.1",
> "pytest-unordered>=0.6.1",
> "pytest-xdist>=3.5.0",
> "pytest>=8.3.3",
> ]
> ```
>
> The "devel-common" has "apache-airflow-devel-common[basic]" added as default dependency - and this extra looks like that:
>
> ```toml
> "basic" = [
> "apache-airflow-devel-common[coverage,debuggers,mypy,pytest]"
> ]
> ```
>
> I saw you added the marker manually - but likely it's better to add `apache-airflow-devel-common` as dev dependency, so if you want to get all the "devel-common" pytest and other packages as dependency, you should add "apache-airflow-devel-common" as a dependency in the "dev" dependency group.
>
> This way you will install same plugins as regular "airflow" and provider tests.
Since it defines the method parameters to register. I thought it could directly fall back to that metho,d but this is better
https://docs.pytest.org/en/stable/example/markers.html#registering-markers
Okay, let me do that. Thanks!
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 merged PR #51505:
URL: https://github.com/apache/airflow/pull/51505
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2952863066
Checking the error. This package should have already come from devel-common :thinking:
```bash
_____ ERROR collecting tests/airflow_ctl/ctl/commands/test_auth_command.py _____
'flaky' not found in `markers` configuration option
_____ ERROR collecting tests/airflow_ctl/ctl/commands/test_auth_command.py _____
'flaky' not found in `markers` configuration option
```
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2953040921
I found strange when not defining in the ini config, it still fails with devel-common dependency in dev. I couldn't find in airflow-core pyproject.toml, the marker definitions. So it should come automatically from the dependency. Maybe I am still missing something to do
--
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] Mark flaky airflowctl test [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #51505:
URL: https://github.com/apache/airflow/pull/51505#issuecomment-2953002457
Okay, I think registering it in `pyproject.toml` to `pytest.ini` configs should use it from the package. We are defining the method parameters to register.
https://docs.pytest.org/en/stable/example/markers.html#registering-markers
Merging, thanks for reviews:)
--
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