janus-idp / backstage-showcase

Enterprise-ready Backstage distribution
https://showcase.janus-idp.io
Apache License 2.0
105 stars 140 forks source link

feat(app) RHIDP-1803 enable field extensions #1253

Closed gashcrumb closed 2 months ago

gashcrumb commented 2 months ago

Description

This commit enables support for Scaffolder field extensions. A plugin can export a field extension as documented and then configure it to be included in the list of enabled scaffolder field extensions using the following configuration:

dynamicPlugins:
  frontend:
    my-plugin:
      scaffolderFieldExtensions:
        - importName: SomeExportedFieldExtension

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

How to test changes / Special notes to the reviewer

There's a really simple extension in this package that can be used for a quick test. You can import this template and then use this configuration:

dynamicPlugins:
  frontend:
    backstage-plugin-simple-test-components:
      scaffolderFieldExtensions:
        - importName: SimpleTestFieldExtension
openshift-ci[bot] commented 2 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

github-actions[bot] commented 2 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1253!

davidfestal commented 2 months ago

/approve

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

davidfestal commented 2 months ago

/lgtm

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidfestal

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/janus-idp/backstage-showcase/blob/main/OWNERS)~~ [davidfestal] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
github-actions[bot] commented 2 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1253!

cmoulliard commented 2 months ago

We cannot retest the image published as we got such issues using guest auth provider. See screenshots hereafter

Screenshot 2024-05-16 at 12 17 41 Screenshot 2024-05-16 at 12 17 48 Screenshot 2024-05-16 at 12 17 57

cmoulliard commented 2 months ago

I was able to launch janus-idp locally using as auth provider .... github

auth:
  environment: development
  providers:
    #  guest: {}
    github:
      development:
        clientId: fde4...080e
        clientSecret: 8ba...0f20

The fieldExtensions are working if we add as config

dynamicPlugins:
  rootDirectory: dynamic-plugins-root
  frontend:
    qshift.plugin-quarkus:
      scaffolderFieldExtensions:
      - importName: QuarkusExtensionListField
      - importName: QuarkusVersionListField
      - importName: QuarkusQuickstartPickerField

Screenshot 2024-05-16 at 12 49 55

gashcrumb commented 2 months ago

That's great news @cmoulliard! This will need plenty of testing as I've only tried the most minimal use case, so raise issues if you run into anything. Thanks!