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
2 changes: 1 addition & 1 deletion .claude/memories/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ brew install gnu-sed
- [Cluster Login Script](.ci/pipelines/ocp-cluster-claim-login.sh)
- [Test Reporting Script](.ci/pipelines/reporting.sh)
- [Environment Variables](.ci/pipelines/env_variables.sh)
- [Dynamic Plugin Installer](scripts/install-dynamic-plugins)
- [Dynamic Plugin Installer](https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/install-dynamic-plugins)

## Test Configuration Files (Config Maps)

Expand Down
2 changes: 1 addition & 1 deletion .claude/rules/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ brew install gnu-sed
- [Cluster Login Script](.ci/pipelines/ocp-cluster-claim-login.sh)
- [Test Reporting Script](.ci/pipelines/reporting.sh)
- [Environment Variables](.ci/pipelines/env_variables.sh)
- [Dynamic Plugin Installer](scripts/install-dynamic-plugins)
- [Dynamic Plugin Installer](https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/install-dynamic-plugins)

## Test Configuration Files (Config Maps)

Expand Down
2 changes: 1 addition & 1 deletion .cursor/rules/ci-e2e-testing.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ brew install gnu-sed
- [Cluster Login Script](.ci/pipelines/ocp-cluster-claim-login.sh)
- [Test Reporting Script](.ci/pipelines/reporting.sh)
- [Environment Variables](.ci/pipelines/env_variables.sh)
- [Dynamic Plugin Installer](scripts/install-dynamic-plugins)
- [Dynamic Plugin Installer](https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/install-dynamic-plugins)

## Test Configuration Files (Config Maps)

Expand Down
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
.yarn/cache
.yarn/install-state.gz
**/dist
# Re-include the bundled install-dynamic-plugins entry point — copied by the
# runtime stage of build/containerfiles/Containerfile.
!scripts/install-dynamic-plugins/dist
!scripts/install-dynamic-plugins/dist/install-dynamic-plugins.cjs
**/node_modules
plugins
!plugins/auth-backend-module-oidc-provider
Expand Down
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ AUTHORS eol=lf
## These files are binary and should be left untouched
#

# Generated bundles — collapsed in GitHub diffs, excluded from language stats
scripts/install-dynamic-plugins/dist/install-dynamic-plugins.cjs linguist-generated=true

# (binary is a macro for -eol=lf -diff)
*.png binary
*.jpg binary
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/coverage-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,3 @@ jobs:
directory: ${{ runner.temp }}/test-results
fail_ci_if_error: false

- name: Install Python dependencies
run: pip install -r python/requirements-dev.txt -r python/requirements.txt

- name: Run Python tests with coverage
run: pytest scripts/install-dynamic-plugins/test_install-dynamic-plugins.py -v --cov=scripts/install-dynamic-plugins --cov-report=lcov:coverage-install-dynamic-plugins.lcov

- name: Upload install-dynamic-plugins coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: coverage-install-dynamic-plugins.lcov
flags: install-dynamic-plugins
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
43 changes: 0 additions & 43 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,6 @@ jobs:
with:
cache-prefix: ${{ runner.os }}-${{ hashFiles('.nvmrc') }}

- name: Install Python dependencies
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: |
pip install -r python/requirements-dev.txt
pip install -r python/requirements-build.txt
pip install -r python/requirements.txt

- name: Run prettier
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: yarn prettier:check --continue --affected
Expand All @@ -145,23 +138,6 @@ jobs:
ln -s ${{ runner.temp }}/jest-junit/node_modules/jest-junit node_modules/jest-junit
mkdir -p ${{ runner.temp }}/test-results

# Runs before the monorepo test step so the JUnit report it writes
# ends up in $RUNNER_TEMP/test-results/ in time for the Codecov
# 'Upload test results' step below to pick it up alongside any
# jest-junit reports produced by 'yarn run test --affected'. When the
# PR only touches non-workspace files, 'yarn ... --affected' emits no
# reports and this one is what the upload finds.
- name: Test install-dynamic-plugins
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
working-directory: scripts/install-dynamic-plugins
run: |
npm ci --no-audit --no-fund
npm run tsc
npx vitest run --coverage \
--reporter=default \
--reporter=junit \
--outputFile.junit="$RUNNER_TEMP/test-results/install-dynamic-plugins.junit.xml"

- name: Run tests
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
id: tests
Expand All @@ -188,25 +164,6 @@ jobs:
directory: ${{ runner.temp }}/test-results
fail_ci_if_error: false

- name: Upload install-dynamic-plugins coverage to Codecov
if: ${{ steps.check-image.outputs.is_skipped != 'true' && !cancelled() }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
directory: scripts/install-dynamic-plugins/coverage
flags: install-dynamic-plugins
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

- name: Verify install-dynamic-plugins bundle is up to date
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
working-directory: scripts/install-dynamic-plugins
run: |
npm run build
if ! git diff --quiet -- dist/install-dynamic-plugins.cjs; then
echo "ERROR: dist/install-dynamic-plugins.cjs is out of date — run 'npm run build' and commit the result." >&2
exit 1
fi

- name: Change directory to dynamic-plugins
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: cd ./dynamic-plugins
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,7 @@ e2e-tests/test-results/

# Hermeto Cache
hermeto-cache/
build/containerfiles/Containerfile.hermeto
build/containerfiles/Containerfile.hermeto

# Claude Code session lock
.claude/scheduled_tasks.lock
2 changes: 1 addition & 1 deletion .opencode/memories/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ brew install gnu-sed
- [Cluster Login Script](.ci/pipelines/ocp-cluster-claim-login.sh)
- [Test Reporting Script](.ci/pipelines/reporting.sh)
- [Environment Variables](.ci/pipelines/env_variables.sh)
- [Dynamic Plugin Installer](scripts/install-dynamic-plugins)
- [Dynamic Plugin Installer](https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/install-dynamic-plugins)

## Test Configuration Files (Config Maps)

Expand Down
2 changes: 1 addition & 1 deletion .rulesync/rules/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ brew install gnu-sed
- [Cluster Login Script](.ci/pipelines/ocp-cluster-claim-login.sh)
- [Test Reporting Script](.ci/pipelines/reporting.sh)
- [Environment Variables](.ci/pipelines/env_variables.sh)
- [Dynamic Plugin Installer](scripts/install-dynamic-plugins)
- [Dynamic Plugin Installer](https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/install-dynamic-plugins)

## Test Configuration Files (Config Maps)

Expand Down
23 changes: 19 additions & 4 deletions build/containerfiles/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,25 @@ ENV PATH="/opt/techdocs-venv/bin:${PATH}"
# RHIDP-4220 - make Konflux preflight and EC checks happy - [check-container] Create a directory named /licenses and include all relevant licensing
COPY $EXTERNAL_SOURCE_NESTED/LICENSE /licenses/

# Copy script to gather dynamic plugins; copy embedded dynamic plugins to root folder; fix permissions
# Bundled TypeScript .cjs (built from scripts/install-dynamic-plugins/src) replaces the previous Python implementation.
COPY $EXTERNAL_SOURCE_NESTED/scripts/install-dynamic-plugins/dist/install-dynamic-plugins.cjs $EXTERNAL_SOURCE_NESTED/scripts/install-dynamic-plugins/install-dynamic-plugins.sh ./
RUN chmod -R a+rx ./install-dynamic-plugins.*
# Install the dynamic-plugins installer through yarn instead of fetching the
# vendored .cjs from this repo. The `@red-hat-developer-hub/cli-module-install-dynamic-plugins`
# dependency is declared in `packages/backend/package.json` so the bin
# survives the `=== YARN WORKSPACES FOCUS ===` production install (the
# earlier `=== DELETE DYNAMIC PLUGINS/* ===` step wipes
# `dynamic-plugins/node_modules/` to keep only `dist/`). Hermeto already
# prefetches yarn deps for the repo root (the `{"type": "yarn", "path": "."}`
# entry in the fetch-deps call in scripts/local-hermeto-build.sh), so this
# works in the hermetic Konflux build with no infra change. The build-time
# `install --help` invocation fails the build if either the bin disappears
# or the `install` subcommand the shim hardcodes is renamed/removed,
# instead of letting that surface as a pod-start failure.
RUN INSTALLER_BIN=/opt/app-root/src/node_modules/.bin/cli-module-install-dynamic-plugins \
&& "$INSTALLER_BIN" install --help >/dev/null \
&& printf '%s\n' \
Comment thread
gustavolira marked this conversation as resolved.
'#!/bin/sh' \
"exec $INSTALLER_BIN install \"\$@\"" \
> /opt/app-root/src/install-dynamic-plugins.sh \
&& chmod a+rx /opt/app-root/src/install-dynamic-plugins.sh

# Fix for https://issues.redhat.com/browse/RHIDP-728
RUN mkdir -p /opt/app-root/src/.npm; chown -R 1001:1001 /opt/app-root/src/.npm
Expand Down
5 changes: 0 additions & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ ignore:

# Flags let us view coverage per area in the Codecov dashboard.
# - rhdh: the main monorepo Jest/Backstage CLI run
# - install-dynamic-plugins: the pytest-based install script coverage
# Additional flags (overlays-e2e-*, community-*) will be introduced by
# the respective Stories under RHIDP-11866 and RHIDP-11865.
flag_management:
Expand All @@ -93,10 +92,6 @@ flag_management:
- packages/plugin-utils/src/**
- dynamic-plugins/_utils/src/**
carryforward: true
- name: install-dynamic-plugins
paths:
- scripts/install-dynamic-plugins/*.py
carryforward: true
# Paths intentionally mirror the rhdh flag — both measure the same source
# from different test types. Isolation relies on --flag at upload time,
# not on paths. If an upload omits --flag, data lands under "default".
Expand Down
1 change: 0 additions & 1 deletion docs/coverage/e2e-rhdh.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ parallel workers and retries never overwrite each other's output.
| Flag | Source | Scope |
|---|---|---|
| `rhdh` | Jest (`packages/*`, `plugins/*`) | Unit / integration |
| `install-dynamic-plugins` | Vitest (`scripts/install-dynamic-plugins`) | Install script unit tests |
| `rhdh-e2e-frontend` (new) | Playwright `page.coverage` | E2E frontend — this doc |
| `rhdh-e2e-full` (future) | Instrumented showcase image variant | E2E frontend, higher fidelity (RHIDP-13244) |
| `overlays-e2e-<plugin>` (future) | CoverPort Tekton | Upstream plugins via OCI (RHIDP-11866) |
Expand Down
2 changes: 1 addition & 1 deletion docs/dynamic-plugins/installing-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ plugins:

### Catalog Entities Extraction

When the `CATALOG_INDEX_IMAGE` is set and the index image contains a `catalog-entities/marketplace` directory, the [`install-dynamic-plugins`](../../scripts/install-dynamic-plugins) installer will automatically extract these catalog entities to a configurable location.
When the `CATALOG_INDEX_IMAGE` is set and the index image contains a `catalog-entities/marketplace` directory, the [`install-dynamic-plugins`](https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/install-dynamic-plugins) installer will automatically extract these catalog entities to a configurable location.

The extraction destination is governed by the `CATALOG_ENTITIES_EXTRACT_DIR` environment variable:

Expand Down
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"@opentelemetry/instrumentation-runtime-node": "0.30.0",
"@opentelemetry/sdk-node": "0.218.0",
"@red-hat-developer-hub/backstage-plugin-translations-backend": "0.3.1",
"@red-hat-developer-hub/cli-module-install-dynamic-plugins": "0.2.0",
Comment thread
gustavolira marked this conversation as resolved.
"app": "workspace:*",
"app-next": "workspace:*",
"better-sqlite3": "12.6.2",
Expand Down
11 changes: 0 additions & 11 deletions python/requirements-dev.in

This file was deleted.

27 changes: 0 additions & 27 deletions python/requirements-dev.txt

This file was deleted.

11 changes: 0 additions & 11 deletions scripts/install-dynamic-plugins/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/install-dynamic-plugins/.prettierignore

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/install-dynamic-plugins/.prettierrc.js

This file was deleted.

Loading
Loading