Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
EMAIL_BODY=$(cat <<EOF
{
"subject": "CWYD Pipeline - Quota Check Failed",
"body": "<p>Dear Team,</p><p>The quota check has failed, and the pipeline cannot proceed.</p><p><strong>Build URL:</strong> ${RUN_URL}</p><p>Please take necessary action.</p><p>Best regards,<br>Your Automation Team</p>"
}
EOF
Expand All @@ -88,8 +89,8 @@ jobs:

- name: Set Deployment Region
run: |
echo "Selected Region: $VALID_REGION"
echo "AZURE_LOCATION=$VALID_REGION" >> $GITHUB_ENV
echo "Selected Region: $VALID_REGION"
echo "AZURE_LOCATION=$VALID_REGION" >> $GITHUB_ENV

- name: Generate Resource Group Name
id: generate_rg_name
Expand Down Expand Up @@ -175,13 +176,13 @@ jobs:

# Try to extract URLs from deployment logs as backup
echo "=== Extracting URLs from deployment logs ==="
grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" deploy_output.log | head -2 | tee extracted_urls.txt || echo "No URLs found in logs"
grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" deploy_output.log | sort | uniq | head -2 | tee extracted_urls.txt || echo "No URLs found in logs"

# Check if we have admin URL in logs
grep -E "Done: Deploying service adminweb" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" > log_admin_url.txt || echo "" > log_admin_url.txt
grep -E "Done: Deploying service adminweb" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" | head -1 > log_admin_url.txt || echo "" > log_admin_url.txt

# Check if we have web URL in logs
grep -E "Done: Deploying service web" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" > log_web_url.txt || echo "" > log_web_url.txt
grep -E "Done: Deploying service web" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" | head -1 > log_web_url.txt || echo "" > log_web_url.txt

echo "URLs from logs:"
echo "Admin URL from logs: $(cat log_admin_url.txt)"
Expand Down Expand Up @@ -217,8 +218,8 @@ jobs:
run: |
# Method 1: Check files created by Makefile
echo "=== Method 1: Files from Makefile ==="
if [ -f "web_url.txt" ]; then
WEB_URL=$(cat web_url.txt | tr -d '\n\r' | xargs)
if [ -f "frontend_url.txt" ]; then
WEB_URL=$(cat frontend_url.txt | tr -d '\n\r' | xargs)
echo "Web URL from makefile: '$WEB_URL'"
fi

Expand Down Expand Up @@ -248,7 +249,7 @@ jobs:
# Set outputs
if [ -n "$WEB_URL" ] && [ "$WEB_URL" != "null" ] && [ "$WEB_URL" != "" ]; then
echo "web_url=$WEB_URL" >> $GITHUB_OUTPUT
echo "WEB_WEBSITE_URL=$WEB_URL" >> $GITHUB_ENV
echo "FRONTEND_WEBSITE_URL=$WEB_URL" >> $GITHUB_ENV
echo "✅ Web URL: $WEB_URL"
else
echo "web_url=" >> $GITHUB_OUTPUT
Expand All @@ -272,17 +273,15 @@ jobs:

- name: Display URLs
run: |
echo "Web URL: ${{ env.WEB_WEBSITE_URL }}"
echo "Web URL: ${{ env.FRONTEND_WEBSITE_URL }}"
echo "Admin URL: ${{ env.ADMIN_WEBSITE_URL }}"
echo "web_url=$WEB_URL" >> $GITHUB_OUTPUT
echo "admin_url=$ADMIN_URL" >> $GITHUB_OUTPUT

- name: Disable Authentication with Script
run: |
chmod +x scripts/disable_auth.sh
./scripts/disable_auth.sh
env:
FRONTEND_WEBSITE_URL: ${{ env.WEB_WEBSITE_URL }}
FRONTEND_WEBSITE_URL: ${{ env.FRONTEND_WEBSITE_URL }}
ADMIN_WEBSITE_URL: ${{ env.ADMIN_WEBSITE_URL }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
Expand Down Expand Up @@ -380,8 +379,8 @@ jobs:
echo "DEPLOYMENT_SUCCESS=true" >> $GITHUB_OUTPUT


- name: Wait for 5 minutes for propagation
run: sleep 300
- name: Wait for 25 minutes for propagation
run: sleep 1500


e2e-test:
Expand Down Expand Up @@ -434,6 +433,7 @@ jobs:
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
EMAIL_BODY=$(cat <<EOF
{
"subject": "CWYD Pipeline - Deployment Failed",
"body": "<p>Dear Team,</p><p>The CWYD Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}</p><p>Please investigate.</p><p>Best regards,<br>Your Automation Team</p>"
}
EOF
Expand Down
129 changes: 127 additions & 2 deletions code/backend/pages/common.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,69 @@
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {visibility: hidden;}
[data-testid="baseButton-secondary"] svg{display: none;}
[data-testid="stPopoverBody"] button{float: right;}
[data-testid="stSidebar"] {z-index: 999;}
[data-testid="stSidebar"] {
z-index: 999;
position: relative !important;
}
/* Ensure sidebar is always visible and accessible */
[data-testid="stSidebar"] > div {
position: relative !important;
width: auto !important;
max-width: none !important;
}
/* Allow sidebar toggle button SVG to be visible */
[data-testid="stSidebar"] [data-testid="baseButton-secondary"] svg {
display: block !important;
}
/* Ensure all sidebar buttons and icons are visible */
[data-testid="stSidebar"] button svg {
display: block !important;
}
[data-testid="collapsedControl"] svg {
display: block !important;
}
/* Additional selectors for sidebar toggle button */
.css-1d391kg svg, .css-1v0mbdj svg {
display: block !important;
}
/* General sidebar control visibility */
[data-testid="stSidebarNav"] svg,
[data-testid="stSidebarNavItems"] svg,
button[kind="headerNoPadding"] svg {
display: block !important;
}
/* Ensure sidebar toggle button is always visible even at full width */
.stApp > header [data-testid="stToolbar"] button {
display: flex !important;
visibility: visible !important;
opacity: 1 !important;
}
.stApp > header [data-testid="stToolbar"] button svg {
display: block !important;
}
/* Force visibility of sidebar toggle in main header */
header[data-testid="stHeader"] button {
display: flex !important;
visibility: visible !important;
}
header[data-testid="stHeader"] button svg {
display: block !important;
}
/* Ensure sidebar toggle is accessible when sidebar is full width */
[data-testid="stSidebar"].css-1d391kg,
[data-testid="stSidebar"][style*="width: 100%"] {
position: relative !important;
}
[data-testid="stSidebar"].css-1d391kg [data-testid="baseButton-secondary"],
[data-testid="stSidebar"][style*="width: 100%"] [data-testid="baseButton-secondary"] {
position: absolute !important;
top: 0.5rem !important;
right: 0.5rem !important;
z-index: 1000 !important;
display: flex !important;
visibility: visible !important;
}
[data-testid="stPopoverBody"] .stTooltipIcon [data-testid="baseButton-secondary"] p{
font-weight: bold;
}
Expand Down Expand Up @@ -32,4 +92,69 @@ header {visibility: hidden;}
.st-emotion-cache-1kyxreq{
max-width: 200px !important;
}
/* Ensure sidebar toggle is visible on smaller screens */
[data-testid="stSidebar"] [data-testid="baseButton-secondary"] {
position: fixed !important;
top: 1rem !important;
right: 1rem !important;
z-index: 9999 !important;
background: white !important;
border: 1px solid #ccc !important;
border-radius: 4px !important;
padding: 4px !important;
}
}
/* Override any width restrictions on sidebar when expanded */
.stApp .css-1d391kg {
min-width: auto !important;
max-width: 100vw !important;
}
/* Ensure main content doesn't push sidebar toggle out of view */
.stApp > .css-1d391kg + section {
position: relative !important;
}
.stApp > .css-1d391kg + section::before {
content: '';
position: absolute;
top: 0.5rem;
right: 0.5rem;
z-index: 1001;
pointer-events: none;
}

/* Hide Deploy button, main menu, and toolbar - show ONLY the loading spinner */
[data-testid="stToolbarActions"],
[data-testid="stAppDeployButton"],
[data-testid="stMainMenu"] {
display: none !important;
}

/* Ensure ONLY the loading spinner/gif is visible */
img[alt="Running..."],
img[class*="st-emotion-cache"][alt*="Running"],
.st-emotion-cache-1j15ncu.e14hul0q5 {
display: block !important;
visibility: visible !important;
opacity: 1 !important;
z-index: 10000 !important;
}

/* Hide the toolbar section with Deploy button and menu using stable selectors */
[data-testid="stToolbarActions"],
[data-testid="stAppDeployButton"],
[data-testid="stMainMenu"] {
display: none !important;
}

/* Ensure all loading/spinner elements remain visible */
[data-testid="stSpinner"],
.stSpinner,
[class*="spinner"],
[class*="loading"],
[data-testid*="spinner"],
div[role="status"],
.st-emotion-cache-*[class*="spinner"] {
display: block !important;
visibility: visible !important;
opacity: 1 !important;
}
2 changes: 1 addition & 1 deletion tests/e2e-test/tests/test_chat_with_your_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def validate_admin_page_loaded(page, admin_page, home_page):

def validate_files_are_uploaded(page, admin_page, home_page):
admin_page.click_delete_data_tab()
page.wait_for_timeout(5000)
page.wait_for_timeout(20000)
checkbox_count = page.locator(admin_page.DELETE_CHECK_BOXES).count()
assert checkbox_count >= 1, "No files available to delete"

Expand Down
Loading