Skip to content

Conversation

@amoghrajesh
Copy link
Contributor

As reported on slack, sometimes due to network connectivity issues with Github, our tag_providers.sh script creates tags locally with errors like:

➜  airflow git:(main) ./dev/provider_packages/tag_providers.sh
fatal: tag 'providers-airbyte/3.4.0rc1' already exists
fatal: tag 'providers-alibaba/2.6.0rc1' already exists
fatal: tag 'providers-amazon/8.8.0rc1' already exists
fatal: tag 'providers-apache-beam/5.3.0rc1' already exists
fatal: tag 'providers-apache-cassandra/3.3.0rc1' already exists
fatal: tag 'providers-apache-drill/2.5.0rc1' already exists
fatal: tag 'providers-apache-druid/3.6.0rc1' already exists
fatal: tag 'providers-apache-flink/1.2.0rc1' already exists
fatal: tag 'providers-apache-hdfs/4.2.0rc1' already exists
fatal: tag 'providers-apache-hive/6.2.0rc1' already exists
fatal: tag 'providers-apache-impala/1.2.0rc1' already exists
fatal: tag 'providers-apache-kafka/1.2.0rc1' already exists
fatal: tag 'providers-apache-kylin/3.3.0rc1' already exists
fatal: tag 'providers-apache-livy/3.6.0rc1' already exists
fatal: tag 'providers-apache-pig/4.2.0rc1' already exists
fatal: tag 'providers-apache-pinot/4.2.0rc1' already exists
fatal: tag 'providers-apache-spark/4.2.0rc1' already exists
fatal: tag 'providers-apache-sqoop/4.1.0rc1' already exists
fatal: tag 'providers-apprise/1.1.0rc1' already exists
fatal: tag 'providers-arangodb/2.3.0rc1' already exists
fatal: tag 'providers-asana/2.3.0rc1' already exists
fatal: tag 'providers-atlassian-jira/2.2.0rc1' already exists
fatal: tag 'providers-celery/3.4.0rc1' already exists
fatal: tag 'providers-cloudant/3.3.0rc1' already exists
fatal: tag 'providers-cncf-kubernetes/7.7.0rc1' already exists
fatal: tag 'providers-common-sql/1.8.0rc1' already exists
fatal: tag 'providers-daskexecutor/1.1.0rc1' already exists
fatal: tag 'providers-databricks/4.6.0rc1' already exists
fatal: tag 'providers-datadog/3.4.0rc1' already exists
fatal: tag 'providers-dbt-cloud/3.4.0rc1' already exists
fatal: tag 'providers-dingding/3.3.0rc1' already exists
fatal: tag 'providers-discord/3.4.0rc1' already exists
fatal: tag 'providers-docker/3.8.0rc1' already exists
fatal: tag 'providers-elasticsearch/5.1.0rc1' already exists
fatal: tag 'providers-exasol/4.3.0rc1' already exists
fatal: tag 'providers-facebook/3.3.0rc1' already exists
fatal: tag 'providers-ftp/3.6.0rc1' already exists
fatal: tag 'providers-github/2.4.0rc1' already exists
fatal: tag 'providers-google/10.10.0rc1' already exists
fatal: tag 'providers-grpc/3.3.0rc1' already exists
fatal: tag 'providers-hashicorp/3.5.0rc1' already exists
fatal: tag 'providers-http/4.6.0rc1' already exists
fatal: tag 'providers-imap/3.4.0rc1' already exists
fatal: tag 'providers-influxdb/2.3.0rc1' already exists
fatal: tag 'providers-jdbc/4.1.0rc1' already exists
fatal: tag 'providers-jenkins/3.4.0rc1' already exists
fatal: tag 'providers-microsoft-azure/8.0.0rc1' already exists
fatal: tag 'providers-microsoft-mssql/3.5.0rc1' already exists
fatal: tag 'providers-microsoft-psrp/2.4.0rc1' already exists
fatal: tag 'providers-microsoft-winrm/3.3.0rc1' already exists
fatal: tag 'providers-mongo/3.3.0rc1' already exists

in cases when the tag could not be pushed. This is irritating because now the release team has to manually delete these tags. Adding ability to do this using an env variable. The default behaviour here is that the tags will be cleaned locally.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

@amoghrajesh
Copy link
Contributor Author

@eladkal @ephraimbuddy handling this like this as per offline discussions. Do let me know what you feel

cc @potiuk

@potiuk
Copy link
Member

potiuk commented Oct 15, 2023

LGTM. @eladkal ?

@potiuk potiuk requested a review from eladkal October 15, 2023 11:55
Comment on lines -39 to +41
git push $remote "${tags[@]}"
if git push $remote "${tags[@]}"; then
echo "Tags pushed successfully"
Copy link
Contributor

Choose a reason for hiding this comment

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

Normally the script outputs:

➜  airflow git:(main) ./dev/provider_packages/tag_providers.sh
Enumerating objects: 82, done.
Counting objects: 100% (82/82), done.
Delta compression using up to 10 threads
Compressing objects: 100% (82/82), done.
Writing objects: 100% (82/82), 3.33 KiB | 682.00 KiB/s, done.
Total 82 (delta 79), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (79/79), done.
To https://github.com/apache/airflow.git
 * [new tag]               providers-airbyte/3.4.0rc1 -> providers-airbyte/3.4.0rc1
 * [new tag]               providers-alibaba/2.6.0rc1 -> providers-alibaba/2.6.0rc1
 * [new tag]               providers-amazon/8.8.0rc1 -> providers-amazon/8.8.0rc1
 * [new tag]               providers-apache-beam/5.3.0rc1 -> providers-apache-beam/5.3.0rc1
 * [new tag]               providers-apache-cassandra/3.3.0rc1 -> providers-apache-cassandra/3.3.0rc1
 * [new tag]               providers-apache-drill/2.5.0rc1 -> providers-apache-drill/2.5.0rc1
 * [new tag]               providers-apache-druid/3.6.0rc1 -> providers-apache-druid/3.6.0rc1
 * [new tag]               providers-apache-flink/1.2.0rc1 -> providers-apache-flink/1.2.0rc1
 * [new tag]               providers-apache-hdfs/4.2.0rc1 -> providers-apache-hdfs/4.2.0rc1
 * [new tag]               providers-apache-hive/6.2.0rc1 -> providers-apache-hive/6.2.0rc1
 * [new tag]               providers-apache-impala/1.2.0rc1 -> providers-apache-impala/1.2.0rc1
 * [new tag]               providers-apache-kafka/1.2.0rc1 -> providers-apache-kafka/1.2.0rc1
 

If I read this right now the script will not output this but Tags pushed successfully ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point, the standard output was being compromised. Can you try with the latest commit?

Copy link
Member

Choose a reason for hiding this comment

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

I think the original code was correct (and simpler).

if git push $remote "${tags[@]}"; then

would still output the stdout/stderr to terminal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand the point of simpler here and I second it. Would like to run it by @eladkal once too. @eladkal wdyt? I plan to bring back the HEAD to one commit before.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure if the output is present then lets.
I will test it with next release

@amoghrajesh amoghrajesh requested a review from eladkal October 15, 2023 12:18
Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

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

Nice one!

@potiuk potiuk merged commit 1e9c807 into apache:main Oct 15, 2023
potiuk pushed a commit that referenced this pull request Oct 29, 2023
@potiuk potiuk added this to the Airflow 2.7.3 milestone Oct 29, 2023
@potiuk potiuk added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants