feat: implement AppService control plane proxy with TTL cache#7176
Open
AdilFayyaz wants to merge 15 commits intov2from
Open
feat: implement AppService control plane proxy with TTL cache#7176AdilFayyaz wants to merge 15 commits intov2from
AdilFayyaz wants to merge 15 commits intov2from
Conversation
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
This was referenced Apr 8, 2026
Draft
3 tasks
3 tasks
pingsutw
reviewed
Apr 17, 2026
| "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/actions/actionsconnect" | ||
| flyteappconnect "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/app/appconnect" | ||
| "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/auth/authconnect" | ||
| "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/auth/authconnect" |
Member
There was a problem hiding this comment.
Suggested change
| "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/auth/authconnect" | |
| "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/auth/authconnect" |
| logger.Infof(ctx, "Mounted AppService at %s", appPath) | ||
|
|
||
| triggerSvc := service.NewTriggerService() | ||
| triggerSvc := service.NewTriggerService() |
Member
There was a problem hiding this comment.
Suggested change
| triggerSvc := service.NewTriggerService() | |
| triggerSvc := service.NewTriggerService() |
Comment on lines
+137
to
+147
| func newAppCache(ttl time.Duration) *appCache { | ||
| return &appCache{ | ||
| items: make(map[string]*cacheEntry), | ||
| ttl: ttl, | ||
| } | ||
| } | ||
|
|
||
| // get returns the cached App for key, or (nil, false) if missing or expired. | ||
| func (c *appCache) get(key string) (*flyteapp.App, bool) { | ||
| if c.ttl == 0 { | ||
| return nil, false |
Member
There was a problem hiding this comment.
Could we use the lru cache from github.com/hashicorp/golang-lru/v2/expirable? it has ttl and we use it in cloud too
80d58ad to
bfeafe3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on: #7175
Why are the changes needed?
The control plane needs a stable API surface for app management without making direct K8s calls. AppService proxies to InternalAppService (data plane) and adds a TTL cache to reduce cross-plane RPC calls on hot Get paths.
What changes were proposed in this pull request?
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link
main