Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: send workspace pubsub events by owner id#14964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 4 commits intomainfromethan/owner-pubsub
Nov 1, 2024

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedOct 3, 2024
edited
Loading

We currently send empty payloads to pubsub channels of the formworkspace:<workspace_id> to notify listeners of updates to workspaces (such as for refreshing the workspace dashboard).

To support#14716, we'll instead sendWorkspaceEvent payloads to pubsub channels of the formworkspace_owner:<owner_id>. This enables a listener to receive events for all workspaces owned by a user.
This PR replaces the usage of the old channels without modifying any existing behaviors.

type WorkspaceEvent struct {Kind        WorkspaceEventKind `json:"kind"`WorkspaceID uuid.UUID          `json:"workspace_id" format:"uuid"`// AgentID is only set for WorkspaceEventKindAgent* events// (excluding AgentTimeout)AgentID *uuid.UUID `json:"agent_id,omitempty" format:"uuid"`}

We've definedWorkspaceEventKinds based on how the old channel was used, but it's not yet necessary to inspect the types of any of the events, as the existing listeners are designed to fire off any of them.

WorkspaceEventKindStateChange     WorkspaceEventKind = "state_change"WorkspaceEventKindStatsUpdate     WorkspaceEventKind = "stats_update"WorkspaceEventKindMetadataUpdate  WorkspaceEventKind = "mtd_update"WorkspaceEventKindAppHealthUpdate WorkspaceEventKind = "app_health"WorkspaceEventKindAgentLifecycleUpdate  WorkspaceEventKind = "agt_lifecycle_update"WorkspaceEventKindAgentLogsUpdate       WorkspaceEventKind = "agt_logs_update"WorkspaceEventKindAgentConnectionUpdate WorkspaceEventKind = "agt_connection_update"WorkspaceEventKindAgentLogsOverflow     WorkspaceEventKind = "agt_logs_overflow"WorkspaceEventKindAgentTimeout          WorkspaceEventKind = "agt_timeout"

@ethanndicksonGraphite App
Copy link
MemberAuthor

// Optional:
// WorkspaceID avoids a future lookup to find the workspace ID by setting
// the cache in advance.
WorkspaceID uuid.UUID
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This doesn't need to be optional anymore, presumably since we removed the v1 agent api.

@codercoder deleted a comment fromalwaysmeticulousbotOct 4, 2024
@ethanndicksonethanndickson marked this pull request as ready for reviewOctober 4, 2024 11:57
@github-actionsgithub-actionsbot added the staleThis issue is like stale bread. labelOct 12, 2024
@matifalimatifali removed the staleThis issue is like stale bread. labelOct 12, 2024
@ethanndicksonethanndicksonforce-pushed theethan/owner-pubsub branch 3 times, most recently from8544d74 tob7c333dCompareOctober 18, 2024 03:21
@ethanndicksonethanndicksonforce-pushed theethan/owner-pubsub branch 3 times, most recently from31a3d36 tof6d811fCompareOctober 24, 2024 04:36
@ethanndicksonethanndicksonforce-pushed theethan/owner-pubsub branch 4 times, most recently from03379ee to9dfa2afCompareOctober 29, 2024 09:52
@ethanndicksonethanndickson merged commit31506e6 intomainNov 1, 2024
27 checks passed
@ethanndicksonethanndickson deleted the ethan/owner-pubsub branchNovember 1, 2024 03:17
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 1, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@spikecurtisspikecurtisspikecurtis approved these changes

@sreyasreyaAwaiting requested review from sreya

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ethanndickson@spikecurtis@matifali

[8]ページ先頭

©2009-2025 Movatter.jp