Skip to content
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

fix: enum syntax highlighting #3001

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

wesbillman
Copy link
Collaborator

Fixes #2997

Also fixes refreshing of modules when schema changes

Screenshot 2024-10-04 at 9 07 40 AM
Screenshot 2024-10-04 at 10 04 30 AM

- also fix refreshing of modules when schema changes
@wesbillman wesbillman requested a review from a team as a code owner October 4, 2024 17:08
@wesbillman wesbillman requested review from deniseli and removed request for a team October 4, 2024 17:08
This was referenced Oct 4, 2024
@@ -38,7 +28,7 @@ export const useModules = () => {
}

return useQuery({
queryKey: [useModulesKey],
queryKey: [useModulesKey, schemaUpdatedAt],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

without this, the schema would change (delete old modules) and never trigger the modules to reload. This should be better once we have a dedicated streaming endpoint :)

Also note that with the current deployment/schema stuff, it's possible to have 2 active deployments for the same module for a few seconds while the old module gets cleaned up. We'll want to add handling to our streaming endpoint to return the most recently activated deployment vs. returning both the old and new.

In the future, this will need more attention since we'll likely want to show multiple deployed versions, but until we have versioning worked out we should probably just show the most recent active deployment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, that makes sense. Thanks for catching that! The streaming endpoint does already filter for unique module names and chooses the latest when there is a dup. I haven't added update handling to the backend yet, though, so it's not yet tested.

Copy link
Contributor

@jonathanj-square jonathanj-square left a comment

Choose a reason for hiding this comment

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

looks good

@wesbillman wesbillman merged commit b91f56c into main Oct 4, 2024
97 checks passed
@wesbillman wesbillman deleted the fix-schema-enum-highlighting branch October 4, 2024 17:52
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 this pull request may close these issues.

Console syntax highlighting missing last enum character
3 participants