Skip to content

Custom linter for workspace activity database functions #13147

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #13146
f0ssel opened this issue May 3, 2024 · 0 comments · Fixed by #13273
Closed
Tracked by #13146

Custom linter for workspace activity database functions #13147

f0ssel opened this issue May 3, 2024 · 0 comments · Fixed by #13273
Assignees

Comments

@f0ssel
Copy link
Contributor

f0ssel commented May 3, 2024

The simplest option available to us is to make workspaceapps.StatsCollector the single entity responsible for performing the following database queries:

  • ActivityBumpWorkspace
  • UpdateWorkspaceLastUsedAt / BatchUpdateWorkspaceLastUsedAt / UpdateTemplateWorkspacesLastUsedAt
  • InsertWorkspaceAgentStats
  • InsertWorkspaceAppStats

This will involve the following changes:

  • Add a custom linter to detect usage of the above database methods outside of workspaceapps and warn. This will aid in the overall refactor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants