Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed name of 20 remaining wrongly named operators. #8994

Merged

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented May 24, 2020


Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, 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 UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg bot added provider:Apache provider:amazon-aws AWS/Amazon - related issues labels May 24, 2020
@potiuk potiuk force-pushed the fix-name-of-google-spreadsheets-operator branch from 3608aa6 to e728743 Compare May 24, 2020 08:18
@mik-laj
Copy link
Member

mik-laj commented May 24, 2020

I want to check other names as well. Give me 15 minutes.

@mik-laj
Copy link
Member

mik-laj commented May 24, 2020

Could you look at the operators below?

airflow.operators.generic_transfer.GenericTransfer
airflow.providers.amazon.aws.operators.google_api_to_s3_transfer.GoogleApiToS3Transfer
airflow.providers.amazon.aws.operators.redshift_to_s3.RedshiftToS3Transfer
airflow.providers.amazon.aws.operators.s3_to_redshift.S3ToRedshiftTransfer
airflow.providers.google.cloud.operators.gcs_to_gcs.GCSSynchronizeBuckets
airflow.providers.google.suite.operators.sheets.GoogleSheetsCreateSpreadsheet
airflow.providers.microsoft.azure.operators.oracle_to_azure_data_lake_transfer.OracleToAzureDataLakeTransfer
airflow.providers.oracle.operators.oracle_to_oracle_transfer.OracleToOracleTransfer
airflow.providers.snowflake.operators.s3_to_snowflake.S3ToSnowflakeTransfer
airflow.providers.mysql.operators.presto_to_mysql.PrestoToMySqlTransfer
airflow.providers.mysql.operators.s3_to_mysql.S3ToMySqlTransfer
airflow.providers.mysql.operators.vertica_to_mysql.VerticaToMySqlTransfer
airflow.providers.apache.druid.operators.hive_to_druid.HiveToDruidTransfer
airflow.providers.apache.hive.operators.hive_to_mysql.HiveToMySqlTransfer
airflow.providers.apache.hive.operators.mssql_to_hive.MsSqlToHiveTransfer
airflow.providers.apache.hive.operators.mysql_to_hive.MySqlToHiveTransfer
airflow.providers.apache.hive.operators.s3_to_hive.S3ToHiveTransfer
airflow.providers.apache.hive.operators.vertica_to_hive.VerticaToHiveTransfer
airflow.providers.apache.hdfs.sensors.hdfs.HdfsSensorFolder
airflow.providers.apache.hdfs.sensors.hdfs.HdfsSensorRegex
airflow.providers.amazon.aws.hooks.batch_client.AwsBatchClient
airflow.providers.amazon.aws.hooks.batch_waiters.AwsBatchWaiters
python scripts/list-integrations.py | tee /dev/tty > a.txt
cat a.txt | grep -v "Hook$" | grep -v "Sensor$" | grep -v "Operator$" | grep -v "secrets"

@potiuk
Copy link
Member Author

potiuk commented May 24, 2020

I will fix those and build in protection

@potiuk
Copy link
Member Author

potiuk commented May 24, 2020

Automated check during readme generation: Fixing it now:

The class airflow.providers.amazon.aws.operators.google_api_to_s3_transfer.GoogleApiToS3Transfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.amazon.aws.operators.redshift_to_s3.RedshiftToS3Transfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.amazon.aws.operators.s3_to_redshift.S3ToRedshiftTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.amazon.aws.hooks.batch_client.AwsBatchClient is wrongly named. It is one of the HOOKS so it should end with Hook
The class airflow.providers.amazon.aws.hooks.batch_waiters.AwsBatchWaiters is wrongly named. It is one of the HOOKS so it should end with Hook

ERROR! There are 5 classes badly named out of 77 classes for amazon

The class airflow.providers.apache.druid.operators.hive_to_druid.HiveToDruidTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator

ERROR! There are 1 classes badly named out of 5 classes for apache.druid

The class airflow.providers.apache.hdfs.sensors.hdfs.HdfsSensorRegex is wrongly named. It is one of the SENSORS so it should end with Sensor
The class airflow.providers.apache.hdfs.sensors.hdfs.HdfsSensorFolder is wrongly named. It is one of the SENSORS so it should end with Sensor

ERROR! There are 2 classes badly named out of 6 classes for apache.hdfs

The class airflow.providers.apache.hive.operators.mysql_to_hive.MySqlToHiveTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.apache.hive.operators.mssql_to_hive.MsSqlToHiveTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.apache.hive.operators.s3_to_hive.S3ToHiveTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.apache.hive.operators.vertica_to_hive.VerticaToHiveTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.apache.hive.operators.hive_to_mysql.HiveToMySqlTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator

ERROR! There are 5 classes badly named out of 14 classes for apache.hive

The class airflow.providers.google.cloud.operators.gcs_to_gcs.GCSSynchronizeBuckets is wrongly named. It is one of the OPERATORS so it should end with Operator

ERROR! There are 1 classes badly named out of 325 classes for google

The class airflow.providers.microsoft.azure.operators.oracle_to_azure_data_lake_transfer.OracleToAzureDataLakeTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator

ERROR! There are 1 classes badly named out of 20 classes for microsoft.azure

The class airflow.providers.mysql.operators.presto_to_mysql.PrestoToMySqlTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.mysql.operators.s3_to_mysql.S3ToMySqlTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator
The class airflow.providers.mysql.operators.vertica_to_mysql.VerticaToMySqlTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator

ERROR! There are 3 classes badly named out of 5 classes for mysql

The class airflow.providers.oracle.operators.oracle_to_oracle_transfer.OracleToOracleTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator

ERROR! There are 1 classes badly named out of 3 classes for oracle

The class airflow.providers.snowflake.operators.s3_to_snowflake.S3ToSnowflakeTransfer is wrongly named. It is one of the OPERATORS so it should end with Operator

ERROR! There are 1 classes badly named out of 3 classes for snowflake


ERROR! There are in total: 20 classes badly named out of 573 classes 

@potiuk potiuk force-pushed the fix-name-of-google-spreadsheets-operator branch 2 times, most recently from dea47c1 to 8383ec9 Compare May 24, 2020 18:45
@potiuk
Copy link
Member Author

potiuk commented May 24, 2020

Hey @kaxil @ashb @BasPH and @mik-laj -> I fixed the remaining 20 class names now. The CI tests will fail in the future in case somebody tries to commit a wrongly named class as well :).

All good! All 573 classes are properly named

Plus we will see in the CI job colorful output of what has changed in each of the packages (in case there are some changes) :).

I fixed most of the tests and likely docs will be failing and need some fix - however @mik-laj -> maybe you can help. I see 14 tests failing in test_to_contrib and I am not sure where they are coming from - it all looks legit - I must have missed something. Can you help to fix it please?

@potiuk potiuk force-pushed the fix-name-of-google-spreadsheets-operator branch from 8383ec9 to b9e3277 Compare May 24, 2020 18:57
@mik-laj
Copy link
Member

mik-laj commented May 24, 2020

For docs, you should update this file:
https://raw.githubusercontent.com/PolideaInternal/airflow/fix-name-of-google-spreadsheets-operator/docs/howto/operator/gcp/sheets.rst
Screenshot 2020-05-24 at 21 27 59

For the others, I'm waiting for the CI result.

@potiuk potiuk changed the title Fix name of google spreadsheets operator Fixed name of 20 remaining wrongly named operators. May 24, 2020
@potiuk potiuk force-pushed the fix-name-of-google-spreadsheets-operator branch from b9e3277 to 1a3247c Compare May 24, 2020 21:41
ashb
ashb previously requested changes May 24, 2020
backport_packages/refactor_backport_packages.py Outdated Show resolved Hide resolved
backport_packages/refactor_backport_packages.py Outdated Show resolved Hide resolved
backport_packages/refactor_backport_packages.py Outdated Show resolved Hide resolved
@potiuk potiuk force-pushed the fix-name-of-google-spreadsheets-operator branch 3 times, most recently from 219d4d6 to ed02e48 Compare May 25, 2020 17:08
@potiuk
Copy link
Member Author

potiuk commented May 25, 2020

OK @ashb. That one also waits just for your review - note that only last commit counts as it is based on the #8991

@potiuk potiuk force-pushed the fix-name-of-google-spreadsheets-operator branch 3 times, most recently from f309d67 to 366ea1c Compare May 25, 2020 22:46
@potiuk potiuk force-pushed the fix-name-of-google-spreadsheets-operator branch from 366ea1c to beb9992 Compare May 26, 2020 00:44
@potiuk
Copy link
Member Author

potiuk commented May 26, 2020

Hey @ashb -> the "parent" PR is now merged, so this one just contains the changes for "standardizing" all operator names.

Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

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

Can't review for a few days, but don't let my review block any merge

@potiuk
Copy link
Member Author

potiuk commented May 26, 2020

So I dismiss your review so that i can merge it @ashb

@potiuk potiuk dismissed ashb’s stale review May 26, 2020 17:12

ash can't revoew it and we have 3 approvals already.

@potiuk potiuk merged commit 00642a4 into apache:master May 26, 2020
@potiuk potiuk deleted the fix-name-of-google-spreadsheets-operator branch May 26, 2020 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider:amazon-aws AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants