From 441f29c4a11115c7266cf9297bc793235b7f384c Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Tue, 20 May 2025 17:09:15 -0500 Subject: [PATCH 1/5] Kubernetes - Catalog cluster locator `dependsOn` Signed-off-by: Andre Wanlin --- docs/features/kubernetes/configuration.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/features/kubernetes/configuration.md b/docs/features/kubernetes/configuration.md index a22a7d94d9..aeba3fddbb 100644 --- a/docs/features/kubernetes/configuration.md +++ b/docs/features/kubernetes/configuration.md @@ -203,6 +203,28 @@ or the [`AwsEKSClusterProcessor`](https://backstage.io/docs/reference/plugin-catalog-backend-module-aws.awseksclusterprocessor/) to automatically update the set of clusters tracked by Backstage. +For this method to work any entity that would be using this `Resource` to help drive the Kubernetes details in the Catalog's Entity pages needs to have a `dependsOn` relationship setup. Here's a quick example: + +```yaml +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + annotations: + backstage.io/kubernetes-id: dice-roller + backstage.io/kubernetes-namespace: default + name: dice-roller + description: It rolls dice + tags: + - go +spec: + type: service + lifecycle: production + owner: guest + dependsOn: ['resource:my-cluster'] +``` + +This example assumes it's using the default namespace, if that's not the case for you then make sure to include it like this: `resource:my-namespace/my-cluster`. + #### `config` This cluster locator method will read cluster information from your app-config From d91da12e95f0778e47f2fc9c9b70791c54e1b995 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Wed, 21 May 2025 09:00:10 -0500 Subject: [PATCH 2/5] Debugging - Updated to add `experimentalNetworking` flag for VS Code Signed-off-by: Andre Wanlin --- docs/tooling/local-dev/debugging.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/tooling/local-dev/debugging.md b/docs/tooling/local-dev/debugging.md index 662f04151a..6e12bb9f5f 100644 --- a/docs/tooling/local-dev/debugging.md +++ b/docs/tooling/local-dev/debugging.md @@ -65,7 +65,8 @@ In your `.vscode/launch.json`, add a new entry with the following, "runtimeExecutable": "yarn", // Specifies the runtime to execute the application. In this case, it uses `yarn` to run the script. "args": ["start", "--inspect"], // Arguments passed to the `yarn` command. Here, it runs `yarn start` with the `--inspect` flag to enable debugging. "skipFiles": ["/**"], // Tells the debugger to skip stepping into Node.js internal files during debugging. - "console": "integratedTerminal" // Specifies that the debugger should use the integrated terminal for input/output. + "console": "integratedTerminal", // Specifies that the debugger should use the integrated terminal for input/output. + "experimentalNetworking": "off" // Since Node.js 22.15.0 an additional parameter --experimental-network-inspection is added but currently not supported by Yarn } ] } From 22fad0d4519aedd03164b9ed1dcf16662083c8f7 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 27 May 2025 00:07:37 +0200 Subject: [PATCH 3/5] catalog-client: fix error responses Signed-off-by: Patrik Oldsberg --- .changeset/cold-meals-like.md | 5 +++++ packages/catalog-client/src/CatalogClient.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/cold-meals-like.md diff --git a/.changeset/cold-meals-like.md b/.changeset/cold-meals-like.md new file mode 100644 index 0000000000..7feb978337 --- /dev/null +++ b/.changeset/cold-meals-like.md @@ -0,0 +1,5 @@ +--- +'@backstage/catalog-client': patch +--- + +Fixed `CatalogClient` error responses for `refreshEntity` and `addLocation`. diff --git a/packages/catalog-client/src/CatalogClient.ts b/packages/catalog-client/src/CatalogClient.ts index b3f8df1aa6..e69f6ad434 100644 --- a/packages/catalog-client/src/CatalogClient.ts +++ b/packages/catalog-client/src/CatalogClient.ts @@ -305,7 +305,7 @@ export class CatalogClient implements CatalogApi { ); if (response.status !== 200) { - throw new Error(await response.text()); + throw await ResponseError.fromResponse(response); } } @@ -345,7 +345,7 @@ export class CatalogClient implements CatalogApi { ); if (response.status !== 201) { - throw new Error(await response.text()); + throw await ResponseError.fromResponse(response); } const { location, entities, exists } = await response.json(); From 749a72b33e3cbfe5150746dcad3bd26529e200f1 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 30 May 2025 12:45:48 +0200 Subject: [PATCH 4/5] LABELS: add needs:discussion Signed-off-by: Patrik Oldsberg --- LABELS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/LABELS.md b/LABELS.md index 7f8804f75a..3c5bb745f3 100644 --- a/LABELS.md +++ b/LABELS.md @@ -26,6 +26,7 @@ These labels indicate what is needed to move an issue forward before it can be a - `needs:bep` - The issue is an advanced addition that needs a [Backstage Enhancement Proposal](./beps/README.md). - `needs:direction` - The issue needs direction from the owners of the area. +- `needs:discussion` - The way forward for this issue is unclear and it needs further discussion with the author and other participants. - `needs:more-info` - The issue needs more information from the author. - `needs:motivation` - It is not clear why this change is needed. The author should provide motivation for the change, for instance by giving examples of concrete use cases or scenarios. - `needs:repro` - The issue cannot be reproduced by the owners of the area. The author should provide more information to help them reproduce the issue, if possible with a minimal reproduction repository. From a842554cac8dfd70b27698d8eda2f2e3bcd387a1 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sat, 31 May 2025 15:10:16 +0100 Subject: [PATCH 5/5] Update default size on IconButton Signed-off-by: Charles de Dreuille --- .changeset/eight-pigs-post.md | 5 ++++ .../IconButton/IconButton.stories.tsx | 27 +++++++------------ .../src/components/IconButton/IconButton.tsx | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 .changeset/eight-pigs-post.md diff --git a/.changeset/eight-pigs-post.md b/.changeset/eight-pigs-post.md new file mode 100644 index 0000000000..8e50cc7707 --- /dev/null +++ b/.changeset/eight-pigs-post.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': minor +--- + +We set the default size for IconButton in Canon to be small instead of medium. diff --git a/packages/canon/src/components/IconButton/IconButton.stories.tsx b/packages/canon/src/components/IconButton/IconButton.stories.tsx index d16dcd1fcb..7a7272ad05 100644 --- a/packages/canon/src/components/IconButton/IconButton.stories.tsx +++ b/packages/canon/src/components/IconButton/IconButton.stories.tsx @@ -34,29 +34,23 @@ const meta = { options: ['primary', 'secondary'], }, }, - args: { - size: 'medium', - variant: 'primary', - }, } satisfies Meta; export default meta; type Story = StoryObj; -export const Variants: Story = { +export const Default: Story = { args: { icon: , - 'aria-label': 'Cloud icon button', }, - parameters: { - argTypes: { - variant: { - control: false, - }, - }, +}; + +export const Variants: Story = { + args: { + ...Default.args, }, render: args => ( - + @@ -66,12 +60,11 @@ export const Variants: Story = { export const Sizes: Story = { args: { icon: , - 'aria-label': 'Cloud icon button', }, render: args => ( - - + + ), }; @@ -83,7 +76,7 @@ export const Disabled: Story = { 'aria-label': 'Cloud icon button', }, render: args => ( - + diff --git a/packages/canon/src/components/IconButton/IconButton.tsx b/packages/canon/src/components/IconButton/IconButton.tsx index bca012cac0..fd80c91ddd 100644 --- a/packages/canon/src/components/IconButton/IconButton.tsx +++ b/packages/canon/src/components/IconButton/IconButton.tsx @@ -24,7 +24,7 @@ import type { IconButtonProps } from './types'; export const IconButton = forwardRef( (props: IconButtonProps, ref) => { const { - size = 'medium', + size = 'small', variant = 'primary', icon, className,