You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/10/26 14:31:53 UTC

[GitHub] [airflow] deedmitrij opened a new pull request #19227: Fix GCS system tests

deedmitrij opened a new pull request #19227:
URL: https://github.com/apache/airflow/pull/19227


   - Add '/tmp/' path to names of creating files
   - Add separate methods and fixtures for creating\deleting required files


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



[GitHub] [airflow] mnojek commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r756800781



##########
File path: tests/providers/google/cloud/operators/test_gcs_system.py
##########
@@ -22,26 +22,49 @@
 from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context
 
 
+@pytest.fixture(scope="module")
+def helper():
+    return GcsSystemTestHelper()

Review comment:
       @uranusjr @deedmitrij I cannot resolve the issue cause I'm not the author of the PR. Please resolve or answer or guide me what changes should I do.




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



[GitHub] [airflow] mnojek commented on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek commented on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-976388802


   Hey @uranusjr @potiuk 
   Some checks are failing due to changes done in #19609. Is there a plan to fix it or maybe it's already fixed?


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



[GitHub] [airflow] potiuk commented on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-976392964


   What makes you think it's caused by #19609 ?  - (BTW: you are 57 commits behind so I suggest rebase (though we seem to have an OOM in `main` which I am looking at now, so maybe wait with teh rebase.


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



[GitHub] [airflow] potiuk commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r736675490



##########
File path: airflow/providers/google/cloud/example_dags/example_gcs.py
##########
@@ -50,10 +50,10 @@
 
 BUCKET_2 = os.environ.get("GCP_GCS_BUCKET_2", "test-gcs-example-bucket-2")
 
-PATH_TO_TRANSFORM_SCRIPT = os.environ.get('GCP_GCS_PATH_TO_TRANSFORM_SCRIPT', 'test.py')
-PATH_TO_UPLOAD_FILE = os.environ.get("GCP_GCS_PATH_TO_UPLOAD_FILE", "test-gcs-example.txt")
+PATH_TO_TRANSFORM_SCRIPT = os.environ.get('GCP_GCS_PATH_TO_TRANSFORM_SCRIPT', '/tmp/transform_script.py')

Review comment:
       similarly to #19208 we should use gettempdir() here and below.




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



[GitHub] [airflow] potiuk merged pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #19227:
URL: https://github.com/apache/airflow/pull/19227


   


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



[GitHub] [airflow] potiuk commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r756872151



##########
File path: tests/providers/google/cloud/operators/test_gcs_system.py
##########
@@ -22,26 +22,49 @@
 from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context
 
 
+@pytest.fixture(scope="module")
+def helper():
+    return GcsSystemTestHelper()

Review comment:
       Helper is as good as it can get. I also do not like general "Util, Helper, Manager, Processor" but if you look at Airflow code we have quite a bunch of those everywhere (and as much as we fight it - there ARE cases where they are needed and actually usually in tests, I'd be far more relaxed to have those).




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



[GitHub] [airflow] mnojek commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r755902558



##########
File path: tests/providers/google/cloud/operators/test_gcs_system.py
##########
@@ -22,26 +22,49 @@
 from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context
 
 
+@pytest.fixture(scope="module")
+def helper():
+    return GcsSystemTestHelper()

Review comment:
       Do you have any proposition? Looks fine for me, but I can change it, if you want. For example, I can change it to `gcs_helper`.




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



[GitHub] [airflow] uranusjr commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r749970052



##########
File path: tests/providers/google/cloud/operators/test_gcs_system.py
##########
@@ -22,26 +22,49 @@
 from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context
 
 
+@pytest.fixture(scope="module")
+def helper():
+    return GcsSystemTestHelper()

Review comment:
       Can we give this fixture a more descriptive name?




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



[GitHub] [airflow] deedmitrij commented on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
deedmitrij commented on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-961142579


   Any updates?


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



[GitHub] [airflow] deedmitrij commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
deedmitrij commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r737389257



##########
File path: airflow/providers/google/cloud/example_dags/example_gcs.py
##########
@@ -50,10 +50,10 @@
 
 BUCKET_2 = os.environ.get("GCP_GCS_BUCKET_2", "test-gcs-example-bucket-2")
 
-PATH_TO_TRANSFORM_SCRIPT = os.environ.get('GCP_GCS_PATH_TO_TRANSFORM_SCRIPT', 'test.py')
-PATH_TO_UPLOAD_FILE = os.environ.get("GCP_GCS_PATH_TO_UPLOAD_FILE", "test-gcs-example.txt")
+PATH_TO_TRANSFORM_SCRIPT = os.environ.get('GCP_GCS_PATH_TO_TRANSFORM_SCRIPT', '/tmp/transform_script.py')

Review comment:
       Ok, done




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



[GitHub] [airflow] mnojek commented on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek commented on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-971539773


   Some checks are failing probably due to changes made in #19609 


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



[GitHub] [airflow] mnojek commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r756800781



##########
File path: tests/providers/google/cloud/operators/test_gcs_system.py
##########
@@ -22,26 +22,49 @@
 from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context
 
 
+@pytest.fixture(scope="module")
+def helper():
+    return GcsSystemTestHelper()

Review comment:
       @uranusjr @deedmitrij I cannot resolve the issue cause I'm not the author of the PR. Please resolve or answer or guide me what changes should I do because it's blocking the PR to be merged.




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



[GitHub] [airflow] deedmitrij commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
deedmitrij commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r737643316



##########
File path: airflow/providers/google/cloud/example_dags/example_gcs.py
##########
@@ -50,10 +51,10 @@
 
 BUCKET_2 = os.environ.get("GCP_GCS_BUCKET_2", "test-gcs-example-bucket-2")
 
-PATH_TO_TRANSFORM_SCRIPT = os.environ.get('GCP_GCS_PATH_TO_TRANSFORM_SCRIPT', 'test.py')
-PATH_TO_UPLOAD_FILE = os.environ.get("GCP_GCS_PATH_TO_UPLOAD_FILE", "test-gcs-example.txt")
+PATH_TO_TRANSFORM_SCRIPT = os.environ.get("GCP_GCS_PATH_TO_TRANSFORM_SCRIPT", f"{gettempdir()}/transform_script.py")

Review comment:
       Ok, done




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



[GitHub] [airflow] mnojek removed a comment on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek removed a comment on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-977610627


   @potiuk I rebased the branch and rerun the tests. Still one check is failing, not sure exactly what's the cause.


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



[GitHub] [airflow] mnojek commented on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek commented on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-977610627


   @potiuk I rebased the branch and rerun the tests. Still one check is failing, not sure exactly what's the cause.


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



[GitHub] [airflow] uranusjr commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r737461937



##########
File path: airflow/providers/google/cloud/example_dags/example_gcs.py
##########
@@ -50,10 +51,10 @@
 
 BUCKET_2 = os.environ.get("GCP_GCS_BUCKET_2", "test-gcs-example-bucket-2")
 
-PATH_TO_TRANSFORM_SCRIPT = os.environ.get('GCP_GCS_PATH_TO_TRANSFORM_SCRIPT', 'test.py')
-PATH_TO_UPLOAD_FILE = os.environ.get("GCP_GCS_PATH_TO_UPLOAD_FILE", "test-gcs-example.txt")
+PATH_TO_TRANSFORM_SCRIPT = os.environ.get("GCP_GCS_PATH_TO_TRANSFORM_SCRIPT", f"{gettempdir()}/transform_script.py")

Review comment:
       Please use `os.path.join` instead.




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



[GitHub] [airflow] potiuk commented on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-976409796


   Likely fix to the current OOM issues here: https://github.com/apache/airflow/pull/19766


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



[GitHub] [airflow] mnojek commented on pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
mnojek commented on pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#issuecomment-977611678


   @potiuk @uranusjr @turbaszek
   The static checks have passed. Please approve if everything's fine and merge. Thanks!


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



[GitHub] [airflow] uranusjr commented on a change in pull request #19227: Fix GCS system tests

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #19227:
URL: https://github.com/apache/airflow/pull/19227#discussion_r756811317



##########
File path: tests/providers/google/cloud/operators/test_gcs_system.py
##########
@@ -22,26 +22,49 @@
 from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context
 
 
+@pytest.fixture(scope="module")
+def helper():
+    return GcsSystemTestHelper()

Review comment:
       `gcs_helper` sounds good to me. The PR looks good to me besides this as well (and I already approved), so let’s wait for another maintainer to take a look and merge if they feel it’s good to go.




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