-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix test connection response not displayed in UI #55680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
sidshas03
wants to merge
8
commits into
apache:main
from
sidshas03:fix/test-connection-response-display
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7a37241
Fix test connection response not displayed in UI
sidshas03 e7dc99c
Merge branch 'main' into fix/test-connection-response-display
sidshas03 87ad36c
Merge branch 'main' into fix/test-connection-response-display
sidshas03 1c30e43
Merge branch 'main' into fix/test-connection-response-display
sidshas03 d22413c
Merge branch 'main' into fix/test-connection-response-display
sidshas03 d6136fa
Merge branch 'main' into fix/test-connection-response-display
sidshas03 8cb5dcd
Fix test connection response display - Enhanced error handling and vi…
sidshas03 5561dca
Merge branch 'main' into fix/test-connection-response-display
sidshas03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| <!doctype html> | ||
| <html style="height: 100%"> | ||
| <html lang="en" style="height: 100%"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <base href="{{ backend_server_base_url }}" /> | ||
| <link rel="icon" type="image/png" href="/static/pin_32.png" /> | ||
| <base href="./" /> | ||
| <link rel="icon" type="image/png" href="./static/pin_32.png" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Airflow</title> | ||
| <script type="module" crossorigin src="./static/assets/index-mNLOr9BH.js"></script> | ||
| </head> | ||
| <body style="height: 100%"> | ||
| <div id="root" style="height: 100%"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "🚀 Setting up complete Airflow environment for PR #55680..." | ||
|
|
||
| # Set environment variables | ||
| export PATH="/Users/alphaskynet/Library/Python/3.9/bin:$PATH" | ||
|
Comment on lines
+1
to
+6
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is that script for instance? I guess a local helper script, generated with LLM tools? We shouldn't commit this, please double check before submitting a PR. |
||
| export AIRFLOW_HOME=/tmp/airflow_test | ||
| export AIRFLOW__CORE__TEST_CONNECTION=Enabled | ||
| export AIRFLOW__CORE__LOAD_EXAMPLES=False | ||
| export AIRFLOW__CORE__EXECUTOR=SequentialExecutor | ||
| export AIRFLOW__CORE__DAGS_FOLDER=/tmp/airflow_test/dags | ||
| export AIRFLOW__CORE__SQL_ALCHEMY_CONN=sqlite:////tmp/airflow_test/airflow.db | ||
|
|
||
| # Clean up previous runs | ||
| echo "🧹 Cleaning up previous runs..." | ||
| rm -rf /tmp/airflow_test | ||
| mkdir -p /tmp/airflow_test/dags | ||
|
|
||
| # Install HTTP provider | ||
| echo "📦 Installing HTTP provider..." | ||
| pip install -U apache-airflow-providers-http | ||
|
|
||
| # Initialize Airflow database | ||
| echo "🗄️ Initializing Airflow database..." | ||
| cd /Users/alphaskynet/Downloads/Github\ Contributions/airflow | ||
| airflow db init | ||
|
|
||
| # Create test connections | ||
| echo "🔗 Creating test connections..." | ||
| python3 -c " | ||
| import os | ||
| import sys | ||
| from airflow.models import Connection | ||
| from airflow.utils.session import create_session | ||
|
|
||
| def create_test_connections(): | ||
| with create_session() as session: | ||
| # Delete existing test connections | ||
| session.query(Connection).filter(Connection.conn_id.in_(['test_connection_success', 'test_connection_failure'])).delete() | ||
|
|
||
| # Create success connection | ||
| success_conn = Connection( | ||
| conn_id='test_connection_success', | ||
| conn_type='http', | ||
| host='https://httpbin.org/anything', | ||
| port=443, | ||
| schema='https', | ||
| ) | ||
|
|
||
| # Create failure connection | ||
| failure_conn = Connection( | ||
| conn_id='test_connection_failure', | ||
| conn_type='http', | ||
| host='https://invalid.invalid', | ||
| port=443, | ||
| schema='https', | ||
| ) | ||
|
|
||
| session.add_all([success_conn, failure_conn]) | ||
| session.commit() | ||
| print('✅ Test connections created successfully!') | ||
| print(f' - {success_conn.conn_id}: {success_conn.host} (should work)') | ||
| print(f' - {failure_conn.conn_id}: {failure_conn.host} (should fail)') | ||
|
|
||
| create_test_connections() | ||
| " | ||
|
|
||
| # Start Airflow backend | ||
| echo "🚀 Starting Airflow backend..." | ||
| airflow standalone & | ||
| AIRFLOW_PID=$! | ||
|
|
||
| # Wait for Airflow to start | ||
| echo "⏳ Waiting for Airflow to start..." | ||
| sleep 30 | ||
|
|
||
| # Get the generated password | ||
| echo "🔑 Getting login credentials..." | ||
| if [ -f "/tmp/airflow_test/simple_auth_manager_passwords.json.generated" ]; then | ||
| PASSWORD=$(cat /tmp/airflow_test/simple_auth_manager_passwords.json.generated | grep -o '"admin": "[^"]*"' | cut -d'"' -f4) | ||
| echo "✅ Airflow is ready!" | ||
| echo "🌐 Backend UI: http://localhost:8080/" | ||
| echo "👤 Username: admin" | ||
| echo "🔑 Password: $PASSWORD" | ||
| echo "" | ||
| echo "📸 Ready to test your PR #55680!" | ||
| echo "1. Go to http://localhost:8080/" | ||
| echo "2. Login with admin / $PASSWORD" | ||
| echo "3. Navigate to Admin → Connections" | ||
| echo "4. Test the connections and take screenshots" | ||
| else | ||
| echo "❌ Failed to get password. Check Airflow logs." | ||
| fi | ||
|
|
||
| echo "✅ Complete setup finished!" | ||
| echo "Backend PID: $AIRFLOW_PID" | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would break a lot of things for instance.