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 2022/08/30 10:56:26 UTC

[GitHub] [airflow] bhirsz opened a new pull request, #26060: Migrate Data Loss Prevention system tests according to AIP-47

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

   From #22447 and #22430


-- 
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 #26060: Migrate Data Loss Prevention system tests according to AIP-47

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

   Almost @bhirsz  ... almost :)


-- 
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 #26060: Migrate Data Loss Prevention system tests according to AIP-47

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

   Needs to be rebased and conflicts resolved. 


-- 
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] o-nikolas commented on a diff in pull request #26060: Migrate Data Loss Prevention system tests according to AIP-47

Posted by GitBox <gi...@apache.org>.
o-nikolas commented on code in PR #26060:
URL: https://github.com/apache/airflow/pull/26060#discussion_r969063285


##########
tests/system/providers/google/cloud/data_loss_prevention/example_dlp_inspect_template.py:
##########
@@ -0,0 +1,124 @@
+#
+# 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.
+
+"""
+Example Airflow DAG that creates, updates, list and deletes Data Loss Prevention inspect templates.
+"""
+
+import os
+from datetime import datetime
+
+from google.cloud.dlp_v2.types import ContentItem, InspectConfig, InspectTemplate
+
+from airflow import models
+from airflow.providers.google.cloud.operators.dlp import (
+    CloudDLPCreateInspectTemplateOperator,
+    CloudDLPDeleteInspectTemplateOperator,
+    CloudDLPGetInspectTemplateOperator,
+    CloudDLPInspectContentOperator,
+    CloudDLPListInspectTemplatesOperator,
+    CloudDLPUpdateInspectTemplateOperator,
+)
+from airflow.utils.trigger_rule import TriggerRule
+
+DAG_ID = "dlp"

Review Comment:
   Super small nit: DAG_ID does not match the file 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] potiuk merged pull request #26060: Migrate Data Loss Prevention system tests according to AIP-47

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


-- 
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] bhirsz commented on pull request #26060: Migrate Data Loss Prevention system tests according to AIP-47

Posted by GitBox <gi...@apache.org>.
bhirsz commented on PR #26060:
URL: https://github.com/apache/airflow/pull/26060#issuecomment-1232558230

   Added missing system tests except for CloudDLPRedactImageOperator operator which will require more work (mostly because we need to host images externally). Interesting fact: found out thanks to system tests that 2 operators were broken (I also fixed them in the PR). 


-- 
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] bhirsz commented on pull request #26060: Migrate Data Loss Prevention system tests according to AIP-47

Posted by GitBox <gi...@apache.org>.
bhirsz commented on PR #26060:
URL: https://github.com/apache/airflow/pull/26060#issuecomment-1250767957

   @potiuk Rebased & 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] bhirsz commented on pull request #26060: Migrate Data Loss Prevention system tests according to AIP-47

Posted by GitBox <gi...@apache.org>.
bhirsz commented on PR #26060:
URL: https://github.com/apache/airflow/pull/26060#issuecomment-1231531257

   I now see that DLP have only 10 from 30 possible operators covered with system tests. I will update this PR with system tests - reverting PR to draft in meantime.


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