Skip to content

Commit

Permalink
Implement auto-rollback (#1585)
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
michaeljguarino and coderabbitai[bot] authored Nov 20, 2024
1 parent 61ec9dc commit 8bdf9fc
Show file tree
Hide file tree
Showing 69 changed files with 1,170 additions and 272 deletions.
2 changes: 1 addition & 1 deletion AGENT_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.4.53
v0.4.54
57 changes: 57 additions & 0 deletions assets/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,8 @@ export type AzureOpenaiAttributes = {
apiVersion?: InputMaybe<Scalars['String']['input']>;
/** the endpoint of your azure openai version, should look like: https://{endpoint}/openai/deployments/{deployment-id} */
endpoint: Scalars['String']['input'];
/** the exact model you wish to use */
model?: InputMaybe<Scalars['String']['input']>;
};

/** Settings for configuring against Azure OpenAI */
Expand Down Expand Up @@ -1723,6 +1725,8 @@ export type ConfigurationValidationAttributes = {
json?: InputMaybe<Scalars['Boolean']['input']>;
/** regex a string value should match */
regex?: InputMaybe<Scalars['String']['input']>;
/** configuration for name uniqueness */
uniqBy?: InputMaybe<UniqByAttributes>;
};

export enum Conjunction {
Expand Down Expand Up @@ -4144,6 +4148,28 @@ export type PipelineContextEdge = {
node?: Maybe<PipelineContext>;
};

/** A record of a prior pipeline context attached to a stage */
export type PipelineContextHistory = {
__typename?: 'PipelineContextHistory';
context?: Maybe<PipelineContext>;
id: Scalars['ID']['output'];
insertedAt?: Maybe<Scalars['DateTime']['output']>;
stage?: Maybe<PipelineStage>;
updatedAt?: Maybe<Scalars['DateTime']['output']>;
};

export type PipelineContextHistoryConnection = {
__typename?: 'PipelineContextHistoryConnection';
edges?: Maybe<Array<Maybe<PipelineContextHistoryEdge>>>;
pageInfo: PageInfo;
};

export type PipelineContextHistoryEdge = {
__typename?: 'PipelineContextHistoryEdge';
cursor?: Maybe<Scalars['String']['output']>;
node?: Maybe<PipelineContextHistory>;
};

export type PipelineEdge = {
__typename?: 'PipelineEdge';
cursor?: Maybe<Scalars['String']['output']>;
Expand Down Expand Up @@ -4243,6 +4269,7 @@ export type PipelineStage = {
__typename?: 'PipelineStage';
/** the context that is to be applied to this stage for PR promotions */
context?: Maybe<PipelineContext>;
contextHistory?: Maybe<PipelineContextHistoryConnection>;
/** the errors for this stage */
errors?: Maybe<Array<Maybe<ServiceError>>>;
id: Scalars['ID']['output'];
Expand All @@ -4256,6 +4283,15 @@ export type PipelineStage = {
updatedAt?: Maybe<Scalars['DateTime']['output']>;
};


/** a pipeline stage, has a list of services and potentially a promotion which might be pending */
export type PipelineStageContextHistoryArgs = {
after?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
};

/** specification of a stage of a pipeline */
export type PipelineStageAttributes = {
name: Scalars['String']['input'];
Expand Down Expand Up @@ -7669,6 +7705,8 @@ export type RootQueryTypeWireguardPeerArgs = {

export type RootSubscriptionType = {
__typename?: 'RootSubscriptionType';
/** streams chunks of ai text for a given parent scope */
aiStream?: Maybe<Scalars['String']['output']>;
applicationDelta?: Maybe<ApplicationDelta>;
buildDelta?: Maybe<BuildDelta>;
commandDelta?: Maybe<CommandDelta>;
Expand All @@ -7678,6 +7716,12 @@ export type RootSubscriptionType = {
};


export type RootSubscriptionTypeAiStreamArgs = {
insightId?: InputMaybe<Scalars['ID']['input']>;
threadId?: InputMaybe<Scalars['ID']['input']>;
};


export type RootSubscriptionTypeBuildDeltaArgs = {
buildId?: InputMaybe<Scalars['ID']['input']>;
};
Expand Down Expand Up @@ -9053,6 +9097,12 @@ export enum Tool {
Terraform = 'TERRAFORM'
}

/** How to enforce uniqueness for a field */
export type UniqByAttributes = {
/** the scope this name is uniq w/in */
scope: ValidationUniqScope;
};

export type UpgradeInsight = {
__typename?: 'UpgradeInsight';
/** longform description of this insight */
Expand Down Expand Up @@ -9256,6 +9306,11 @@ export type UserRoles = {
admin?: Maybe<Scalars['Boolean']['output']>;
};

export enum ValidationUniqScope {
Cluster = 'CLUSTER',
Project = 'PROJECT'
}

/** a shortform reference to an addon by version */
export type VersionReference = {
__typename?: 'VersionReference';
Expand All @@ -9264,6 +9319,8 @@ export type VersionReference = {
};

export type VertexAiAttributes = {
/** custom vertexai endpoint if for dedicated customer deployments */
endpoint?: InputMaybe<Scalars['String']['input']>;
/** the gcp region the model is hosted in */
location: Scalars['String']['input'];
/** the vertex model id to use */
Expand Down
3 changes: 3 additions & 0 deletions charts/console/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
mountPath: /shared
{{- end }}
containers:
{{ if .Values.console.additionalContainers }}
{{ toYaml .Values.console.additionalContainers | nindent 6 }}
{{ end }}
- name: auth
{{ if .Values.console.containerSecurityContext }}
securityContext:
Expand Down
3 changes: 3 additions & 0 deletions charts/console/templates/migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
{{- toYaml .Values.migrator.securityContext | nindent 8 }}
{{ end }}
containers:
{{ if .Values.console.additionalContainers }}
{{ toYaml .Values.console.additionalContainers | nindent 6 }}
{{ end }}
- name: migrator
{{ if .Values.migrator.containerSecurityContext }}
securityContext:
Expand Down
3 changes: 2 additions & 1 deletion charts/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ podAnnotations: {}

migrator: {}

console: {}
console:
additionalContainers: ~

secrets:
cluster_name: test
Expand Down
11 changes: 11 additions & 0 deletions charts/controller/crds/deployments.plural.sh_customstackruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ spec:
description: A regex to match string-valued configuration
items
type: string
uniqBy:
description: How to determine uniquenss for this field
properties:
scope:
enum:
- PROJECT
- CLUSTER
type: string
required:
- scope
type: object
type: object
values:
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ spec:
description: 'Your Azure OpenAI endpoint, should be formatted
like: https://{endpoint}/openai/deployments/{deployment-id}"'
type: string
model:
description: The OpenAi Model you wish to use. If not specified,
Plural will provide a default
type: string
tokenSecretRef:
description: |-
TokenSecretRef is a reference to the local secret holding the token to access
Expand Down Expand Up @@ -251,6 +255,9 @@ spec:
description: Vertex holds configuration for using GCP VertexAI
to generate LLM insights
properties:
endpoint:
description: A custom endpoint for self-deployed models
type: string
location:
description: The GCP region Vertex is queried from
type: string
Expand Down
11 changes: 11 additions & 0 deletions charts/controller/crds/deployments.plural.sh_prautomations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ spec:
description: A regex to match string-valued configuration
items
type: string
uniqBy:
description: How to determine uniquenss for this field
properties:
scope:
enum:
- PROJECT
- CLUSTER
type: string
required:
- scope
type: object
type: object
values:
items:
Expand Down
8 changes: 8 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ config :console,
kas_dns: "https://kas.example.com",
qps: 1_000,
nowatchers: false,
prom_plugins: [Console.Prom.Plugin],
jwt_pub_key: or_nil.(File.read("config/pubkey.pem"))

config :logger, :console,
Expand Down Expand Up @@ -129,4 +130,11 @@ config :tzdata, :autoupdate, :disabled
config :console, Console.Mailer,
adapter: Bamboo.SMTPAdapter

config :console, Console.PromEx,
disabled: false,
manual_metrics_start_delay: :no_delay,
drop_metrics_groups: [],
grafana: :disabled,
metrics_server: :disabled

import_config "#{Mix.env()}.exs"
10 changes: 10 additions & 0 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ config :console, :watchers, [
Console.Watchers.Postgres,
]

config :console, Console.PromEx,
metrics_server: [
port: 9090,
path: "/metrics", # This is an optional setting and will default to `"/metrics"`
protocol: :http, # This is an optional setting and will default to `:http`
pool_size: 5, # This is an optional setting and will default to `5`
cowboy_opts: [], # This is an optional setting and will default to `[]`
auth_strategy: :none # This is an optional and will default to `:none`
]

config :console,
prometheus: "http://monitoring-prometheus.monitoring:9090",
loki: "http://monitoring-loki.monitoring:3100"
3 changes: 2 additions & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ config :console,
git_ssh_key: :pass,
cache_adapter: Console.TestCache,
local_cache: Console.TestCache,
grafana_dns: "grafana.example.com"
grafana_dns: "grafana.example.com",
prom_plugins: []

config :console, :login_link,
key: "test-key",
Expand Down
79 changes: 76 additions & 3 deletions go/client/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8bdf9fc

Please sign in to comment.