janus-idp / backstage-showcase

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

feat: test patching additional scaffolder permissions #1265

Closed Zaperex closed 1 month ago

Zaperex commented 2 months ago

Description

This Pull Requests tests applying the additional scaffolder permissions package changes as a patch using yarn patch-package to test RHIDP-2324

Testing Instructions

The new permissions add the following new behaviours:

openshift-ci[bot] commented 2 months ago

[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 ask for approval from zaperex. 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: - **[OWNERS](https://github.com/janus-idp/backstage-showcase/blob/main/OWNERS)** 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-1265!

Zaperex commented 2 months ago

seems the patches are failing to be applied when doing yarn install locally

Zaperex commented 2 months ago

Tested with https://quay.io/janus-idp/backstage-showcase:pr-1265-efc72e5 and the permissions patches were not applied in the image. (Permissions don't appear in the /api/scaffolder/.well-known/backstage/permissions/metadata endpoint.)

Zaperex commented 2 months ago

So it seems the patches partially work? As in the backend routes seem to be protected now, however, the frontend changes that disable certain buttons depending on permissions does not seem to be working. I tested in the upstream backstage instance, and it works as expected.

Zaperex commented 2 months ago

Patches seem to break as soon as I update the branch

github-actions[bot] commented 2 months ago

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

Zaperex commented 2 months ago

When testing locally (after manually adding the content into the node_modules and then running yarn patch-package <package>), I was able to get it to work as expected (previous UI issue might have been due to patching with an outdated package).

However, the scaffolder-backend, scaffolder-react, scaffolder, and catalog package patches fail to apply in a clean environment (after I do a rm -rf node_modules).

github-actions[bot] commented 2 months ago

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

sonarcloud[bot] commented 1 month 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

Zaperex commented 1 month ago

Close in favor of https://github.com/janus-idp/backstage-showcase/pull/1282

github-actions[bot] commented 1 month ago

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