Skip to content

feat: add dynamic plugins factory usability enhancements#46

Merged
Zaperex merged 35 commits into
redhat-developer:mainfrom
Zaperex:enhance-usability
Apr 8, 2026
Merged

feat: add dynamic plugins factory usability enhancements#46
Zaperex merged 35 commits into
redhat-developer:mainfrom
Zaperex:enhance-usability

Conversation

@Zaperex

@Zaperex Zaperex commented Mar 11, 2026

Copy link
Copy Markdown
Member

Description

  • Multi-workspace support (Can now export multiple workspaces (from multiple remotes) at the same time)
    • Added a multi-workspace example
  • Added clean functionality to clear content of cloned remote repositories
  • Added plugins-list.yaml auto-generation and plugins-list.yaml build argument auto-generation
  • Added CLI arguments to build single workspace without needing to mount files (specifically for container images)
  • Refactored and split large files

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Tests are updated and passing
  • Documentation is updated

How to test changes / Special notes to the reviewer

Zaperex added 15 commits March 6, 2026 14:54
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor

Signed-off-by: Frank Kong <frkong@redhat.com>
…ability

Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
…hashes

Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-81e0fe3 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-81e0fe3 linux/amd64, linux/arm64

Expires: March 25, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-81e0fe3

Traceability

@gashcrumb gashcrumb self-requested a review March 11, 2026 16:18
Zaperex added 4 commits March 11, 2026 18:22
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
…deps

Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-e77b6e6 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-e77b6e6 linux/amd64, linux/arm64

Expires: March 25, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-e77b6e6

Traceability

…ng native

Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-d1e3ae3 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-d1e3ae3 linux/amd64, linux/arm64

Expires: March 26, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-d1e3ae3

Traceability

Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-30aa937 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-30aa937 linux/amd64, linux/arm64

Expires: March 27, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-30aa937

Traceability

Assisted-By: Cursor
Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-ab84357 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-ab84357 linux/amd64, linux/arm64

Expires: March 27, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-ab84357

Traceability

Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-3625ac9 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-3625ac9 linux/amd64, linux/arm64

Expires: March 27, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-3625ac9

Traceability

@Zaperex

Zaperex commented Mar 17, 2026

Copy link
Copy Markdown
Member Author

One other question though, should the plugin export fail, will the user be able to see the "plugin export" or "plugin package" output? I think hiding all of this output when things work is good, but when they don't work the user will need some information to figure out what happened.

They will only see whatever logs are outputted by the RHDH CLI, so it should capture the plugin export and plugin package outputs. They're always being streamed for easier debugging (and also so they know something is going on) if an issue does occur and also since we won't know if it would fail until it does

@Zaperex

Zaperex commented Mar 17, 2026

Copy link
Copy Markdown
Member Author

probably the latest patch version would be fine, for example then 1.10.1 would get picked up currently. Also if the user can override the selected version via config then there's always that option for folks using this with an older RHDH and CLI. The CLI is currently maintaining release branches for the next release, 1.9 and 1.8.

Ok I guess we can have it use the latest patch by default and they can change it if they want to.

@gashcrumb

Copy link
Copy Markdown
Member

They're always being streamed for easier debugging (and also so they know something is going on) if an issue does occur and also since we won't know if it would fail until it does

Does this require running the tool with debug logging? I only see this output for example:

INFO       > npx --yes @red-hat-developer-hub/cli@1.10.0 plugin export                     

@Zaperex

Zaperex commented Mar 17, 2026

Copy link
Copy Markdown
Member Author

Does this require running the tool with debug logging? I only see this output for example:

INFO       > npx --yes @red-hat-developer-hub/cli@1.10.0 plugin export                     

@gashcrumb
The error logs of the export/package commands are only outputted when the command fails via the export-utils scripts so it should be fine:

if ! "${cli_bin[@]}" ${cli_args_split[@]} >/tmp/export-dynamic-cli.log 2>&1; then
echo "Error running CLI: "
echo "##########################################################"
cat /tmp/export-dynamic-cli.log
echo "##########################################################"
if [[ -f yarn-install.log ]]; then
cat yarn-install.log;
echo "##########################################################"
fi
return 1
fi

Example Error I generated using the aws-ecs example without the package.json patch

INFO       > npx --yes @red-hat-developer-hub/cli@1.10.0 plugin export                                     
INFO     Error running CLI: Building main package                                                          
INFO       executing     yarn build ✖                                                                      
INFO     �[31m�[1mUsage Error�[22m�[39m: The nearest package directory                                         
         (/home/frkong/coding/RHDH/rhdh-dynamic-plugin-factory/source/backstage/packages/backend-dynamic-fe
         ature-service/src/features/__fixtures__/dynamic-plugins-root-for-alpha/test-backend-alpha-dynamic)
          doesn't seem to be part of the project declared in                                               
         /home/frkong/coding/RHDH/rhdh-dynamic-plugin-factory/source/backstage.                            
INFO                                                                                                       
INFO     - If /home/frkong/coding/RHDH/rhdh-dynamic-plugin-factory/source/backstage isn't intended to be a 
         project, remove any yarn.lock and/or package.json file there.                                     
INFO     - If /home/frkong/coding/RHDH/rhdh-dynamic-plugin-factory/source/backstage is intended to be a    
         project, it might be that you forgot to list                                                      
         packages/backend-dynamic-feature-service/src/features/__fixtures__/dynamic-plugins-root-for-alpha/
         test-backend-alpha-dynamic in its workspace configuration.                                        
INFO     - Finally, if /home/frkong/coding/RHDH/rhdh-dynamic-plugin-factory/source/backstage is fine and   
         you intend                                                                                        
         packages/backend-dynamic-feature-service/src/features/__fixtures__/dynamic-plugins-root-for-alpha/
         test-backend-alpha-dynamic to be treated as a completely separate project (not even a workspace), 
         create an empty yarn.lock file in it.                                                             
INFO                                                                                                       
INFO     �[1m$ �[22myarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0]
         <scriptName> ...                                                                                  
INFO                                                                                                       
INFO     Error: Failed to execute command 'yarn build', Error: Command failed: yarn build                  
INFO     ========== Exporting backend plugin                                                               
         packages/backend-dynamic-feature-service/src/features/__fixtures__/dynamic-plugins-root/test-backe
         nd-dynamic ==========             

@gashcrumb

Copy link
Copy Markdown
Member

Nice! You might need to adjust the search a bit, this yarn output file was renamed slightly as of 1.10.1 here last week.

@Zaperex

Zaperex commented Mar 17, 2026

Copy link
Copy Markdown
Member Author

Nice! You might need to adjust the search a bit, this yarn output file was renamed slightly as of 1.10.1 here last week.

@gashcrumb Ah ok, so it's now rhdh-cli.yarn-install.log? I'll update the scripts in export-utils then and make this search for both to keep it backwards compatible.

@Zaperex

Zaperex commented Mar 17, 2026

Copy link
Copy Markdown
Member Author

Hmm it seems using the latest cli (10.0.1) is crashing when doing frontend plugin compilation. I'll hold off on switching to latest until I figure out why this is happening.

INFO     If you wish to change the defaults, add "scalprum" configuration to plugin "package.json" file, or use the  
         '--scalprum-config' option to specify an external config.                                                   
INFO     /home/frkong/.npm/_npx/6f3461dc3b5b6b27/node_modules/@red-hat-developer-hub/cli/dist/lib/bundler/bundlePlugi
         n.cjs.js:74                                                                                                 
INFO                 throw new Error(errors2[0]);                                                                    
INFO                 ^                                                                                               
INFO                                                                                                                 
INFO     Error: The 'compilation' argument must be an instance of Compilation                                        
INFO         at                                                                                                      
         /home/frkong/.npm/_npx/6f3461dc3b5b6b27/node_modules/@red-hat-developer-hub/cli/dist/lib/bundler/bundlePlugi
         n.cjs.js:74:19                                                                                              
INFO         at                                                                                                      
         /home/frkong/.npm/_npx/6f3461dc3b5b6b27/node_modules/@red-hat-developer-hub/cli/node_modules/webpack/lib/web
         pack.js:199:27                                                                                              
INFO         at process.processTicksAndRejections (node:internal/process/task_queues:85:11)                          
INFO                                                                                                                 
INFO     Node.js v22.16.0           

Ok it seems when running with npx, the rhdh-cli seems to have 2 different versions of webpack (5.96.1 from backstage-cli and 5.104.1 from rhdh-cli)

@gashcrumb

Copy link
Copy Markdown
Member

Okay, thanks for the fix for rhdh-cli, I've run the release job for 1.10.2 and it should be available now.

Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-b43c1e5 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-b43c1e5 linux/amd64, linux/arm64

Expires: April 1, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-b43c1e5

Traceability

@gashcrumb

Copy link
Copy Markdown
Member

Anything else we need on this, or do you think it's good to merge?

@Zaperex

Zaperex commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

@gashcrumb I'll probably add more e2e tests/examples in a separate PR. But ideally I would like @davidfestal and @kadel to take a look as well.

@gashcrumb gashcrumb requested review from davidfestal and kadel March 18, 2026 17:57
Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-15cb185 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-15cb185 linux/amd64, linux/arm64

Expires: April 6, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-15cb185

Traceability

Comment thread src/rhdh_dynamic_plugin_factory/source_config.py Outdated
Comment thread examples/example-config-multi-workspace/README.md Outdated
Comment thread examples/example-config-multi-workspace/README.md Outdated

@kadel kadel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code review — found 3 issues to address.

Note: The config.py issue below couldn't be placed inline since the lines are unchanged in this PR.

src/rhdh_dynamic_plugin_factory/config.py lines 560-566

Bug: the second if should be elif. Currently, lines containing "Error" are logged twice (as error and as info), and lines with both "Error" and "npm warn" are never logged as warning.

# Current:
def conditional_stderr_log(line: str) -> None:
    if "Error" in line:
        self.logger.error(line)
    if "npm warn" in line:      # <-- should be elif
        self.logger.warning(line)
    else:
        self.logger.info(line)
# Fix:
def conditional_stderr_log(line: str) -> None:
    if "Error" in line:
        self.logger.error(line)
    elif "npm warn" in line:
        self.logger.warning(line)
    else:
        self.logger.info(line)

Comment thread src/rhdh_dynamic_plugin_factory/cli.py Outdated
Comment thread src/rhdh_dynamic_plugin_factory/source_config.py Outdated
Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-f99fe07 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-f99fe07 linux/amd64, linux/arm64

Expires: April 15, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-f99fe07

Traceability

Signed-off-by: Frank Kong <frkong@redhat.com>
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-bf72433 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-bf72433 linux/amd64, linux/arm64

Expires: April 21, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-bf72433

Traceability

Signed-off-by: Frank Kong <frkong@redhat.com>
@Zaperex Zaperex merged commit c364c46 into redhat-developer:main Apr 8, 2026
5 checks passed
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Container Image Published

Multi-platform container images are now available.

Tag Image Platforms
pr-46 quay.io/rhdh-community/dynamic-plugins-factory:pr-46 linux/amd64, linux/arm64
pr-46-a95c640 quay.io/rhdh-community/dynamic-plugins-factory:pr-46-a95c640 linux/amd64, linux/arm64

Expires: April 22, 2026

Pull Commands

# Multi-platform (auto-selects correct architecture)
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46

# Or with specific commit SHA
podman pull quay.io/rhdh-community/dynamic-plugins-factory:pr-46-a95c640

Traceability

@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

✅ E2E Tests Passed

All end-to-end integration tests passed for the container image.

Image: quay.io/rhdh-community/dynamic-plugins-factory:pr-46

Tests Passed Failed Duration
6 6 0 280.5s

Traceability

@Zaperex Zaperex deleted the enhance-usability branch April 8, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't build multiple workspaces Clean up of workspace folder

3 participants