potiuk commented on a change in pull request #12472:
URL: https://github.com/apache/airflow/pull/12472#discussion_r528901385



##########
File path: scripts/in_container/run_install_and_test_provider_packages.sh
##########
@@ -93,6 +93,27 @@ function discover_all_provider_packages() {
     fi
 }
 
+function discover_all_extra_links() {
+    echo
+    echo Listing available extra links via 'airflow providers extra_links'
+    echo
+
+    airflow providers extra_links
+
+    local expected_number_of_extra_links=4
+    local actual_number_of_extra_links
+    actual_number_of_extra_links=$(airflow providers extra_links --output 
simple | grep -c "airflow.providers" | xargs)
+    if [[ ${actual_number_of_extra_links} != 
"${expected_number_of_extra_links}" ]]; then
+        >&2 echo "ERROR! Number of extra links installed is wrong!"
+        >&2 echo "Expected number was '${expected_number_of_extra_links}' and 
got '${actual_number_of_extra_links}'"
+        >&2 echo
+        >&2 echo "Either increase the number of links if you added one or fix 
the problem with imports if you see one."
+        >&2 echo
+    fi
+}

Review comment:
       This is quite a different test - this is an integration test. 
   
   That's why it is in bash. It performs end-to-end process: builds airflow 
.whl, installs airflow from .whl. builds all providers from .whl (or .tar.gz) 
and finally it checks if those providers are all properly discovered. 
   
   For example in this case it will also detect any problems coming from 
contextual version conflicts. Not all operators will be registered during this 
test if some of them fails to run entry_point because of the Version Conflict.
   
   For now this comparison does not result in error. because we actually have 
some version conflicts to resolve. 
   
   IMHO it SHOULD be in bash because of the nature of it. It just simulates 
real users installing airflow and running the CLI..
   




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to