ref(onboarding): Improve project polling mechanism - #85918
Merged
ArthurKnaus merged 2 commits intoFeb 26, 2025
Conversation
ArthurKnaus
commented
Feb 26, 2025
Comment on lines
+39
to
+50
| const {data: issues} = useApiQuery<Group[]>( | ||
| [`/projects/${organization.slug}/${project.slug}/issues/`], | ||
| { | ||
| staleTime: Infinity, | ||
| enabled: !!project.firstEvent, | ||
| } | ||
| ); | ||
|
|
||
| const firstIssue = | ||
| !!project.firstEvent && issues | ||
| ? issues.find((issue: Group) => issue.firstSeen === project.firstEvent) | ||
| : undefined; |
Member
Author
There was a problem hiding this comment.
Moved fetching the issue out of the hook as it is only relevant for this component. (which is not used in the project create flow)
ArthurKnaus
commented
Feb 26, 2025
Comment on lines
154
to
-164
| const shallProjectBeDeleted = | ||
| stepObj?.id === 'setup-docs' && | ||
| recentCreatedProject && | ||
| // if the project has received a first error, we don't delete it | ||
| recentCreatedProject.firstError === false && | ||
| // if the project has received a first transaction, we don't delete it | ||
| recentCreatedProject.firstTransaction === false && | ||
| // if the project has replays, we don't delete it | ||
| recentCreatedProject.hasReplays === false && | ||
| // if the project has sessions, we don't delete it | ||
| recentCreatedProject.hasSessions === false && | ||
| // if the project is older than one hour, we don't delete it | ||
| recentCreatedProject.olderThanOneHour === false; |
Member
Author
There was a problem hiding this comment.
de-duped and moved inside the hook
obostjancic
approved these changes
Feb 26, 2025
ArthurKnaus
deleted the
aknaus/ref/onboarding/improve-project-polling-mechanism
branch
February 26, 2025 13:13
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
De-dupe logic
Stop polling once the project is determined active.