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(app) RHIDP-1803 enable field extensions #1253

Merged
merged 1 commit into from
May 13, 2024

Conversation

gashcrumb
Copy link
Member

@gashcrumb gashcrumb commented May 13, 2024

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:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

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

Copy link

openshift-ci bot commented May 13, 2024

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

@gashcrumb gashcrumb force-pushed the RHIDP-1803 branch 2 times, most recently from b58abf8 to 0623d74 Compare May 13, 2024 14:43
@gashcrumb gashcrumb marked this pull request as ready for review May 13, 2024 14:44
@gashcrumb gashcrumb requested a review from a team as a code owner May 13, 2024 14:44
@gashcrumb gashcrumb marked this pull request as draft May 13, 2024 14:49
@gashcrumb gashcrumb marked this pull request as ready for review May 13, 2024 15:02
Copy link
Contributor

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

@davidfestal
Copy link
Member

/approve

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:

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

Signed-off-by: Stan Lewis <gashcrumb@gmail.com>
Copy link

sonarcloud bot commented May 13, 2024

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
Copy link
Member

/lgtm

Copy link

openshift-ci bot commented May 13, 2024

[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:

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

Copy link
Contributor

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

@openshift-merge-bot openshift-merge-bot bot merged commit f0e975d into janus-idp:main May 13, 2024
8 checks passed
@cmoulliard
Copy link

cmoulliard commented May 16, 2024

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
Copy link

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
Copy link
Member Author

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!

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.

Support to register scaffolderPlugin.provide(createScaffolderFieldExtension( for dynamic plugin
4 participants