Skip to content

Commit a4d9a24

Browse files
authored
RHDH 1.9 aligment and bitbucket revert (#2816)
* Revert "fix(x2a): bitbucket RepoUrlPicker wrapper (#2768)" This reverts commit d8c241a. * feat: align dependencies with RHDH 1.9 From the RHDH 1.9 container: ``` sh-5.1$ grep -B1 -A3 "\"@backstage/plugin-permission-backend@" /opt/app-root/src/yarn.lock "@backstage/plugin-permission-backend@npm:0.7.3": version: 0.7.3 resolution: "@backstage/plugin-permission-backend@npm:0.7.3" dependencies: "@backstage/backend-plugin-api": ^1.4.2 "@backstage/config": ^1.3.3 sh-5.1$ grep -B1 -A3 "\"@backstage/plugin-scaffolder@" /opt/app-root/src/yarn.lock "@backstage/plugin-scaffolder@npm:1.34.3": version: 1.34.3 resolution: "@backstage/plugin-scaffolder@npm:1.34.3" dependencies: "@backstage/catalog-client": ^1.12.1 "@backstage/catalog-model": ^1.7.6 sh-5.1$ grep -B1 -A3 "\"@backstage/plugin-scaffolder-react@" /opt/app-root/src/yarn.lock "@backstage/plugin-scaffolder-react@npm:1.19.3, @backstage/plugin-scaffolder-react@npm:^1.19.3": version: 1.19.3 resolution: "@backstage/plugin-scaffolder-react@npm:1.19.3" dependencies: "@backstage/catalog-client": ^1.12.1 "@backstage/catalog-model": ^1.7.6 sh-5.1$ grep -B1 -A3 "\"@backstage/integration-react@" /opt/app-root/src/yarn.lock "@backstage/integration-react@npm:1.2.12, @backstage/integration-react@npm:^1.2.12": version: 1.2.12 resolution: "@backstage/integration-react@npm:1.2.12" dependencies: "@backstage/config": ^1.3.6 "@backstage/core-plugin-api": ^1.12.0 sh-5.1$ grep -B1 -A3 "\"@backstage/core-plugin-api@" /opt/app-root/src/yarn.lock "@backstage/core-plugin-api@npm:1.12.0": version: 1.12.0 resolution: "@backstage/core-plugin-api@npm:1.12.0" dependencies: "@backstage/config": ^1.3.6 "@backstage/errors": ^1.2.7 -- "@backstage/core-plugin-api@npm:^1.12.0, @backstage/core-plugin-api@npm:^1.12.1": version: 1.12.1 resolution: "@backstage/core-plugin-api@npm:1.12.1" dependencies: "@backstage/config": ^1.3.6 "@backstage/errors": ^1.2.7 ``` Now versions are aligned correctly. Signed-off-by: Eloy Coto <eloy.coto@acalustra.com> --------- Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
1 parent d85bf56 commit a4d9a24

13 files changed

Lines changed: 1081 additions & 1912 deletions

File tree

workspaces/x2a/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
"@backstage/backend-plugin-api": "1.5.0",
6161
"@backstage/backend-defaults": "0.13.2",
6262
"@backstage/plugin-auth-node": "0.6.10",
63-
"@backstage/plugin-permission-backend": "0.7.3"
63+
"@backstage/plugin-permission-backend": "0.7.3",
64+
"@backstage/core-app-api": "1.19.2"
6465
},
6566
"prettier": "@backstage/cli/config/prettier",
6667
"lint-staged": {

workspaces/x2a/packages/app/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"@backstage/cli": "^0.34.5",
2626
"@backstage/core-app-api": "^1.19.2",
2727
"@backstage/core-components": "^0.18.3",
28-
"@backstage/core-plugin-api": "^1.12.0",
29-
"@backstage/integration-react": "^1.2.12",
28+
"@backstage/core-plugin-api": "1.12.0",
29+
"@backstage/integration-react": "1.2.12",
3030
"@backstage/plugin-api-docs": "^0.13.1",
3131
"@backstage/plugin-catalog": "^1.32.0",
3232
"@backstage/plugin-catalog-common": "^1.1.7",
@@ -37,8 +37,8 @@
3737
"@backstage/plugin-notifications": "^0.5.8",
3838
"@backstage/plugin-org": "^0.6.46",
3939
"@backstage/plugin-permission-react": "^0.4.38",
40-
"@backstage/plugin-scaffolder": "^1.34.3",
41-
"@backstage/plugin-scaffolder-react": "^1.19.3",
40+
"@backstage/plugin-scaffolder": "1.34.3",
41+
"@backstage/plugin-scaffolder-react": "1.19.3",
4242
"@backstage/plugin-search": "^1.5.0",
4343
"@backstage/plugin-search-react": "^1.10.0",
4444
"@backstage/plugin-signals": "^0.0.22",

workspaces/x2a/packages/app/src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ import {
5757
X2APage,
5858
x2aPluginTranslations,
5959
RepoAuthenticationExtension,
60-
X2ARepoUrlPickerExtension,
6160
} from '@red-hat-developer-hub/backstage-plugin-x2a';
6261
import { DcrConsentPage } from '@red-hat-developer-hub/backstage-plugin-x2a-dcr';
6362
import {
@@ -163,7 +162,6 @@ const routes = (
163162
<Route path="/create" element={<ScaffolderPage />}>
164163
<ScaffolderFieldExtensions>
165164
<RepoAuthenticationExtension />
166-
<X2ARepoUrlPickerExtension />
167165
</ScaffolderFieldExtensions>
168166
</Route>
169167
</FlatRoutes>

workspaces/x2a/plugins/scaffolder-backend-module-x2a/templates/conversion-project-template.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,7 @@ spec:
123123
description: |
124124
The Owner should be your SCM (Source Code Management) username. The repository name should be a name that already exists in your SCM account and contains a Chef cookbook or directory to convert.
125125
type: string
126-
# HACK: X2ARepoUrlPicker wraps the default RepoUrlPicker to
127-
# fix a Bitbucket Cloud/Server type mismatch in Backstage
128-
# scaffolder. Replace with RepoUrlPicker once upstream is fixed.
129-
# See https://redhat.atlassian.net/browse/FLPATH-4033
130-
ui:field: X2ARepoUrlPicker
126+
ui:field: RepoUrlPicker
131127
ui:options:
132128
requestUserCredentials:
133129
secretsKey: SRC_USER_OAUTH_TOKEN
@@ -181,11 +177,7 @@ spec:
181177
description: |
182178
The Owner should be your SCM (Source Code Management) username. The repository name should be a name that already exists in your SCM account. It will be populated by converted Ansible sources and intermediary artifacts.
183179
type: string
184-
# HACK: X2ARepoUrlPicker wraps the default RepoUrlPicker to
185-
# fix a Bitbucket Cloud/Server type mismatch in Backstage
186-
# scaffolder. Replace with RepoUrlPicker once upstream is fixed.
187-
# See https://redhat.atlassian.net/browse/FLPATH-4033
188-
ui:field: X2ARepoUrlPicker
180+
ui:field: RepoUrlPicker
189181
ui:options:
190182
requestUserCredentials:
191183
secretsKey: TGT_USER_OAUTH_TOKEN

workspaces/x2a/plugins/x2a/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
},
3838
"dependencies": {
3939
"@backstage/catalog-model": "^1.7.6",
40-
"@backstage/core-app-api": "^1.19.2",
4140
"@backstage/core-components": "^0.18.3",
42-
"@backstage/core-plugin-api": "^1.12.0",
43-
"@backstage/integration-react": "^1.2.12",
41+
"@backstage/core-plugin-api": "1.12.0",
42+
"@backstage/integration-react": "1.2.12",
4443
"@backstage/plugin-catalog": "^1.32.0",
44+
"@backstage/plugin-permission-backend": "0.7.3",
4545
"@backstage/plugin-permission-react": "^0.4.38",
46-
"@backstage/plugin-scaffolder": "^1.34.3",
47-
"@backstage/plugin-scaffolder-react": "^1.19.3",
46+
"@backstage/plugin-scaffolder": "1.34.3",
47+
"@backstage/plugin-scaffolder-react": "1.19.3",
4848
"@backstage/theme": "^0.7.0",
4949
"@backstage/ui": "^0.9.1",
5050
"@material-ui/core": "^4.12.2",
@@ -64,6 +64,7 @@
6464
"devDependencies": {
6565
"@backstage/cli": "^0.34.5",
6666
"@backstage/config": "^1.3.6",
67+
"@backstage/core-app-api": "^1.19.2",
6768
"@backstage/dev-utils": "^1.1.17",
6869
"@backstage/frontend-plugin-api": "^0.14.1",
6970
"@backstage/test-utils": "^1.7.13",

workspaces/x2a/plugins/x2a/report.api.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ readonly empty: string;
227227
// @public
228228
export const x2aPluginTranslations: TranslationResource<"plugin.x2a">;
229229

230-
// @public
231-
export const X2ARepoUrlPickerExtension: FieldExtensionComponent<string, {}>;
232-
233230
// (No @packageDocumentation comment for this package)
234231

235232
```

workspaces/x2a/plugins/x2a/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
export {
17-
x2APlugin,
18-
X2APage,
19-
RepoAuthenticationExtension,
20-
X2ARepoUrlPickerExtension,
21-
} from './plugin';
16+
export { x2APlugin, X2APage, RepoAuthenticationExtension } from './plugin';
2217
export { x2aPluginTranslations, x2aPluginTranslationRef } from './translations';
2318
export {
2419
useTranslation as useX2ATranslation,

workspaces/x2a/plugins/x2a/src/plugin.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ import {
2020
import { createScaffolderFieldExtension } from '@backstage/plugin-scaffolder-react';
2121

2222
import { rootRouteRef } from './routes';
23-
import {
24-
RepoAuthentication,
25-
repoAuthenticationValidation,
26-
RepoUrlPickerWithBitbucketFix,
27-
} from './scaffolder';
28-
import { repoPickerValidation } from '@backstage/plugin-scaffolder';
23+
import { RepoAuthentication, repoAuthenticationValidation } from './scaffolder';
2924

3025
/** @public */
3126
export const x2APlugin = createPlugin({
@@ -52,18 +47,3 @@ export const RepoAuthenticationExtension = x2APlugin.provide(
5247
validation: repoAuthenticationValidation,
5348
}),
5449
);
55-
56-
/**
57-
* Scaffolder field extension that wraps the built-in RepoUrlPicker with a fix
58-
* for Bitbucket Cloud/Server type resolution. Use `ui:field: X2ARepoUrlPicker`
59-
* in templates instead of `RepoUrlPicker` when bitbucket.org is an allowed host.
60-
*
61-
* @public
62-
*/
63-
export const X2ARepoUrlPickerExtension = x2APlugin.provide(
64-
createScaffolderFieldExtension({
65-
component: RepoUrlPickerWithBitbucketFix,
66-
name: 'X2ARepoUrlPicker',
67-
validation: repoPickerValidation,
68-
}),
69-
);

workspaces/x2a/plugins/x2a/src/scaffolder/RepoAuthentication.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const mockSetSecrets = jest.fn();
1818
const mockAuthenticate = jest.fn();
1919

2020
jest.mock('@backstage/plugin-scaffolder-react', () => ({
21-
...jest.requireActual('@backstage/plugin-scaffolder-react'),
2221
useTemplateSecrets: () => ({
2322
secrets: {},
2423
setSecrets: mockSetSecrets,

workspaces/x2a/plugins/x2a/src/scaffolder/RepoUrlPickerWithBitbucketFix.test.ts

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)