You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2025/07/20 16:50:45 UTC

[PR] Fix generate-providers-metadata after bumping min airflow version [airflow]

potiuk opened a new pull request, #53571:
URL: https://github.com/apache/airflow/pull/53571

   With switching to Python 3.10 as base version, when trying to find airflow versions for some older provider versions, we could not find where they were first used because constraints for 3.10 version were missing for the old versions.
   
   This PR fixes it in the following ways:
   
   * Instead of default python version, we download constraints for all historical python versions
   * We do it in parallel, to speed things up and we force GITHUB_TOKEN to not fall into rate limits when we detrmine we need to refresh constraints
   * All the errors other than "not found" in downloading file are now fatal, and end the command - to avoid accidental "proceed" when there were errors.
   * When loading information about constraints we load them in better named Dict/Tuple structure to be able to read them better
   * Added beter diagnostics with --verbose flag showing what's going on
   * Added an option to only process specified package for debugging purpose with --provider-id and --provider-version
   * Without --verbose flag only show new or updated metadata entries in output
   
   <!--
    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] Fix generate-providers-metadata after bumping min airflow version [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #53571:
URL: https://github.com/apache/airflow/pull/53571


-- 
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] Fix generate-providers-metadata after bumping min airflow version [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #53571:
URL: https://github.com/apache/airflow/pull/53571#issuecomment-3094803592

   ### Backport failed to create: v3-0-test. View the failure log <a href='https://github.com/apache/airflow/actions/runs/16404397237'> Run details </a>
   
   <table>
       <tr>
           <th>Status</th>
           <th>Branch</th>
           <th>Result</th>
       </tr>
       <tr>
           <td>❌</td>
           <td>v3-0-test</td>
           <td><a href="https://github.com/apache/airflow/commit/135df3854a999f1806013418e6cb9fd170d2d120"><img src='https://img.shields.io/badge/Commit-135df38-red' alt='Commit Link'></a></td>
       </tr>
   </table>
   
   You can attempt to backport this manually by running:
   
   ```bash
   cherry_picker 135df38 v3-0-test
   ```
   
   This should apply the commit to the v3-0-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
   ```
   


-- 
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] Fix generate-providers-metadata after bumping min airflow version [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #53571:
URL: https://github.com/apache/airflow/pull/53571#issuecomment-3094657984

   BTW. The older metadata has not been "perfect" because it was using only "default" python version - so this one is more accurate.


-- 
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] Fix generate-providers-metadata after bumping min airflow version [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #53571:
URL: https://github.com/apache/airflow/pull/53571#issuecomment-3094653985

   The updated script is much nicer:
   
   It will only print updated or removed entries when you run it:
   
   <img width="1374" height="347" alt="Screenshot 2025-07-20 at 19 00 46" src="https://github.com/user-attachments/assets/9bc59456-b0d8-4593-bbbf-759197fc44db" />
   
   It will also print when provider versions or whole providers have not yet been released:
   
   <img width="1015" height="271" alt="Screenshot 2025-07-20 at 19 01 59" src="https://github.com/user-attachments/assets/adc25c58-2d33-47ed-bc06-ece85a23b0d1" />
   
   You can also add `--verbose` flag and then it will print all steps it takes when checking provider metadata - including finding candidates and when it finds an exact match.
   
   <img width="1015" height="271" alt="Screenshot 2025-07-20 at 19 01 59" src="https://github.com/user-attachments/assets/ae3f1ffe-5552-4d5e-8f62-3b14b4465742" />
   
   You can also add --provider-id (and optionally --provider-version) (and --verbose if you want) to test how it works for single provider (and optionally narrow it to a single version).
   
   Should. be way easier now to reason about what it finds and diagnose/fix issues.
   
   By default it caches the constraints and airflow versions locally (so that you can iterate on it)  - but you can add `--refresh-constraints-and-airflow-releases` to wipe the cache. Downloading the cache /constraints runs in parallel for the constraints so it takes 10-20 seconds (for me) to download all constraints for all airflow versions :).
   
   
   


-- 
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] Fix generate-providers-metadata after bumping min airflow version [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #53571:
URL: https://github.com/apache/airflow/pull/53571#issuecomment-3094805191

   No need to backport this one.


-- 
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