Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0185c0a
init functinoality
royendo Dec 16, 2025
47c11ed
nit fix for saving
royendo Dec 16, 2025
8b57993
prettier
royendo Dec 16, 2025
0da0d0f
code qual
royendo Dec 16, 2025
e50214e
pretty
royendo Dec 16, 2025
da5d2c1
qual
royendo Dec 16, 2025
7ba537f
adding buttons
royendo Dec 17, 2025
d155dbb
mangeprjoect access only
royendo Dec 17, 2025
6edc05b
simple UI will replace
royendo Dec 17, 2025
6e89198
push/pull functionality
royendo Dec 17, 2025
dadaa3d
Merge branch 'main' into feat/env-ui-editor
royendo Feb 5, 2026
3fa7726
change button to disabled if no project synced
royendo Feb 5, 2026
17c7cf8
update behavior
royendo Feb 5, 2026
6d432c6
code fail
royendo Feb 5, 2026
d1ce955
code qual + prettier
royendo Feb 5, 2026
89c4be7
migrate APIs to runtime
k-anshul Feb 20, 2026
e7f9123
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
k-anshul Feb 20, 2026
b84fd15
prettier fixes
k-anshul Feb 20, 2026
cf5fd00
update css with themes
royendo Feb 20, 2026
12b0825
api changes
k-anshul Feb 26, 2026
6c232be
config reloader changes
k-anshul Feb 26, 2026
eb39ae9
minor changes
k-anshul Feb 26, 2026
45cbaed
some more minor changes
k-anshul Feb 27, 2026
4df228a
some more minor changes
k-anshul Feb 27, 2026
0fa63e0
not seeing env editor for .dev.env fix
royendo Mar 3, 2026
fd71ded
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
royendo Mar 3, 2026
4b2569b
make proto.generate
royendo Mar 3, 2026
85cb061
make proto.generate
royendo Mar 3, 2026
13e4a57
prettier
royendo Mar 3, 2026
7a9301e
Merge branch 'feat/env-ui-editor' of https://github.com/rilldata/rill…
royendo Mar 3, 2026
fe8db58
Merge branch 'main' into feat/env-ui-editor
royendo Mar 3, 2026
baace21
4-7
royendo Mar 3, 2026
3c2247c
8-15
royendo Mar 3, 2026
c6f503f
prettier
royendo Mar 3, 2026
09db430
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
k-anshul Mar 6, 2026
df84695
vars renames
k-anshul Mar 6, 2026
85d3b75
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
royendo Mar 30, 2026
f057da9
fix and migration
royendo Mar 30, 2026
43e22c5
web code wual fixes
royendo Mar 30, 2026
d142b6a
prettier
royendo Mar 30, 2026
0a32b5b
code qual
royendo Mar 30, 2026
830c38b
go code
royendo Mar 30, 2026
be2686c
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
k-anshul Apr 10, 2026
5523577
simplification
k-anshul Apr 10, 2026
e0b3845
more simplifactions
k-anshul Apr 10, 2026
2d0d9c9
add code removed by merge conflicts
k-anshul Apr 10, 2026
1ca1e0a
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
k-anshul Apr 21, 2026
9856b6e
Update proto/rill/admin/v1/api.proto
k-anshul Apr 21, 2026
024f8dd
review comments - 1
k-anshul Apr 21, 2026
76fc504
fixes
k-anshul Apr 21, 2026
1256607
remove getvariables
k-anshul Apr 22, 2026
04bd4bf
lint fix
k-anshul Apr 22, 2026
5242b97
use repo functions
k-anshul Apr 22, 2026
86489f3
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
k-anshul Apr 22, 2026
fa5a8c2
remove pull env api
k-anshul Apr 22, 2026
ae6093c
lint fix
k-anshul Apr 22, 2026
9aef5d2
init map
k-anshul Apr 22, 2026
1c48d6d
git merge main
royendo Apr 29, 2026
a6420bb
Revert "git merge main"
royendo Apr 29, 2026
1aca2de
Merge remote-tracking branch 'origin/main' into feat/env-ui-editor
royendo Apr 29, 2026
d8e94b9
Restore PullEnv runtime API and frontend Pull dialog
royendo Apr 29, 2026
73b0b8b
revert
royendo Apr 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review comments - 1
  • Loading branch information
k-anshul committed Apr 21, 2026
commit 024f8ddd5556cb0fd75b55315881a1f85b195cad
10 changes: 5 additions & 5 deletions admin/server/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,11 @@ func (s *Server) GetDeploymentConfig(ctx context.Context, req *adminv1.GetDeploy
if err != nil {
return nil, err
}
resp.ProjectVariables = make([]*adminv1.ProjectVariable, 0, len(vars))
resp.Variables = make([]*adminv1.ProjectVariable, 0, len(vars))
for _, v := range vars {
resp.ProjectVariables = append(resp.ProjectVariables, projectVariableToDTO(v))
resp.Variables = append(resp.Variables, projectVariableToDTO(v))
}
resp.ProjectVariables = append(resp.ProjectVariables, &adminv1.ProjectVariable{
resp.Variables = append(resp.Variables, &adminv1.ProjectVariable{
Name: "rill.watch_repo",
Value: strconv.FormatBool(depl.Editable),
Environment: depl.Environment,
Expand All @@ -962,9 +962,9 @@ func (s *Server) GetDeploymentConfig(ctx context.Context, req *adminv1.GetDeploy
})

// remove in next release
resp.Variables = make(map[string]string, len(vars)) // nolint:staticcheck // Still need to populate for backward compatibility.
resp.VariablesLegacy = make(map[string]string, len(vars)) // nolint:staticcheck // Still need to populate for backward compatibility.
for _, v := range vars {
resp.Variables[v.Name] = v.Value // nolint:staticcheck // Still need to populate for backward compatibility.
resp.VariablesLegacy[v.Name] = v.Value // nolint:staticcheck // Still need to populate for backward compatibility.
}

// parsing duckdb connector config
Expand Down
13 changes: 7 additions & 6 deletions proto/gen/rill/admin/v1/admin.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5129,16 +5129,16 @@ definitions:
type: object
properties:
variables:
type: object
additionalProperties:
type: string
description: 'Deprecated: Variables for the deployment (connector credentials, etc.). Use `project_variables` instead.'
projectVariables:
type: array
items:
type: object
$ref: '#/definitions/v1ProjectVariable'
description: Project-specific variables for the deployment.
description: Variables for the deployment.
variablesLegacy:
type: object
additionalProperties:
type: string
description: 'Deprecated: Variables for the deployment. Use `variables` instead.'
annotations:
type: object
additionalProperties:
Expand All @@ -5159,6 +5159,7 @@ definitions:
title: Duckdb connector config for the deployment
editable:
type: boolean
description: Whether the deployment is editable (dev environment with changes persisted to git repo).
v1GetDeploymentCredentialsResponse:
type: object
properties:
Expand Down
8,344 changes: 4,173 additions & 4,171 deletions proto/gen/rill/admin/v1/api.pb.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions proto/gen/rill/admin/v1/api.pb.validate.go

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

13 changes: 7 additions & 6 deletions proto/gen/rill/admin/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,11 @@ components:
title: Duckdb connector config for the deployment
type: object
editable:
description: Whether the deployment is editable (dev environment with changes persisted to git repo).
type: boolean
frontendUrl:
description: Frontend URL for the deployment.
type: string
projectVariables:
description: Project-specific variables for the deployment.
items:
$ref: '#/components/schemas/v1ProjectVariable'
type: array
updatedOn:
description: Timestamp when the deployment was last updated.
format: date-time
Expand All @@ -703,9 +699,14 @@ components:
description: Whether the deployment is git based or archive based.
type: boolean
variables:
description: Variables for the deployment.
items:
$ref: '#/components/schemas/v1ProjectVariable'
type: array
variablesLegacy:
additionalProperties:
type: string
description: 'Deprecated: Variables for the deployment (connector credentials, etc.). Use `project_variables` instead.'
description: 'Deprecated: Variables for the deployment. Use `variables` instead.'
type: object
type: object
v1GetDeploymentCredentialsResponse:
Expand Down
13 changes: 7 additions & 6 deletions proto/gen/rill/admin/v1/public.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,11 @@ components:
title: Duckdb connector config for the deployment
type: object
editable:
description: Whether the deployment is editable (dev environment with changes persisted to git repo).
type: boolean
frontendUrl:
description: Frontend URL for the deployment.
type: string
projectVariables:
description: Project-specific variables for the deployment.
items:
$ref: '#/components/schemas/v1ProjectVariable'
type: array
updatedOn:
description: Timestamp when the deployment was last updated.
format: date-time
Expand All @@ -703,9 +699,14 @@ components:
description: Whether the deployment is git based or archive based.
type: boolean
variables:
description: Variables for the deployment.
items:
$ref: '#/components/schemas/v1ProjectVariable'
type: array
variablesLegacy:
additionalProperties:
type: string
description: 'Deprecated: Variables for the deployment (connector credentials, etc.). Use `project_variables` instead.'
description: 'Deprecated: Variables for the deployment. Use `variables` instead.'
type: object
type: object
v1GetDeploymentCredentialsResponse:
Expand Down
8 changes: 4 additions & 4 deletions proto/gen/rill/runtime/v1/api_grpc.pb.go

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

4 changes: 2 additions & 2 deletions proto/gen/rill/runtime/v1/runtime.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ paths:
- RuntimeService
/v1/instances/{instanceId}/env/pull:
post:
summary: PullEnv pulls environment variables from cloud to local .env file
summary: PullEnv pulls environment variables from admin service to local .env file
operationId: RuntimeService_PullEnv
responses:
"200":
Expand All @@ -820,7 +820,7 @@ paths:
- RuntimeService
/v1/instances/{instanceId}/env/push:
post:
summary: PushEnv pushes local environment variables to cloud
summary: PushEnv pushes local environment variables to admin service
operationId: RuntimeService_PushEnv
responses:
"200":
Expand Down
1 change: 1 addition & 0 deletions proto/rill/admin/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1942,6 +1942,7 @@ map<string, string> variables_legacy = 1;
bool uses_archive = 5;
// Duckdb connector config for the deployment
google.protobuf.Struct duckdb_connector_config = 6;
// Whether the deployment is editable (dev environment with changes persisted to git repo).
bool editable = 8;
Comment thread
k-anshul marked this conversation as resolved.
}

Expand Down
4 changes: 2 additions & 2 deletions proto/rill/runtime/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,15 @@ service RuntimeService {

// Env APIs

// PullEnv pulls environment variables from cloud to local .env file
// PullEnv pulls environment variables from admin service to local .env file
rpc PullEnv(PullEnvRequest) returns (PullEnvResponse) {
option (google.api.http) = {
post: "/v1/instances/{instance_id}/env/pull",
body: "*"
};
}

// PushEnv pushes local environment variables to cloud
// PushEnv pushes local environment variables to admin service
rpc PushEnv(PushEnvRequest) returns (PushEnvResponse) {
option (google.api.http) = {
post: "/v1/instances/{instance_id}/env/push",
Expand Down
23 changes: 11 additions & 12 deletions runtime/config_reloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,19 @@ func (r *configReloader) reloadConfig(ctx context.Context, instanceID string) er
restartController := false

// Update variables
allvars := make(map[string]string)
for _, envVars := range cfg.Variables {
for k, v := range envVars {
allvars[k] = v
}
vars := make(map[string]string)
// default first
for k, v := range cfg.Variables[""] {
vars[k] = v
}
// then overlay env specific
for k, v := range cfg.Variables[inst.Environment] {
vars[k] = v
}
varsChanged := !maps.Equal(inst.Variables, allvars)
varsChanged := !maps.Equal(inst.Variables, vars)
if varsChanged {
inst.Variables = allvars
if !cfg.Editable { // for editable deployments we will write vars to `.env` which will also trigger controller restart
inst.Variables = vars
restartController = true
}
}
Expand Down Expand Up @@ -172,12 +175,8 @@ func (r *configReloader) reloadConfig(ctx context.Context, instanceID string) er
switch env {
case "":
path = ".env"
case "dev":
path = ".dev.env"
default:
// should not happen because only dev vars will be fetched for editable deployments
r.rt.Logger.Error("skipping variables for non-dev environment. Only `dev` deployments can be made editable.", zap.String("env", env), zap.String("instance_id", inst.ID))
continue
path = fmt.Sprintf(".%s.env", env)
}
contents, err := godotenv.Marshal(envVars)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion runtime/drivers/admin/admin_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (h *Handle) GetDeploymentConfig(ctx context.Context) (*drivers.DeploymentCo
}

return &drivers.DeploymentConfig{
Variables: groupVariablesByEnv(res.ProjectVariables),
Variables: groupVariablesByEnv(res.Variables),
Annotations: res.Annotations,
FrontendURL: res.FrontendUrl,
UpdatedOn: res.UpdatedOn.AsTime(),
Expand Down
4 changes: 2 additions & 2 deletions runtime/server/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (s *Server) PullEnv(ctx context.Context, req *runtimev1.PullEnvRequest) (*r
}
defer release()

// Fetch cloud variables for all environments
// Fetch cloud variables
cloudPerEnv, err := admin.GetProjectVariables(ctx, inst.Environment)
if err != nil && !errors.Is(err, drivers.ErrNotAuthenticated) {
return nil, fmt.Errorf("failed to get project variables: %w", err)
Expand Down Expand Up @@ -149,7 +149,7 @@ func (s *Server) PushEnv(ctx context.Context, req *runtimev1.PushEnvRequest) (*r

localPerEnv := p.GetDotEnvPerEnvironment()

// Fetch existing cloud variables for all environments
// Fetch existing cloud variables
cloudPerEnv, err := admin.GetProjectVariables(ctx, inst.Environment)
if err != nil && !errors.Is(err, drivers.ErrNotAuthenticated) {
return nil, fmt.Errorf("failed to get project variables: %w", err)
Expand Down
15 changes: 9 additions & 6 deletions web-admin/src/client/gen/index.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,11 @@ export interface V1GetCurrentUserResponse {
}

/**
* Deprecated: Variables for the deployment (connector credentials, etc.). Use `project_variables` instead.
* Deprecated: Variables for the deployment. Use `variables` instead.
*/
export type V1GetDeploymentConfigResponseVariables = { [key: string]: string };
export type V1GetDeploymentConfigResponseVariablesLegacy = {
[key: string]: string;
};

export type V1GetDeploymentConfigResponseAnnotations = {
[key: string]: string;
Expand All @@ -549,10 +551,10 @@ export type V1GetDeploymentConfigResponseDuckdbConnectorConfig = {
};

export interface V1GetDeploymentConfigResponse {
/** Deprecated: Variables for the deployment (connector credentials, etc.). Use `project_variables` instead. */
variables?: V1GetDeploymentConfigResponseVariables;
/** Project-specific variables for the deployment. */
projectVariables?: V1ProjectVariable[];
/** Variables for the deployment. */
variables?: V1ProjectVariable[];
/** Deprecated: Variables for the deployment. Use `variables` instead. */
variablesLegacy?: V1GetDeploymentConfigResponseVariablesLegacy;
annotations?: V1GetDeploymentConfigResponseAnnotations;
/** Frontend URL for the deployment. */
frontendUrl?: string;
Expand All @@ -561,6 +563,7 @@ export interface V1GetDeploymentConfigResponse {
/** Whether the deployment is git based or archive based. */
usesArchive?: boolean;
duckdbConnectorConfig?: V1GetDeploymentConfigResponseDuckdbConnectorConfig;
/** Whether the deployment is editable (dev environment with changes persisted to git repo). */
editable?: boolean;
}

Expand Down
18 changes: 10 additions & 8 deletions web-common/src/proto/gen/rill/admin/v1/api_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4803,18 +4803,18 @@ export class GetDeploymentConfigRequest extends Message<GetDeploymentConfigReque
*/
export class GetDeploymentConfigResponse extends Message<GetDeploymentConfigResponse> {
/**
* Deprecated: Variables for the deployment (connector credentials, etc.). Use `project_variables` instead.
* Variables for the deployment.
*
* @generated from field: map<string, string> variables = 1;
* @generated from field: repeated rill.admin.v1.ProjectVariable variables = 7;
*/
variables: { [key: string]: string } = {};
variables: ProjectVariable[] = [];

/**
* Project-specific variables for the deployment.
* Deprecated: Variables for the deployment. Use `variables` instead.
*
* @generated from field: repeated rill.admin.v1.ProjectVariable project_variables = 7;
* @generated from field: map<string, string> variables_legacy = 1;
*/
projectVariables: ProjectVariable[] = [];
variablesLegacy: { [key: string]: string } = {};

/**
* Annotations for the deployment (org/project metadata, etc.)
Expand Down Expand Up @@ -4852,6 +4852,8 @@ export class GetDeploymentConfigResponse extends Message<GetDeploymentConfigResp
duckdbConnectorConfig?: Struct;

/**
* Whether the deployment is editable (dev environment with changes persisted to git repo).
*
* @generated from field: bool editable = 8;
*/
editable = false;
Expand All @@ -4864,8 +4866,8 @@ export class GetDeploymentConfigResponse extends Message<GetDeploymentConfigResp
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "rill.admin.v1.GetDeploymentConfigResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "variables", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
{ no: 7, name: "project_variables", kind: "message", T: ProjectVariable, repeated: true },
{ no: 7, name: "variables", kind: "message", T: ProjectVariable, repeated: true },
{ no: 1, name: "variables_legacy", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
{ no: 2, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
{ no: 3, name: "frontend_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "updated_on", kind: "message", T: Timestamp },
Expand Down
Loading
Loading