mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
16
.github/workflows/coder.yaml
vendored
16
.github/workflows/coder.yaml
vendored
@ -30,6 +30,22 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
typos:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: typos-action
|
||||
uses: crate-ci/typos@v1.0.4
|
||||
with:
|
||||
config: .github/workflows/typos.toml
|
||||
- name: Fix Helper
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
echo "::notice:: you can automatically fix typos from your CLI:
|
||||
cargo install typos-cli
|
||||
typos -c .github/workflows/typos.toml -w"
|
||||
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
17
.github/workflows/typos.toml
vendored
Normal file
17
.github/workflows/typos.toml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
[default.extend-identifiers]
|
||||
alog = "alog"
|
||||
Jetbrains = "JetBrains"
|
||||
IST = "IST"
|
||||
|
||||
[default.extend-words]
|
||||
|
||||
[files]
|
||||
extend-exclude = [
|
||||
"**.svg",
|
||||
"**.lock",
|
||||
"go.sum",
|
||||
"go.mod",
|
||||
# These files contain base64 strings that confuse the detector
|
||||
"**XService**.ts",
|
||||
"**identity.go",
|
||||
]
|
@ -402,7 +402,7 @@ func (a *agent) createCommand(ctx context.Context, rawCommand string, env []stri
|
||||
// These should override all variables we manually specify.
|
||||
for envKey, value := range metadata.EnvironmentVariables {
|
||||
// Expanding environment variables allows for customization
|
||||
// of the $PATH, among other variables. Customers can prepand
|
||||
// of the $PATH, among other variables. Customers can prepend
|
||||
// or append to the $PATH, so allowing expand is required!
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", envKey, os.ExpandEnv(value)))
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ var Styles = struct {
|
||||
Placeholder,
|
||||
Prompt,
|
||||
FocusedPrompt,
|
||||
Fuschia,
|
||||
Fuchsia,
|
||||
Logo,
|
||||
Warn,
|
||||
Wrap lipgloss.Style
|
||||
@ -51,7 +51,7 @@ var Styles = struct {
|
||||
Placeholder: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#585858", Dark: "#005fff"}),
|
||||
Prompt: defaultStyles.Prompt.Foreground(lipgloss.AdaptiveColor{Light: "#9B9B9B", Dark: "#5C5C5C"}),
|
||||
FocusedPrompt: defaultStyles.FocusedPrompt.Foreground(lipgloss.Color("#651fff")),
|
||||
Fuschia: defaultStyles.SelectedMenuItem.Copy(),
|
||||
Fuchsia: defaultStyles.SelectedMenuItem.Copy(),
|
||||
Logo: defaultStyles.Logo.SetString("Coder"),
|
||||
Warn: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"}),
|
||||
Wrap: lipgloss.NewStyle().Width(80),
|
||||
|
@ -407,7 +407,7 @@ type example struct {
|
||||
Command string
|
||||
}
|
||||
|
||||
// formatExamples formats the exampels as width wrapped bulletpoint
|
||||
// formatExamples formats the examples as width wrapped bulletpoint
|
||||
// descriptions with the command underneath.
|
||||
func formatExamples(examples ...example) string {
|
||||
wrap := cliui.Styles.Wrap.Copy()
|
||||
|
@ -71,7 +71,7 @@ func displayTemplates(filterColumns []string, templates ...codersdk.Template) st
|
||||
template.OrganizationID.String(),
|
||||
template.Provisioner,
|
||||
template.ActiveVersionID.String(),
|
||||
cliui.Styles.Fuschia.Render(fmt.Sprintf("%d developer%s", template.WorkspaceOwnerCount, suffix)),
|
||||
cliui.Styles.Fuchsia.Render(fmt.Sprintf("%d developer%s", template.WorkspaceOwnerCount, suffix)),
|
||||
(time.Duration(template.MaxTTLMillis) * time.Millisecond).String(),
|
||||
(time.Duration(template.MinAutostartIntervalMillis) * time.Millisecond).String(),
|
||||
})
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# This script facilitates code generation for auditing types. It outputs code
|
||||
# that can be copied and pasted into the audit.AuditableResources table. By
|
||||
# default, every field is ignored. It is your responsiblity to go through each
|
||||
# default, every field is ignored. It is your responsibility to go through each
|
||||
# field and document why each field should or should not be audited.
|
||||
#
|
||||
# Usage:
|
||||
|
@ -105,7 +105,7 @@ org = set {
|
||||
|
||||
# The allow block is quite simple. Any set with `false` cascades down in levels.
|
||||
# Authorization looks for any `allow` statement that is true. Multiple can be true!
|
||||
# Note that the absense of `allow` means "unauthorized".
|
||||
# Note that the absence of `allow` means "unauthorized".
|
||||
# An explicit `"allow": true` is required.
|
||||
|
||||
# site allow
|
||||
|
@ -41,7 +41,7 @@ type ProvisionerDaemon struct {
|
||||
Provisioners []ProvisionerType `json:"provisioners"`
|
||||
}
|
||||
|
||||
// ProvisionerJobStaus represents the at-time state of a job.
|
||||
// ProvisionerJobStatus represents the at-time state of a job.
|
||||
type ProvisionerJobStatus string
|
||||
|
||||
// Active returns whether the job is still active or not.
|
||||
|
@ -12,7 +12,7 @@ support should work:
|
||||
- Rider
|
||||
- RubyMine
|
||||
- WebStorm
|
||||
- Web IDEs (code-server, JupyterLab, Jetbrains Projector)
|
||||
- Web IDEs (code-server, JupyterLab, JetBrains Projector)
|
||||
- Note: These are [configured in the template](./ides/configuring-web-ides.md)
|
||||
|
||||
## SSH configuration
|
||||
@ -74,6 +74,6 @@ Connection and connect to your Coder workspace.](./ides/configuring-gateway.md)
|
||||
| 2022.1.4 | Working | Windows clients are unable to connect to Linux workspace |
|
||||
| 2022.2 RC | Working | Version >= 222.3345.108 |
|
||||
|
||||
## Web IDEs (Jupyter, code-server, Jetbrains Projector)
|
||||
## Web IDEs (Jupyter, code-server, JetBrains Projector)
|
||||
|
||||
Web IDEs (code-server, JetBrains Projector, VNC, etc.) are defined in the template. See [configuring IDEs](./ides/configuring-web-ides.md).
|
||||
|
@ -62,7 +62,7 @@ RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.3.0
|
||||
RUN code-server --install-extension eamodio.gitlens
|
||||
|
||||
# directly start code-server with the agent's startup_script (see above),
|
||||
# or use a proccess manager like supervisord
|
||||
# or use a process manager like supervisord
|
||||
```
|
||||
|
||||
You'll also need to specify a `coder_app` resource related to the agent. This is how code-server is displayed on the workspace page.
|
||||
|
@ -42,7 +42,7 @@ instances provisioned by Coder:
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Sid": "CoderResouces",
|
||||
"Sid": "CoderResources",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"ec2:DescribeInstances",
|
||||
|
@ -44,7 +44,7 @@ instances provisioned by Coder:
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Sid": "CoderResouces",
|
||||
"Sid": "CoderResources",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"ec2:DescribeInstances",
|
||||
|
@ -19,7 +19,7 @@ See `params.sample.yaml` for more information.
|
||||
This template has the following predefined parameters:
|
||||
|
||||
- `docker_host`: Path to (or address of) the Docker socket.
|
||||
> You can determine the correct value for this by runnning
|
||||
> You can determine the correct value for this by running
|
||||
> `docker context ls`.
|
||||
- `docker_arch`: Architecture of the host running Docker.
|
||||
This can be `amd64`, `arm64`, or `armv7`.
|
||||
|
@ -21,7 +21,7 @@ variable "step1_docker_host_warning" {
|
||||
the Coder host, which is not necessarily your local machine.
|
||||
|
||||
You can specify a different host in the template file and
|
||||
surpress this warning.
|
||||
suppress this warning.
|
||||
EOF
|
||||
validation {
|
||||
condition = contains(["Continue using /var/run/docker.sock on the Coder host"], var.step1_docker_host_warning)
|
||||
|
@ -21,7 +21,7 @@ variable "step1_docker_host_warning" {
|
||||
the Coder host, which is not necessarily your local machine.
|
||||
|
||||
You can specify a different host in the template file and
|
||||
surpress this warning.
|
||||
suppress this warning.
|
||||
EOF
|
||||
validation {
|
||||
condition = contains(["Continue using /var/run/docker.sock on the Coder host"], var.step1_docker_host_warning)
|
||||
|
@ -136,7 +136,7 @@ func (c *Channel) init() {
|
||||
c.closeMutex.Unlock()
|
||||
|
||||
// pion/webrtc will return an io.ErrShortBuffer when a read
|
||||
// is triggerred with a buffer size less than the chunks written.
|
||||
// is triggered with a buffer size less than the chunks written.
|
||||
//
|
||||
// This makes sense when considering UDP connections, because
|
||||
// buffering of data that has no transmit guarantees is likely
|
||||
|
@ -580,13 +580,13 @@ func sha1HashFile(name string) ([]byte, error) {
|
||||
return []byte(hex.EncodeToString(b)), nil
|
||||
}
|
||||
|
||||
func extractBin(dest string, r io.Reader) (numExtraced int, err error) {
|
||||
func extractBin(dest string, r io.Reader) (numExtracted int, err error) {
|
||||
opts := []zstd.DOption{
|
||||
// Concurrency doesn't help us when decoding the tar and
|
||||
// can actually slow us down.
|
||||
zstd.WithDecoderConcurrency(1),
|
||||
// Ignoring checksums can give a slight performance
|
||||
// boost but it's probalby not worth the reduced safety.
|
||||
// boost but it's probably not worth the reduced safety.
|
||||
zstd.IgnoreChecksum(false),
|
||||
// Allow the decoder to use more memory giving us a 2-3x
|
||||
// performance boost.
|
||||
|
@ -297,7 +297,7 @@ func TestServingBin(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Serve local fs when embedd fs empty",
|
||||
name: "Serve local fs when embed fs empty",
|
||||
fs: fstest.MapFS{},
|
||||
reqs: []req{
|
||||
{url: "/bin/coder-linux-amd64", wantStatus: http.StatusNotFound},
|
||||
@ -305,17 +305,17 @@ func TestServingBin(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Serve embedd fs",
|
||||
name: "Serve embed fs",
|
||||
fs: fstest.MapFS{
|
||||
"bin/GITKEEP": &fstest.MapFile{
|
||||
Data: []byte(""),
|
||||
},
|
||||
"bin/coder-linux-amd64": &fstest.MapFile{
|
||||
Data: []byte("embedd"),
|
||||
Data: []byte("embed"),
|
||||
},
|
||||
},
|
||||
reqs: []req{
|
||||
{url: "/bin/coder-linux-amd64", wantStatus: http.StatusOK, wantBody: []byte("embedd")},
|
||||
{url: "/bin/coder-linux-amd64", wantStatus: http.StatusOK, wantBody: []byte("embed")},
|
||||
{url: "/bin/GITKEEP", wantStatus: http.StatusOK, wantBody: []byte("")},
|
||||
},
|
||||
},
|
||||
|
@ -90,7 +90,7 @@ const typeToColor = (type: ConfirmDialogType): LoadingButtonProps["color"] => {
|
||||
}
|
||||
|
||||
/**
|
||||
* Quickly handels most modals actions, some combination of a cancel and confirm button
|
||||
* Quickly handles most modals actions, some combination of a cancel and confirm button
|
||||
*/
|
||||
export const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({
|
||||
cancelText = "Cancel",
|
||||
|
@ -28,7 +28,7 @@ NullResource.args = {
|
||||
type: "null_resource",
|
||||
}
|
||||
|
||||
export const UnkownResource = Template.bind({})
|
||||
UnkownResource.args = {
|
||||
export const UnknownResource = Template.bind({})
|
||||
UnknownResource.args = {
|
||||
type: "noexistentvalue",
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
cell: {
|
||||
// This must override all padding for all rules on a TableCell.
|
||||
// Otherwise, the link will not cover the entire region.
|
||||
// It's unfortuante to use `!important`, but this seems to be
|
||||
// It's unfortunate to use `!important`, but this seems to be
|
||||
// a reasonable use-case.
|
||||
padding: "0 !important",
|
||||
},
|
||||
|
@ -40,7 +40,7 @@ NoTTL.args = {
|
||||
...Mocks.MockWorkspace,
|
||||
latest_build: {
|
||||
...Mocks.MockWorkspaceBuild,
|
||||
// a mannual shutdown has a deadline of '"0001-01-01T00:00:00Z"'
|
||||
// a manual shutdown has a deadline of '"0001-01-01T00:00:00Z"'
|
||||
// SEE: #1834
|
||||
deadline: "0001-01-01T00:00:00Z",
|
||||
},
|
||||
|
@ -41,7 +41,7 @@ const dashboardHTMLPluginConfig = new HtmlWebpackPlugin({
|
||||
export const createCommonWebpackConfig = (options?: { skipTypecheck: boolean }): Configuration => ({
|
||||
// entry defines each "page" or "chunk". In v1, we have two "pages":
|
||||
// dashboard and terminal. This is desired because the terminal has the xterm
|
||||
// vendor, and it is undesireable to load all of xterm on a dashboard
|
||||
// vendor, and it is undesirable to load all of xterm on a dashboard
|
||||
// page load.
|
||||
//
|
||||
// The object key determines the chunk 'name'. This can be used in `output`
|
||||
|
@ -46,7 +46,7 @@ const config: Configuration = {
|
||||
|
||||
// webpack-dev-server uses a webSocket to communicate with the browser
|
||||
// for HMR. By setting this to auto://0.0.0.0/ws, we allow the browser
|
||||
// to set the protocal, hostname and port automatically for us.
|
||||
// to set the protocol, hostname and port automatically for us.
|
||||
webSocketURL: "auto://0.0.0.0:0/ws",
|
||||
},
|
||||
devMiddleware: {
|
||||
|
Reference in New Issue
Block a user