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

   Client source code and package generation was done using the code generated 
and committed to `airflow-client-python` and while the repository with such 
code is useful to have, it's just a convenience repo, because all sources are 
(and should be) generated from the API specification which is present in the 
Airflow repository.
   
   This also made the reproducible builds and package generation not really 
possible, because we never knew if the source generated in the 
`airflow-client-python` repository has been generated and not tampered with.
   
   While implementing it, it turned out that there were some issues in the past 
that nade our client generation somewhat broken..
   
   * In 2.7.0 python client, we added the same code twice (See 
https://github.com/apache/airflow-client-python/pull/93) on top of 
"airflow_client.client" package, we also added copy of the API client generated 
in "airflow_client.airflow_client" - that was likely due to bad bash scripts 
and tools that were used to generate it and errors during generation the 
clients.
   
   * We used to generate the code for "client" package and then moved the 
"client" package to "airflow_client.client" package, while manually modifying 
imports with `sed` (!?). That was likely due to limitations in some old version 
of the client generator. However the client generator we use now is capable of 
generating code directly in the "airflow_client.client" package.
   
   * We also manually (via pre-commit) added Apache Licence to the generated 
files. Whieh was completely unnecessary, because ASF rules do not require 
licence headers to be added to code automatically generated from a code that 
already has ASF licence.
   
   * We also generated source tarball packages from such generated code, which 
was completely unnecessary - because sdist packages are already fulfilling all 
the reqirements of such source pacakges - the code in the packages is enough to 
build the package from the sources and it does not contain any binary code, 
moreover the code is generated out of the API specificiation, which means that 
anyone can take the code and genearate the pacakged software from just sources 
in sdist. Similarly as in case of provider packages, we do not need to produce 
separate -source.tar.gz files.
   
   This PR fixes all of it.
   
   First of all the source that lands in the source repository 
`airflow-client-python` and sdist/wheel packages are generated directly from 
the openapi specification.
   
   They are generated using breeze release_management command from airflow 
source  tagged with specific tag in the Airflow repo (including the source of 
reproducible build date that is updated together with airflow release notes. 
This means that any PMC member can regenerate packages (binary identical) 
straight from the Airflow repository - without going through 
"airflow-client-python" repository.
   
   No source tarball is generated - it is not needed, sdist is enough.
   
   <!--
    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.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 
[newsfragments](https://github.com/apache/airflow/tree/main/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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to