Skip to content

Commit 2b96ec1

Browse files
Merge branch 'main' into fix-logout-twice
2 parents 5b510e8 + cbea0c0 commit 2b96ec1

17 files changed

Lines changed: 1170 additions & 217 deletions

File tree

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Copyright 2025 Collate
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
# This workflow executes SSO-specific end-to-end (e2e) tests using Playwright with MySQL as the database.
13+
#
14+
# Purpose:
15+
# - Run SSO configuration tests for various authentication providers (Google, Azure AD, Okta, SAML, LDAP, etc.)
16+
# - Validate SSO provider selection, field visibility, and configuration workflows
17+
# - Tests are tagged with @sso and run in isolation from other Playwright tests
18+
#
19+
# Triggers:
20+
# - Manual trigger via workflow_dispatch
21+
# - Pull requests with "safe to test" label
22+
# - Excludes draft PRs
23+
#
24+
# Test Location:
25+
# - openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SSOConfiguration.spec.ts
26+
#
27+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
28+
29+
name: SSO Authentication Tests (Nightly)
30+
31+
# schedule:
32+
# # Run every night at 2 AM UTC
33+
# - cron: '0 2 * * *'
34+
workflow_dispatch: # Allow manual trigger
35+
inputs:
36+
sso_provider:
37+
description: "SSO Provider to test"
38+
required: true
39+
default: "google"
40+
type: choice
41+
options:
42+
- google
43+
- okta
44+
- azure
45+
- auth0
46+
- saml
47+
- cognito
48+
49+
permissions:
50+
contents: read
51+
52+
concurrency:
53+
group: sso-auth-tests-${{ github.workflow }}-${{ github.event.inputs.sso_provider || 'scheduled' }}
54+
cancel-in-progress: true
55+
56+
jobs:
57+
sso-auth-tests:
58+
runs-on: ubuntu-latest
59+
if: ${{ !github.event.pull_request.draft }}
60+
environment: test
61+
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
provider: ${{ github.event.inputs.sso_provider == 'all' && fromJSON('["google", "okta", "azure", "auth0"]') || github.event.inputs.sso_provider && fromJSON(format('["{0}"]', github.event.inputs.sso_provider)) || fromJSON('["google"]') }}
66+
67+
steps:
68+
- name: Free Disk Space (Ubuntu)
69+
uses: jlumbroso/free-disk-space@main
70+
with:
71+
tool-cache: false
72+
android: true
73+
dotnet: true
74+
haskell: true
75+
large-packages: false
76+
swap-storage: true
77+
docker-images: false
78+
79+
- name: Wait for the labeler
80+
uses: lewagon/wait-on-check-action@v1.3.4
81+
if: ${{ github.event_name == 'pull_request_target' }}
82+
with:
83+
ref: ${{ github.event.pull_request.head.sha }}
84+
check-name: Team Label
85+
repo-token: ${{ secrets.GITHUB_TOKEN }}
86+
wait-interval: 90
87+
88+
- name: Verify PR labels
89+
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
90+
if: ${{ github.event_name == 'pull_request_target' }}
91+
with:
92+
github-token: "${{ secrets.GITHUB_TOKEN }}"
93+
valid-labels: "safe to test"
94+
pull-request-number: "${{ github.event.pull_request.number }}"
95+
disable-reviews: true # To not auto approve changes
96+
97+
- name: Checkout
98+
uses: actions/checkout@v4
99+
with:
100+
ref: ${{ github.event.pull_request.head.sha }}
101+
102+
- name: Cache Maven Dependencies
103+
id: cache-output
104+
uses: actions/cache@v4
105+
with:
106+
path: ~/.m2
107+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
108+
restore-keys: |
109+
${{ runner.os }}-maven-
110+
111+
- name: Setup Openmetadata Test Environment
112+
uses: ./.github/actions/setup-openmetadata-test-environment
113+
with:
114+
python-version: "3.10"
115+
# Skip ingestion setup for SSO tests
116+
args: "-d postgresql -i false"
117+
ingestion_dependency: "all"
118+
119+
- name: Setup Node.js
120+
uses: actions/setup-node@v4
121+
with:
122+
node-version-file: 'openmetadata-ui/src/main/resources/ui/.nvmrc'
123+
124+
- name: Install dependencies
125+
working-directory: openmetadata-ui/src/main/resources/ui/
126+
run: yarn --ignore-scripts --frozen-lockfile
127+
128+
- name: Install Playwright Browsers
129+
run: npx playwright@1.51.1 install --with-deps
130+
131+
- name: Run SSO Authentication Tests
132+
working-directory: openmetadata-ui/src/main/resources/ui
133+
run: npx playwright test playwright/e2e/Auth/SSOAuthentication.spec.ts --workers=1
134+
env:
135+
SSO_PROVIDER_TYPE: ${{ matrix.provider }}
136+
SSO_USERNAME: ${{ secrets[format('{0}_SSO_USERNAME', upper(matrix.provider))] }}
137+
SSO_PASSWORD: ${{ secrets[format('{0}_SSO_PASSWORD', upper(matrix.provider))] }}
138+
PLAYWRIGHT_IS_OSS: true
139+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
timeout-minutes: 60
141+
142+
- name: Upload test results
143+
if: always()
144+
uses: actions/upload-artifact@v4
145+
with:
146+
name: sso-auth-test-results-${{ matrix.provider }}
147+
path: openmetadata-ui/src/main/resources/ui/playwright/output/playwright-report
148+
retention-days: 5
149+
150+
- name: Clean Up
151+
run: |
152+
cd ./docker/development
153+
docker compose down --remove-orphans
154+
sudo rm -rf ${PWD}/docker-volume
155+
156+
notify:
157+
needs: sso-auth-tests
158+
runs-on: ubuntu-latest
159+
if: failure()
160+
steps:
161+
- name: Send notification on failure
162+
run: |
163+
echo "SSO Authentication tests failed for one or more providers"
164+
# Add your notification logic here (Slack, email, etc.)

openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/CustomControls.component.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ import { ReactComponent as FilterLinesIcon } from '../../../assets/svg/ic-filter
3333
import { ReactComponent as FullscreenIcon } from '../../../assets/svg/ic-fullscreen.svg';
3434
import { ReactComponent as SettingsOutlined } from '../../../assets/svg/ic-settings-gear.svg';
3535
import { LINEAGE_DROPDOWN_ITEMS } from '../../../constants/AdvancedSearch.constants';
36-
import { FULLSCREEN_QUERY_PARAM_KEY } from '../../../constants/constants';
36+
import {
37+
AGGREGATE_PAGE_SIZE_LARGE,
38+
FULLSCREEN_QUERY_PARAM_KEY,
39+
} from '../../../constants/constants';
3740
import { ExportTypes } from '../../../constants/Export.constants';
3841
import { SERVICE_TYPES } from '../../../constants/Services.constant';
3942
import { useLineageProvider } from '../../../context/LineageProvider/LineageProvider';
@@ -328,7 +331,7 @@ const CustomControls: FC<{
328331
type: t('label.asset-or-column'),
329332
})}
330333
searchValue={searchValue}
331-
typingInterval={0}
334+
typingInterval={300}
332335
onSearch={onSearchValueChange}
333336
/>
334337
) : (
@@ -511,6 +514,7 @@ const CustomControls: FC<{
511514
defaultQueryFilter={queryFilter}
512515
fields={selectedQuickFilters}
513516
index={SearchIndex.ALL}
517+
optionPageSize={AGGREGATE_PAGE_SIZE_LARGE}
514518
showDeleted={false}
515519
onFieldValueSelect={handleQuickFiltersValueSelect}
516520
/>

openmetadata-ui/src/main/resources/ui/src/components/Explore/ExploreQuickFilters.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ export interface ExploreQuickFiltersProps {
2828
fieldsWithNullValues?: EntityFields[];
2929
defaultQueryFilter?: Record<string, unknown>;
3030
showSelectedCounts?: boolean; // flag to show counts instead of labels for selected filters
31+
optionPageSize?: number;
3132
}

0 commit comments

Comments
 (0)