-
Notifications
You must be signed in to change notification settings - Fork 180
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
perf(app,robot-server): Download analyses as raw JSON documents #13425
Merged
SyntaxColoring
merged 37 commits into
chore_release-7.0.0
from
performance_testing_analyses_as_opaque_documents
Sep 1, 2023
Merged
Changes from 12 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
bc0abd4
Hack up some performance tests.
SyntaxColoring 2bb3af4
temporarily remove tracking from run card, and check equipment from a…
b-cooper 341eaf7
server initializing empty state for recent run protocol card
b-cooper 5c4bcb7
remove old data fetching comments from required hardware hook
b-cooper 6e3a261
Delete benchmarking script.
SyntaxColoring 5cb7f3d
Merge branch 'chore_release-7.0.0' into performance_testing_analyses_…
SyntaxColoring 0db671d
Add a migration to add the new column.
SyntaxColoring 5965e92
Try to migrate records eagerly.
SyntaxColoring aeb5012
refactor useMostRecentCompletedAnalysis to use asDocument endpoint
b-cooper 7c0f29d
back off the top level maintenance run poll a bit
b-cooper 09eaf6e
Add a Tavern test for the analysis endpoints.
SyntaxColoring 5d83c8b
Tweak serialization configurables to match what we normally do throug…
SyntaxColoring 007d53e
Add endpoint docs and fix Content-Type header.
SyntaxColoring 1211d1c
Unrelated test fixups.
SyntaxColoring 9bc8b91
Add CompletedAnalysisStore unit tests.
SyntaxColoring 0bcbb3e
Fix edge case with potentially NULL documents.
SyntaxColoring 11c534f
update all instances of analyses query to as doc
b-cooper d2c4b04
undo problematic useprotocoldetailsforrun test fix
b-cooper f890c9f
fix up test for use protocol details for run
b-cooper b413c88
fix up formatting and tests
b-cooper 00e9f0d
Import fixup.
SyntaxColoring 1807fb7
Add checks for new endpoint in persistence test.
SyntaxColoring 690d406
Add checks for new endpoint in persistence snapshot compatibility test.
SyntaxColoring 954287e
Describe confusing schema stamp behavior.
SyntaxColoring 67ecc5f
Simpler solution for the upgrade-downgrade-upgrade edge case.
SyntaxColoring 8d62ad3
Document column data types.
SyntaxColoring 2a4c36f
Format 'n lint.
SyntaxColoring afa7124
Update test_tables.py.
SyntaxColoring 663f6d8
Delete test_migrations.py. :o
SyntaxColoring a639e8e
Note potential future trap with _systemd_notify().
SyntaxColoring 9296728
Raise 404 if the given analysis is still pending.
SyntaxColoring ae61097
Minor fixups to comments and formatting.
SyntaxColoring 593d509
we are all children of the machine. the machine takes care of us.
SyntaxColoring 9ebe737
Bump copmatibility tests' startup timeouts, for CI.
SyntaxColoring ab8adac
Add missing router tests.
SyntaxColoring fe9adcc
Fix test docstrings.
SyntaxColoring 6375ed1
It would help if I applied the increased timeout to the correct file.
SyntaxColoring File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { GET, request } from '../request' | ||
|
||
import type { ResponsePromise } from '../request' | ||
import type { HostConfig } from '../types' | ||
import type { CompletedProtocolAnalysis } from '@opentrons/shared-data' | ||
|
||
export function getProtocolAnalysisAsDocument( | ||
config: HostConfig, | ||
protocolId: string, | ||
analysisId: string | ||
): ResponsePromise<CompletedProtocolAnalysis> { | ||
return request<CompletedProtocolAnalysis>( | ||
GET, | ||
`/protocols/${protocolId}/analyses/${analysisId}/asDocument`, | ||
null, | ||
config | ||
) | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
app/src/organisms/OnDeviceDisplay/RobotDashboard/ServerInitializing.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import * as React from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
import { | ||
Flex, | ||
DIRECTION_COLUMN, | ||
ALIGN_CENTER, | ||
COLORS, | ||
JUSTIFY_CENTER, | ||
TYPOGRAPHY, | ||
BORDERS, | ||
Icon, | ||
SPACING, | ||
} from '@opentrons/components' | ||
|
||
import { StyledText } from '../../../atoms/text' | ||
|
||
export function ServerInitializing(): JSX.Element { | ||
const { t } = useTranslation('device_details') | ||
return ( | ||
<Flex | ||
alignItems={ALIGN_CENTER} | ||
backgroundColor={COLORS.darkBlack20} | ||
flexDirection={DIRECTION_COLUMN} | ||
height="27.25rem" | ||
justifyContent={JUSTIFY_CENTER} | ||
borderRadius={BORDERS.borderRadiusSize3} | ||
gridGap={SPACING.spacing32} | ||
> | ||
<Icon name="ot-spinner" spin size="6rem" color={COLORS.darkBlack70} /> | ||
<StyledText | ||
as="h4" | ||
fontWeight={TYPOGRAPHY.fontWeightRegular} | ||
color={COLORS.darkBlack70} | ||
> | ||
{t('robot_initializing')} | ||
</StyledText> | ||
</Flex> | ||
) | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
26 changes: 26 additions & 0 deletions
26
react-api-client/src/protocols/useProtocolAnalysisAsDocumentQuery.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { UseQueryResult, useQuery } from 'react-query' | ||
import { getProtocolAnalysisAsDocument } from '@opentrons/api-client' | ||
import { useHost } from '../api' | ||
import type { HostConfig } from '@opentrons/api-client' | ||
import type { UseQueryOptions } from 'react-query' | ||
import { CompletedProtocolAnalysis } from '@opentrons/shared-data' | ||
|
||
export function useProtocolAnalysisAsDocumentQuery( | ||
protocolId: string | null, | ||
analysisId: string | null, | ||
options?: UseQueryOptions<CompletedProtocolAnalysis> | ||
): UseQueryResult<CompletedProtocolAnalysis | null> { | ||
const host = useHost() | ||
const query = useQuery<CompletedProtocolAnalysis>( | ||
[host, 'protocols', protocolId, 'analyses', analysisId], | ||
() => | ||
getProtocolAnalysisAsDocument( | ||
host as HostConfig, | ||
protocolId as string, | ||
analysisId as string | ||
).then(response => response.data), | ||
options | ||
) | ||
|
||
return query | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backing off this refetch interval to a slower poll. There are separate interval instantiated within wizards where we need more up to date info