Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions acceptance/bundle/generate/app_not_yet_deployed/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"message": "App compute is stopped.",
"state": "STOPPED"
},
"forward_user_access_token": true,
"id": "1000",
"name": "my-app",
"service_principal_client_id": "[UUID]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"state": "ACTIVE"
},
"default_source_code_path": "/Workspace/Users/[USERNAME]/test-app-already-exists",
"forward_user_access_token": true,
"id": "1000",
"name": "test-app-already-exists",
"service_principal_client_id": "[UUID]",
Expand Down
2 changes: 2 additions & 0 deletions acceptance/cmd/workspace/apps/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"default_source_code_path": "/Workspace/Users/[USERNAME]/test-name",
"description": "My app description.",
"forward_user_access_token": true,
"id": "1000",
"name": "test-name",
"resources": [
Expand Down Expand Up @@ -62,6 +63,7 @@
},
"default_source_code_path": "/Workspace/Users/[USERNAME]/test-name",
"description": "My app description.",
"forward_user_access_token": true,
"id": "1001",
"name": "test-name",
"resources": [
Expand Down
4 changes: 4 additions & 0 deletions bundle/direct/dresources/resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ resources:
backend_defaults:
# Backend sets it "MEDIUM" when not specified in the config
- field: compute_size
# Backend enables token forwarding and reports true even when the config omits it,
# so an omitted field would otherwise plan an update on every deploy. An explicit
# value in the config still diffs normally.
- field: forward_user_access_token
# lifecycle.started is derived from remote compute status in RemapState, so the
# remote side always has a value. When the user omits lifecycle from config,
# both old and new are nil and backend_defaults correctly skips the remote value.
Expand Down
4 changes: 4 additions & 0 deletions libs/testserver/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ func (s *FakeWorkspace) AppsUpsert(req Request, name string) Response {
app.ComputeSize = "MEDIUM"
}

// The platform enables user access token forwarding regardless of what the
// request asked for, so the remote always reports true.
app.ForwardUserAccessToken = true

// Assign a service principal to the app, mimicking the real platform.
if app.ServicePrincipalClientId == "" {
app.ServicePrincipalClientId = nextUUID()
Expand Down
Loading