Skip to content

Commit d2f5f7e

Browse files
committed
Merge remote-tracking branch 'origin/main' into jjs/presets
2 parents ff55cc4 + 7076c4e commit d2f5f7e

File tree

27 files changed

+643
-233
lines changed

27 files changed

+643
-233
lines changed

cli/server.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,12 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
694694
}
695695
}
696696

697-
if vals.OIDC.ClientKeyFile != "" || vals.OIDC.ClientSecret != "" {
697+
// As OIDC clients can be confidential or public,
698+
// we should only check for a client id being set.
699+
// The underlying library handles the case of no
700+
// client secrets correctly. For more details on
701+
// client types: https://oauth.net/2/client-types/
702+
if vals.OIDC.ClientID != "" {
698703
if vals.OIDC.IgnoreEmailVerified {
699704
logger.Warn(ctx, "coder will not check email_verified for OIDC logins")
700705
}

docs/admin/licensing/index.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@ There are two ways to add a license to a Coder deployment:
4747

4848
1. Run `coder licenses add`:
4949

50-
```shell
51-
coder licenses add -f <path to your license key>
52-
```
50+
- For a `.jwt` license file:
51+
52+
```shell
53+
coder licenses add -f <path to your license key>
54+
```
55+
56+
- For a text string:
57+
58+
```sh
59+
coder licenses add -l 1f5...765
60+
```
5361

5462
</div>
5563

docs/tutorials/faqs.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,61 @@ For other community resources, see our
1111
## How do I add a Premium trial license?
1212

1313
Visit <https://coder.com/trial> or contact
14-
1514
[sales@coder.com](mailto:sales@coder.com?subject=License) to get a trial key.
1615

17-
You can add a license through the UI or CLI.
16+
<details>
1817

19-
In the UI, click the Deployment tab -> Licenses and upload the `jwt` license
20-
file.
18+
<summary>You can add a license through the UI or CLI</summary>
2119

22-
> To add the license with the CLI, first
23-
> [install the Coder CLI](../install/cli.md) and server to the latest release.
20+
<!-- copied from docs/admin/licensing/index.md -->
2421

25-
If the license is a text string:
22+
<div class="tabs">
2623

27-
```sh
28-
coder licenses add -l 1f5...765
29-
```
24+
### Coder UI
3025

31-
If the license is in a file:
26+
1. With an `Owner` account, go to **Admin settings** > **Deployment**.
3227

33-
```sh
34-
coder licenses add -f <path/filename>
35-
```
28+
1. Select **Licenses** from the sidebar, then **Add a license**:
29+
30+
![Add a license from the licenses screen](../images/admin/licenses/licenses-nolicense.png)
31+
32+
1. On the **Add a license** screen, drag your `.jwt` license file into the
33+
**Upload Your License** section, or paste your license in the
34+
**Paste Your License** text box, then select **Upload License**:
35+
36+
![Add a license screen](../images/admin/licenses/add-license-ui.png)
37+
38+
### Coder CLI
39+
40+
1. Ensure you have the [Coder CLI](../install/cli.md) installed.
41+
1. Save your license key to disk and make note of the path.
42+
1. Open a terminal.
43+
1. Log in to your Coder deployment:
44+
45+
```shell
46+
coder login <access url>
47+
```
48+
49+
1. Run `coder licenses add`:
50+
51+
- For a `.jwt` license file:
52+
53+
```shell
54+
coder licenses add -f <path to your license key>
55+
```
56+
57+
- For a text string:
58+
59+
```sh
60+
coder licenses add -l 1f5...765
61+
```
62+
63+
</div>
64+
65+
</details>
66+
67+
Visit the [licensing documentation](../admin/licensing/index.md) for more
68+
information about licenses.
3669

3770
## I'm experiencing networking issues, so want to disable Tailscale, STUN, Direct connections and force use of websocket
3871

scripts/dev-oidc.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ cat <<EOF >/tmp/example-realm.json
4949
"baseUrl": "/coder",
5050
"redirectUris": ["*"],
5151
"secret": "coder"
52+
},
53+
{
54+
"clientId": "coder-public",
55+
"publicClient": true,
56+
"directAccessGrantsEnabled": true,
57+
"enabled": true,
58+
"fullScopeAllowed": true,
59+
"baseUrl": "/coder",
60+
"redirectUris": [
61+
"*"
62+
]
5263
}
5364
]
5465
}
@@ -79,6 +90,9 @@ hostname=$(hostname -f)
7990
export CODER_OIDC_ISSUER_URL="http://${hostname}:9080/realms/coder"
8091
export CODER_OIDC_CLIENT_ID=coder
8192
export CODER_OIDC_CLIENT_SECRET=coder
93+
# Comment out the two lines above, and comment in the line below,
94+
# to configure OIDC auth using a public client.
95+
# export CODER_OIDC_CLIENT_ID=coder-public
8296
export CODER_DEV_ACCESS_URL="http://${hostname}:8080"
8397

8498
exec "${SCRIPT_DIR}/develop.sh" "$@"

scripts/release/check_commit_metadata.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ main() {
143143
for commit in "${renamed_cherry_pick_commits_pending[@]}"; do
144144
log "Checking if pending commit ${commit} has a corresponding cherry-pick..."
145145
if [[ ! -v renamed_cherry_pick_commits[${commit}] ]]; then
146-
error "Invariant failed, cherry-picked commit ${commit} has no corresponding original commit"
146+
if [[ ${CODER_IGNORE_MISSING_COMMIT_METADATA:-0} == 1 ]]; then
147+
log "WARNING: Missing original commit for cherry-picked commit ${commit}, but continuing due to CODER_IGNORE_MISSING_COMMIT_METADATA being set."
148+
continue
149+
else
150+
error "Invariant failed, cherry-picked commit ${commit} has no corresponding original commit"
151+
fi
147152
fi
148153
log "Found matching cherry-pick commit ${commit} -> ${renamed_cherry_pick_commits[${commit}]}"
149154
done

site/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ class ApiMethods {
804804
) => {
805805
const params = new URLSearchParams();
806806
params.set("claimField", field);
807-
const response = await this.axios.get<TypesGen.Response>(
807+
const response = await this.axios.get<readonly string[]>(
808808
`/api/v2/organizations/${organization}/settings/idpsync/field-values?${params}`,
809809
);
810810
return response.data;

site/src/components/IconField/EmojiPicker.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import data from "@emoji-mart/data/sets/15/apple.json";
22
import EmojiMart from "@emoji-mart/react";
3-
import type { ComponentProps, FC } from "react";
3+
import {
4+
type ComponentProps,
5+
type FC,
6+
useEffect,
7+
useLayoutEffect,
8+
} from "react";
49
import icons from "theme/icons.json";
510

611
const custom = [
@@ -26,6 +31,23 @@ type EmojiPickerProps = Omit<
2631
>;
2732

2833
const EmojiPicker: FC<EmojiPickerProps> = (props) => {
34+
/**
35+
* Workaround for a bug in the emoji-mart library where custom emoji images render improperly.
36+
* Setting the image width to 100% ensures they display correctly.
37+
*
38+
* Issue: https://github.com/missive/emoji-mart/issues/805
39+
* Open PR: https://github.com/missive/emoji-mart/pull/806
40+
*/
41+
useEffect(() => {
42+
const picker = document.querySelector("em-emoji-picker")?.shadowRoot;
43+
if (!picker) {
44+
return;
45+
}
46+
const css = document.createElement("style");
47+
css.textContent = ".emoji-mart-emoji img { width: 100% }";
48+
picker.appendChild(css);
49+
}, []);
50+
2951
return (
3052
<EmojiMart
3153
theme="dark"
Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,55 @@
11
import type { Meta, StoryObj } from "@storybook/react";
2-
import { StatusIndicator } from "./StatusIndicator";
2+
import { StatusIndicator, StatusIndicatorDot } from "./StatusIndicator";
33

44
const meta: Meta<typeof StatusIndicator> = {
55
title: "components/StatusIndicator",
66
component: StatusIndicator,
7-
args: {},
7+
args: {
8+
children: (
9+
<>
10+
<StatusIndicatorDot />
11+
Status
12+
</>
13+
),
14+
},
815
};
916

1017
export default meta;
1118
type Story = StoryObj<typeof StatusIndicator>;
1219

1320
export const Success: Story = {
1421
args: {
15-
color: "success",
16-
},
17-
};
18-
19-
export const SuccessOutline: Story = {
20-
args: {
21-
color: "success",
22-
variant: "outlined",
23-
},
24-
};
25-
26-
export const Warning: Story = {
27-
args: {
28-
color: "warning",
22+
variant: "success",
2923
},
3024
};
3125

32-
export const WarningOutline: Story = {
26+
export const Failed: Story = {
3327
args: {
34-
color: "warning",
35-
variant: "outlined",
28+
variant: "failed",
3629
},
3730
};
3831

39-
export const Danger: Story = {
32+
export const Inactive: Story = {
4033
args: {
41-
color: "danger",
34+
variant: "inactive",
4235
},
4336
};
4437

45-
export const DangerOutline: Story = {
38+
export const Warning: Story = {
4639
args: {
47-
color: "danger",
48-
variant: "outlined",
40+
variant: "warning",
4941
},
5042
};
5143

52-
export const Inactive: Story = {
44+
export const Pending: Story = {
5345
args: {
54-
color: "inactive",
46+
variant: "pending",
5547
},
5648
};
5749

58-
export const InactiveOutline: Story = {
50+
export const Small: Story = {
5951
args: {
60-
color: "inactive",
61-
variant: "outlined",
52+
variant: "success",
53+
size: "sm",
6254
},
6355
};

0 commit comments

Comments
 (0)