Skip to content

Outdated bash operator import on Composer 2 Docs #11433 - #11440

Merged
leahecole merged 19 commits into
GoogleCloudPlatform:mainfrom
magar51:main
Apr 23, 2024
Merged

Outdated bash operator import on Composer 2 Docs #11433#11440
leahecole merged 19 commits into
GoogleCloudPlatform:mainfrom
magar51:main

Conversation

@magar51

Copy link
Copy Markdown
Contributor

Description

Fixes#11433

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@magar51
magar51 requested review from a team as code ownersApril 12, 2024 09:38
@product-auto-labelproduct-auto-labelBot added samples Issues that are directly related to samples. api: composer Issues related to the Managed Service for Apache Airflow API. api: endpoints Issues related to the Cloud Endpoints API. api: speech Issues related to the Speech-to-Text API. labels Apr 12, 2024
holtskinner
holtskinner previously approved these changes Apr 12, 2024

@georgetayloorgeorgetayloor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

outdated python operator import, change to:
from airflow.operators.python import PythonOperator


from airflow.operators.bash_operator import BashOperator
from airflow.operators.bash import BashOperator
from airflow.operators.python_operator import PythonOperator

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

from airflow.operators.python import PythonOperator

Comment on lines 21 to 23
from airflow.providers.google.cloud.operators.gcs import GCSCreateBucketOperator
from airflow.providers.google.cloud.operators.gcs import GCSDeleteBucketOperator
from airflow.providers.google.cloud.operators.gcs import GCSListObjectsOperator

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not sure on styling specifics, is more concise for:
from airflow.providers.google.cloud.operators.gcs import GCSCreateBucketOperator, GCSDeleteBucketOperator, GCSListObjectsOperator?

@georgetayloorgeorgetayloor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM: one note on styling when importing multiple classes from same package

@kweinmeisterkweinmeister added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 16, 2024
@kokoro-teamkokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 16, 2024
@leahecole
leahecole dismissed holtskinner’s stale reviewApril 18, 2024 15:54

Tests and lint do not pass

@leahecoleleahecole left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I left some comments - there are places where the BashOperator should not be modified. Additionally, please revert the changes in the endpoint and speech directories and submit them as separate PRs with linked issues. Additionally, I changed it to be a Draft PR while lint and tests are not passing. Feel free to change it back to "ready to review" once they are passing!

Comment threadcomposer/airflow_1_samples/clear_file_system_caches_dag.py Outdated
Comment threadcomposer/airflow_1_samples/gke_operator.py Outdated
Comment threadcomposer/airflow_1_samples/grouping.py Outdated
Comment threadcomposer/blog/gcp-tech-blog/unit-test-dags-cloud-build/dags/example_dag.py Outdated
@leahecole
leahecole marked this pull request as draft April 18, 2024 16:03
reverting Airflow 1 changes where relevant
@leahecoleleahecole added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 23, 2024
@kokoro-teamkokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 23, 2024
Comment threadendpoints/getting-started/main.py Outdated
Comment threadendpoints/getting-started/main.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
Comment threadspeech/snippets/transcribe_streaming_v2.py Outdated
@leahecoleleahecole added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed api: speech Issues related to the Speech-to-Text API. api: endpoints Issues related to the Cloud Endpoints API. labels Apr 23, 2024
@kokoro-teamkokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 23, 2024
@kweinmeisterkweinmeister added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 23, 2024
@leahecole
leahecole marked this pull request as ready for review April 23, 2024 16:25
@leahecole
leahecole merged commit 768f82b into GoogleCloudPlatform:mainApr 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: composerIssues related to the Managed Service for Apache Airflow API.kokoro:runAdd this label to force Kokoro to re-run the tests.samplesIssues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated bash operator import on Composer 2 Docs

6 participants

@magar51@leahecole@holtskinner@georgetayloor@kweinmeister@kokoro-team