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/17 17:54:15 UTC

[GitHub] [airflow] bbovenzi opened a new pull request, #25770: get dataset by uri instead of if in rest api

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

   Dataset.id is just an incrementing integer and shouldn't be revealed to the user. Instead, we should get a dataset by its uri.
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   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](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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] bbovenzi merged pull request #25770: get dataset by uri instead of if in rest api

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


-- 
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] jedcunningham commented on a diff in pull request #25770: get dataset by uri instead of if in rest api

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on code in PR #25770:
URL: https://github.com/apache/airflow/pull/25770#discussion_r948400442


##########
tests/api_connexion/endpoints/test_dataset_endpoint.py:
##########
@@ -80,7 +80,9 @@ def test_should_respond_200(self, session):
         assert session.query(DatasetModel).count() == 1
 
         with assert_queries_count(5):
-            response = self.client.get("/api/v1/datasets/1", environ_overrides={'REMOTE_USER': "test"})
+            response = self.client.get(
+                "/api/v1/datasets/s3%3A%2F%2Fbucket%2Fkey", environ_overrides={'REMOTE_USER': "test"}

Review Comment:
   nit: Might be better to have unencoded uri here and encode it, like this: https://github.com/apache/airflow/pull/25774/files#diff-b9ec718a601d8a76e6a2cd05b826593cc761fbef74c2bbd1c8f2ba0e5e8eb603R133



-- 
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] bbovenzi commented on a diff in pull request #25770: get dataset by uri instead of if in rest api

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on code in PR #25770:
URL: https://github.com/apache/airflow/pull/25770#discussion_r948268955


##########
airflow/api_connexion/openapi/v1.yaml:
##########
@@ -4313,13 +4313,14 @@ components:
       required: true
       description: The import error ID.
 
-    DatasetID:
+    DatasetURI:
       in: path
-      name: id
+      name: uri
       schema:
-        type: integer
+        type: string
+        format: path

Review Comment:
   This was the key piece to get strings with slashes in them to be accepted. We probably need to add this to a few other parts of the API



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