Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: import scaffolder layouts as dynamic frontend plugin (RHDH 1.3) #1829

Open
wants to merge 74 commits into
base: main
Choose a base branch
from

Conversation

sbem44
Copy link

@sbem44 sbem44 commented Oct 28, 2024

Description

This change enable to load ScaffolderLayouts as a frontend dynamic plugin.
To maintain consistency with ScaffolderFieldExtensions, the configuration is the following:

dynamicPlugins:
  frontend:
    backstage-plugin-simple-test-components:
      scaffolderLayouts:
        - importName: TwoColumnLayout

Which issue(s) does this PR fix

How to test changes

Import plugin

Import and enable the attached plugin backstage-plugin-simple-layout-plugin-dynamic-0.1.0.tgz:

  1. Untar the plugin;
  2. copy the untar folder intodynamic-plugins;
  3. copy the untar folder intodynamic-plugins-root;

Test

  • open "Administration" => "Plugins" and check that the plugin is listed here;
image
  • open "Create" => "Template editor" => "Edit template form" , past this template and check if the preview is a 2 column layout
parameters:
  - title: Component Information
    ui:ObjectFieldTemplate: TwoColumn
    properties:
      componentName:
        title: Component Name
        type: string
        description: component name
        ui:field: EntityPicker
        ui:options:
          catalogFilter:
            - kind: Component
      branchName:
        title: Branch Name
        type: string
        description: branch where to apply the change
      deployingPlatform:
        title: Deploying Platform
        type: string
        description: Platform to deploy to (Tanzu or Openshift)
        enum:
          - Openshift
          - Tanzu
        uniqueItems: true
image

rhdh-bot and others added 30 commits August 28, 2024 20:20
Signed-off-by: RHDH Build (rhdh-bot) <[email protected]>
…anus-idp#1549)

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

* save all pod logs

---------

Co-authored-by: Subhash Khileri <[email protected]>
* feat: Add plugin hash to detect configuration changes

* fix: create a dict of installed plugins in dynamicPluginsRoot

* handle removal of previously installed dynamic plugins

* feat: Add option to force download of already installed dynamic plugins

* re-add gitkeep

---------

Co-authored-by: Marcel Hild <[email protected]>
…n on main into 1.3.x (janus-idp#1556)

* removing irrelevant commits

* bugfix! (janus-idp#1546)

* chore(deps): update argocd plugin version (janus-idp#1559)

---------

Co-authored-by: Karthik Jeeyar <[email protected]>
…-dynamic -- -- --clean' (RHIDP-3886) (janus-idp#1568)

Signed-off-by: Nick Boldt <[email protected]>
…e-ldap-dynamic/yarn.lock (inconsistent with other wrappers); (janus-idp#1573)

'backstage-cli repo fix --publish' to fix up missing/incorrect metadata; manually apply changes based on diff between backstage-plugin-catalog-backend-module-github-dynamic and backstage-plugin-catalog-backend-module-ldap-dynamic

Signed-off-by: Nick Boldt <[email protected]>
* feat(nav): add support for nested nav

Signed-off-by: Yi Cai <[email protected]>

* feat(nav): add support for nested nav

Signed-off-by: Yi Cai <[email protected]>

* Updated 3 level menu item font size

Signed-off-by: Yi Cai <[email protected]>

* Addressed review comments

Signed-off-by: Yi Cai <[email protected]>

* Update RBAC plugin version

Signed-off-by: Yi Cai <[email protected]>

* Fix fialed e2e test

Signed-off-by: Yi Cai <[email protected]>

* Fix e2e tests

Signed-off-by: Yi Cai <[email protected]>

* Updated openSidebar locator

Signed-off-by: Yi Cai <[email protected]>

* Fix failed e2e tests

Signed-off-by: Yi Cai <[email protected]>

---------

Signed-off-by: Yi Cai <[email protected]>
Co-authored-by: Yi Cai <[email protected]>
Co-authored-by: Joseph Kim <[email protected]>
/cherry-pick 1.3.x

Signed-off-by: Nick Boldt <[email protected]>
Co-authored-by: Nick Boldt <[email protected]>
…ejs-20-minimal:1-63.1725851021

Signed-off-by: Nick Boldt <[email protected]>
* Fix: e2e ci failure

* Fix: e2e ci failure
janus-idp#1597)

* feat(ui): enable customization of static items in sidebar menu

Signed-off-by: Yi Cai <[email protected]>

* Updated rm

Signed-off-by: Yi Cai <[email protected]>

* Minor typo fix

Signed-off-by: Yi Cai <[email protected]>

* Remove unnecessary file

Signed-off-by: Yi Cai <[email protected]>

---------

Signed-off-by: Yi Cai <[email protected]>
Co-authored-by: Yi Cai <[email protected]>
Signed-off-by: Christoph Jerolimov <[email protected]>
Co-authored-by: Christoph Jerolimov <[email protected]>
This change adds support to the frontend to load a Backstage theme
provider from a dynamic plugin.  The dynamic frontend configuration
mechanism is used to connect an exported theme provider function to an
AppTheme list which is then available when Backstage is initialized.
Dynamic plugin provided themes can either add to or replace the provided
default themes.  This change also ensures that dynamic plugins can
override the statically defined API service factories in the app as
needed.

Signed-off-by: Stan Lewis <[email protected]>
Co-authored-by: Stan Lewis <[email protected]>
Signed-off-by: Dominika Zemanovicova <[email protected]>
Co-authored-by: Dominika Zemanovicova <[email protected]>
gustavolira and others added 18 commits September 21, 2024 23:13
Signed-off-by: Gustavo Lira <[email protected]>
Co-authored-by: Joseph Kim <[email protected]>
* cherrypick 1565

* cherrypick 1565 and 1596

* increase timeout in e2e test

* increase timeout in e2e test

* restore timeout change

* chore(e2e): Automate Bulk import from Git

* chore(e2e): Automate Bulk import from Git

* chore(e2e): Automate Bulk import from Git

---------

Co-authored-by: Joseph Kim <[email protected]>
Co-authored-by: Nick Boldt <[email protected]>
)

* fix(argocd): remove dist-dynamic folder

* add argocd to the internalPluginsMap

* add correct scalprum name

(cherry picked from commit 47f3fa1)
* Fix `droute` limiting attachment size (janus-idp#1741)

* Update KEYCLOAK_BASE_URL secret handling (janus-idp#1731)

The KEYCLOAK_BASE_URL is now fetched from a file instead of being hard-coded. This change enhances security by avoiding the storage of sensitive URLs directly in the configuration files. Additionally, the corresponding base64 value in the secrets YAML has been updated to a placeholder.

Signed-off-by: Gustavo Lira <[email protected]>

---------

Signed-off-by: Gustavo Lira <[email protected]>
Co-authored-by: Gustavo Lira e Silva <[email protected]>
…s-idp#1762)

* chore(deps): CVE-2024-37890 force ws resolution to 8.17.1 [1.3]

* remove body-parser from resolutions

* bump ws to 8.18.0

* Remove @types/react from resolutions and update the version in devDependencies

* revert as its needed for type checking additional react components and if not there CI fails
…https://registry.npmjs.org/ instead of cachito; also set path to cafile (RHIDP-4410) (janus-idp#1780)

* chore(npm registry default): set default npm registry to https://registry.npmjs.org/ instead of cachito; also set path to cafile (RHIDP-4410)

Signed-off-by: Nick Boldt <[email protected]>

* split lines for readibility and move into builder stage

Signed-off-by: Nick Boldt <[email protected]>

* delete 75 .npmrc files; set default registry and cafile path

Signed-off-by: Nick Boldt <[email protected]>

* typo / tweak comments

Signed-off-by: Nick Boldt <[email protected]>

* ugh sonarcloud

Signed-off-by: Nick Boldt <[email protected]>

---------

Signed-off-by: Nick Boldt <[email protected]>
Co-authored-by: Nick Boldt <[email protected]>
…s-idp#1788)

* chore(deps): release-1.3, dedupe body-parser in gitlab yarn.lock

* chore(deps): update mysql2 and braces
support import of scaffolderLayouts from dynamic frontend plugins.
@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

openshift-ci bot commented Oct 28, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign subhashkhileri for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

openshift-ci bot commented Oct 28, 2024

Hi @sbem44. Thanks for your PR.

I'm waiting for a janus-idp member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

sonarcloud bot commented Oct 28, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
6.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@sbem44 sbem44 changed the title Import scaffolder layouts as dynamic frontend plugin feat: Import scaffolder layouts as dynamic frontend plugin Oct 28, 2024
@sbem44 sbem44 changed the title feat: Import scaffolder layouts as dynamic frontend plugin feat: import scaffolder layouts as dynamic frontend plugin Oct 28, 2024
@sbem44 sbem44 changed the title feat: import scaffolder layouts as dynamic frontend plugin feat: import scaffolder layouts as dynamic frontend plugin (RHDH 1.3) Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.