Merge branch 'backstage:master' into master

This commit is contained in:
Ambrish R
2025-06-01 20:27:03 +05:30
committed by GitHub
8 changed files with 48 additions and 21 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Fixed `CatalogClient` error responses for `refreshEntity` and `addLocation`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/canon': minor
---
We set the default size for IconButton in Canon to be small instead of medium.
+1
View File
@@ -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.
+22
View File
@@ -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
+2 -1
View File
@@ -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": ["<node_internals>/**"], // 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
}
]
}
@@ -34,29 +34,23 @@ const meta = {
options: ['primary', 'secondary'],
},
},
args: {
size: 'medium',
variant: 'primary',
},
} satisfies Meta<typeof IconButton>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Variants: Story = {
export const Default: Story = {
args: {
icon: <Icon name="cloud" />,
'aria-label': 'Cloud icon button',
},
parameters: {
argTypes: {
variant: {
control: false,
},
},
};
export const Variants: Story = {
args: {
...Default.args,
},
render: args => (
<Flex align="center">
<Flex align="center" gap="2">
<IconButton {...args} variant="primary" />
<IconButton {...args} variant="secondary" />
</Flex>
@@ -66,12 +60,11 @@ export const Variants: Story = {
export const Sizes: Story = {
args: {
icon: <Icon name="cloud" />,
'aria-label': 'Cloud icon button',
},
render: args => (
<Flex align="center">
<IconButton {...args} size="medium" />
<Flex align="center" gap="2">
<IconButton {...args} size="small" />
<IconButton {...args} size="medium" />
</Flex>
),
};
@@ -83,7 +76,7 @@ export const Disabled: Story = {
'aria-label': 'Cloud icon button',
},
render: args => (
<Flex direction="row" gap="4">
<Flex direction="row" gap="2">
<IconButton {...args} variant="primary" />
<IconButton {...args} variant="secondary" />
</Flex>
@@ -24,7 +24,7 @@ import type { IconButtonProps } from './types';
export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
(props: IconButtonProps, ref) => {
const {
size = 'medium',
size = 'small',
variant = 'primary',
icon,
className,
+2 -2
View File
@@ -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();