Skip to content

Commit 912fa8e

Browse files
More workbench tweaks (#3491)
1 parent 018751a commit 912fa8e

42 files changed

Lines changed: 321 additions & 41 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ RUN mix do db.certs, agent.chart, sentry.package_source_code, release
8585
FROM alpine:3.21.3 as tools
8686

8787
ARG TARGETARCH=amd64
88-
ENV CLI_VERSION=v0.12.46
88+
ENV CLI_VERSION=v0.12.48
8989

9090
COPY AGENT_VERSION AGENT_VERSION
9191

assets/src/components/workbenches/workbench/create-edit/WorkbenchCreateOrEdit.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,7 @@ function WorkbenchForm({
207207
({ label }) => label === curStep
208208
)
209209
const allowSubmit = validateForm(formState)
210-
const numUnvisitedSteps = Object.values(stepStatuses).reduce(
211-
(acc, status) => acc + (status === 'not-visited' ? 1 : 0),
212-
0
213-
)
210+
const isLastStep = curStepIndex === workbenchFormSteps.length - 1
214211

215212
const StepComponent = workbenchFormSteps[curStepIndex]?.component
216213

@@ -299,7 +296,7 @@ function WorkbenchForm({
299296
>
300297
Cancel
301298
</Button>
302-
{numUnvisitedSteps < 2 ? (
299+
{isLastStep ? (
303300
<Button
304301
disabled={!allowSubmit}
305302
loading={mutationLoading}

assets/src/generated/graphql.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10621,6 +10621,7 @@ export type RootQueryType = {
1062110621
vulnerabilityReports?: Maybe<VulnerabilityReportConnection>;
1062210622
vulnerabilityStatistics?: Maybe<Array<Maybe<VulnerabilityStatistic>>>;
1062310623
workbench?: Maybe<Workbench>;
10624+
workbenchAggregates: WorkbenchAggregates;
1062410625
workbenchAlerts?: Maybe<AlertConnection>;
1062510626
workbenchIssues?: Maybe<IssueConnection>;
1062610627
workbenchJob?: Maybe<WorkbenchJob>;
@@ -14992,6 +14993,16 @@ export type WorkbenchWorkbenchSkillsArgs = {
1499214993
last?: InputMaybe<Scalars['Int']['input']>;
1499314994
};
1499414995

14996+
export type WorkbenchAggregates = {
14997+
__typename?: 'WorkbenchAggregates';
14998+
/** average eval grade across workbench eval results */
14999+
evalResults?: Maybe<Scalars['Float']['output']>;
15000+
/** fraction of those pull requests that are merged (0.0–1.0) */
15001+
pullRequestMergeRate?: Maybe<Scalars['Float']['output']>;
15002+
/** count of merged pull requests included in the aggregate */
15003+
pullRequests?: Maybe<Scalars['Int']['output']>;
15004+
};
15005+
1499515006
export type WorkbenchAttributes = {
1499615007
/** the agent runtime for this workbench */
1499715008
agentRuntimeId?: InputMaybe<Scalars['ID']['input']>;

charts/console/templates/kas/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ spec:
160160
- key: redis-password
161161
path: redis_server_secret
162162
- secret:
163-
name: console-env
163+
name: {{ .Values.kas.jwtSecret.name }}
164164
items:
165-
- key: JWT_SECRET
165+
- key: {{ .Values.kas.jwtSecret.key }}
166166
path: jwt_secret
167167
{{- with .Values.kas.nodeSelector }}
168168
nodeSelector:

charts/console/templates/secrets.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ data:
8686
{{ if .Values.console.config.adminEmails }}
8787
CONSOLE_ADMIN_EMAILS: {{ .Values.console.config.adminEmails | join "," | b64enc | quote }}
8888
{{ end }}
89+
{{ if .Values.secrets.exaApiKey }}
90+
EXA_API_KEY: {{ .Values.secrets.exaApiKey | b64enc | quote }}
91+
{{ end }}
8992
{{ if .Values.cloud.pgRootCert }}
9093
---
9194
apiVersion: v1

charts/console/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ secrets:
131131
plural_client_id: ~
132132
# plural_client_secret is used to set PLURAL_CLIENT_SECRET if not null
133133
plural_client_secret: ~
134+
# exaApiKey is used to set EXA_API_KEY if not null
135+
exaApiKey: ~
134136

135137
# image is used to configure the image for the console container as follows: "{{ .Values.global.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
136138
image:
@@ -641,6 +643,12 @@ kas:
641643
targetCPUAverageValue: 100m
642644
# targetCPUUtilizationPercentage: 75
643645
# targetMemoryUtilizationPercentage: 75
646+
647+
# jwtSecretName is used to set the name of the secret that contains the JWT secret, usually the default `console-env` secret
648+
jwtSecret:
649+
name: console-env
650+
key: JWT_SECRET
651+
644652
secrets:
645653
create: true
646654
api: ""

config/test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ config :console,
4949
multilevel_cache: Console.MultilevelCache,
5050
grafana_dns: "grafana.example.com",
5151
prom_plugins: [],
52-
github_app_id: "1234567890"
52+
github_app_id: "1234567890",
53+
provider: :aws
5354
# github_app_pem: priv_string
5455

5556
config :console, :login_link,

dockerfiles/Dockerfile.softserve

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN apk add openssh-client
2828
# Reason that we manually install soft-serve instead of using the soft-serve docker image is that
2929
# the soft-serve image starts the server without allowing us to set admin ssh keys, thus preventing
3030
# us from importing repos
31-
RUN go install github.com/pluralsh/soft-serve/cmd/soft@latest
31+
RUN go install github.com/pluralsh/soft-serve/cmd/soft@v0.1.7
3232
RUN mv /go/bin/soft /usr/bin/
3333

3434
# soft-serve data folder

go/client/models_gen.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/console.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,9 @@ defmodule Console do
317317
try do
318318
fun.()
319319
catch
320-
_, err -> fallback.(err)
320+
_, err ->
321+
Logger.error(Exception.format(:error, err, __STACKTRACE__))
322+
fallback.(err)
321323
end
322324
end
323325

0 commit comments

Comments
 (0)