Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/ci-pre-mergequeue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ jobs:
pre-commit run --show-diff-on-failure --color=always --all-files
shell: bash
if: ${{ vars.CI_DRY_RUN != 'true' }}

- name: Validate OpenAPI codegen
if: ${{ vars.CI_DRY_RUN != 'true' }}
working-directory: js-packages/web-console
run: |
bun install --frozen-lockfile
bunx openapi-ts --output /tmp/openapi-ts-check

- name: Print sccache stats
run: sccache --show-stats
- uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ jobs:
uses: ./.github/workflows/build-docs.yml
secrets: inherit

invoke-tests-web-console-unit:
name: Web Console Unit Tests
uses: ./.github/workflows/test-web-console-unit.yml
secrets: inherit

invoke-tests-unit:
name: Unit Tests
needs: [check-prior-build, invoke-build-rust, invoke-build-java]
Expand Down Expand Up @@ -177,6 +182,21 @@ jobs:
# The jobs below work around this: each one watches a single upstream job and, if that
# job fails, immediately cancels the entire workflow run so everything else stops too.

cancel-if-tests-web-console-unit-failed:
name: Cancel if Web Console Unit Tests Failed
needs: [invoke-tests-web-console-unit]
if: failure()
runs-on: ubuntu-latest-amd64
permissions:
actions: write
steps:
- name: Cancel workflow
run: |
curl -fsSL -X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel"

cancel-if-build-rust-failed:
name: Cancel if Rust Build Failed
needs: [invoke-build-rust]
Expand Down Expand Up @@ -338,6 +358,7 @@ jobs:
- invoke-build-rust
- invoke-build-java
- invoke-build-docs
- invoke-tests-web-console-unit
- invoke-tests-unit
- invoke-tests-adapter
- invoke-build-docker
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/test-web-console-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Web Console Unit Tests

on:
workflow_call:
workflow_dispatch:

jobs:
web-console-unit-tests:
name: Web Console Unit Tests
runs-on: [k8s-runners-amd64]

container:
image: mcr.microsoft.com/playwright:v1.58.2-noble

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Bun
run: |
npm install -g --prefix /tmp/bun bun@1.3.10
echo "/tmp/bun/bin" >> $GITHUB_PATH

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run vitest unit & component tests
if: ${{ vars.CI_DRY_RUN != 'true' }}
run: bun run test
working-directory: js-packages/web-console

- name: Show Kubernetes node
if: always()
run: |
echo "K8S node: ${K8S_NODE_NAME}"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ gh-pages
# JavaScript
node_modules/

# Vitest
.vitest-attachments/

# Playwright
playwright-artifacts/
playwright-snapshots/
Expand Down
37 changes: 0 additions & 37 deletions .vscode/settings.json

This file was deleted.

115 changes: 99 additions & 16 deletions bun.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion crates/feldera-types/src/preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

use serde::{Deserialize, Serialize};
use serde_json::Value;
use utoipa::ToSchema;

/// Configuration for describing a preprocessor
#[derive(Debug, Deserialize, Clone, Eq, PartialEq, Serialize)]
#[derive(Debug, Deserialize, Clone, Eq, PartialEq, Serialize, ToSchema)]
pub struct PreprocessorConfig {
/// Name of the preprocessor.
/// All preprocessors with the same name will perform the same task.
Expand Down
1 change: 1 addition & 0 deletions crates/pipeline-manager/src/api/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ It contains the following fields:
feldera_types::query::AdHocResultFormat,
feldera_types::format::json::JsonUpdateFormat,
feldera_types::format::json::JsonLines,
feldera_types::preprocess::PreprocessorConfig,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unrelated to this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is required for a successful generation of OpenAPI bindings - the OpenAPI spec was referencing this new struct, but the struct itself was missing.

feldera_types::program_schema::ProgramSchema,
feldera_types::program_schema::Relation,
feldera_types::program_schema::SqlType,
Expand Down
14 changes: 10 additions & 4 deletions js-packages/web-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@hey-api/client-fetch": "0.13.1",
"@hey-api/openapi-ts": "0.92.4",
"@monaco-editor/loader": "1.7.0",
"@playwright/experimental-ct-svelte": "1.58.2",
"@playwright/test": "1.58.2",
"@poppanator/sveltekit-svg": "6.0.1",
"@revolist/svelte-datagrid": "4.20.2",
Expand All @@ -36,6 +35,7 @@
"@types/nprogress": "0.2.3",
"@types/vusion__webfonts-generator": "0.8.6",
"@vincjo/datatables": "2.8.0",
"@vitest/browser-playwright": "^4.0.18",
"@vusion/webfonts-generator": "0.8.0",
"add": "2.0.6",
"args": "5.0.3",
Expand Down Expand Up @@ -65,13 +65,13 @@
"oidc-client-ts-lumeris": "1.0.0",
"oslllo-svg-fixer": "6.0.1",
"paneforge": "1.0.2",
"playwright": "^1.58.2",
"posthog-js": "1.352.0",
"prettier": "3.8.1",
"prettier-plugin-svelte": "3.5.0",
"prettier-plugin-tailwindcss": "0.7.2",
"profiler-layout": "workspace:*",
"profiler-lib": "workspace:*",
"triage-types": "workspace:*",
"runed": "0.37.1",
"sass-embedded": "1.97.3",
"semver": "7.7.4",
Expand All @@ -89,6 +89,7 @@
"tailwind-scrollbar": "4.0.2",
"tailwindcss": "4.2.0",
"tiny-invariant": "1.3.3",
"triage-types": "workspace:*",
"true-json-bigint": "1.0.1",
"ts-pattern": "5.9.0",
"tslib": "2.8.1",
Expand All @@ -99,6 +100,8 @@
"vite": "npm:rolldown-vite@7.3.1",
"vite-plugin-devtools-json": "1.0.0",
"vite-plugin-virtual": "0.5.0",
"vitest": "^4.0.18",
"vitest-browser-svelte": "^2.0.2",
"worker-timers": "8.0.30"
},
"overrides": {
Expand All @@ -120,13 +123,16 @@
"openapi": "openapi-ts -i path/to/openapi.json -o src/client",
"generate-openapi": "openapi-ts && bun run format",
"build-openapi": "cd ../.. && cargo run -p pipeline-manager -- --dump-openapi",
"build-icons": "bun run scripts/build-webfont.ts -- -s src/assets/icons/feldera-material-icons -d src/assets/fonts/ -n feldera-material-icons -p fd --fix && bun run scripts/build-webfont.ts -- -s src/assets/icons/generic -d src/assets/fonts/ -n generic-icons -p gc && bun run format",
"test-e2e": "PLAYWRIGHT_API_ORIGIN=http://localhost:8080/ PLAYWRIGHT_APP_ORIGIN=http://localhost:8080/ DISPLAY= bun playwright test",
"test-e2e-ui": "PLAYWRIGHT_API_ORIGIN=http://localhost:8080/ PLAYWRIGHT_APP_ORIGIN=http://localhost:8080/ DISPLAY= bun playwright test --ui-host=0.0.0.0",
"test-ct": "DISPLAY= bun playwright test -c playwright-ct.config.ts",
"test-ct-ui": "DISPLAY= bun playwright test -c playwright-ct.config.ts --ui-host=0.0.0.0",
"test-report": "bun playwright show-report",
"test-prepare": "git clone --depth 1 https://github.com/feldera/playwright-snapshots.git",
"build-icons": "bun run scripts/build-webfont.ts -- -s src/assets/icons/feldera-material-icons -d src/assets/fonts/ -n feldera-material-icons -p fd --fix && bun run scripts/build-webfont.ts -- -s src/assets/icons/generic -d src/assets/fonts/ -n generic-icons -p gc && bun run format"
"test-prepare": "git clone --depth 1 https://github.com/feldera/playwright-snapshots.git || true && mkdir -p playwright-snapshots/e2e playwright-snapshots/component",
"test-update-snapshots": "bun run test -- --update && bun playwright test --update-snapshots",
"test-unit": "vitest",
"test": "bun run test-unit -- --run"
},
"trustedDependencies": ["@axa-fr/oidc-client", "sk-oidc-oauth", "svelte-preprocess"],
"type": "module"
Expand Down
9 changes: 8 additions & 1 deletion js-packages/web-console/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ const config: PlaywrightTestConfig = {
port: 4173
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
snapshotDir: 'playwright-snapshots/e2e',
expect: {
toHaveScreenshot: {
// Threshold for pixel-level comparison (0 = exact, 1 = any)
maxDiffPixelRatio: 0.01
}
}
}

export default config
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import DownloadSupportBundle from '$lib/components/pipelines/editor/DownloadSupportBundle.svelte'
import {
extractProgramErrors,
numConnectorsWithErrors
numConnectorsWithProblems
} from '$lib/compositions/health/systemErrors'
import TabsPanel from './TabsPanel.svelte'

Expand Down Expand Up @@ -96,7 +96,7 @@
)
)

const connectorsWithErrorsCount = $derived(numConnectorsWithErrors(metrics.current))
const connectorsWithErrorsCount = $derived(numConnectorsWithProblems(metrics.current))
</script>

{#snippet TabControlPerformance()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
<SegmentedControl.Control class="w-fit flex-none rounded preset-filled-surface-50-950 p-1">
<SegmentedControl.Indicator class="bg-white-dark shadow" />
{#each mobileDisplayModes as mode}
<SegmentedControl.Item value={mode} class="z-1 btn h-6 cursor-pointer px-5 text-sm">
<SegmentedControl.Item value={mode} class="z-1 btn h-6 cursor-pointer px-5">
<SegmentedControl.ItemText class="text-surface-950-50">
{mode}
</SegmentedControl.ItemText>
Expand Down
Loading
Loading