-
Notifications
You must be signed in to change notification settings - Fork 59
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
Eugene/task version #456
Eugene/task version #456
Conversation
Codecov Report
@@ Coverage Diff @@
## devmain #456 +/- ##
===========================================
+ Coverage 67.27% 70.58% +3.30%
===========================================
Files 405 412 +7
Lines 9465 9601 +136
Branches 1606 1624 +18
===========================================
+ Hits 6368 6777 +409
+ Misses 3097 2824 -273
Continue to review full report at Codecov.
|
packages/zapp/console/src/components/Entities/EntityVersionDetails.tsx
Outdated
Show resolved
Hide resolved
packages/zapp/console/src/components/hooks/Entity/useEntityVersions.ts
Outdated
Show resolved
Hide resolved
packages/zapp/console/src/components/Executions/Tables/WorkflowVersionsTable.tsx
Outdated
Show resolved
Hide resolved
packages/zapp/console/src/components/Entities/EntityDetailsHeader.tsx
Outdated
Show resolved
Hide resolved
return usePagination<EntityType, IdentifierScope>( | ||
{ ...config, cacheItems: true, fetchArg: scope }, | ||
entityFunctions[(scope as Identifier)?.resourceType ?? Core.ResourceType.UNSPECIFIED] | ||
.listEntity, |
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.
is listEntity always guaranteed to be present?
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.
throw an error if not present
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.
do we need to use xx.lisrEntity ?? someDefaultValue
or wrap it with try/catch?
@@ -12,8 +13,9 @@ const decodedClosure = Admin.TaskClosure.create( | |||
const taskId: (name: string, version: string) => Identifier = (name, version) => ({ | |||
name, | |||
version, | |||
project: 'flyte', | |||
domain: 'development', | |||
project: testProject, |
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.
no-op: nice!
@@ -77,7 +79,7 @@ export const EntityExecutions: React.FC<EntityExecutionsProps> = ({ | |||
return ( | |||
<> | |||
<Typography className={styles.header} variant="h6"> | |||
All Executions in the Workflow | |||
{t('allExecutionsChartTitle', entityStrings[id.resourceType])} |
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.
nit: @anrusina to weigh in here. I like going through strings to do this, however piecing strings like this is not the most localization friendly for the future. What do you think?
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.
Agree with Carina! As resourceType will always be in English, so when strings would be translated it would contain a mix of two languages, which is not ok. Also often when you translate sentence to a different language the words location is changed, for example "yet" word in Russian is moved between you and slept:
ENG: Have you slept yet?
RUS: Ты уже спал?
Please use patternKey for strings like this. Sample label: t(patternKey('tableLabel', 'name')),
Here you will use as
{t(patternKey('allExecutionsChartTitle', entityStrings[id.resourceType]))}
In string file:
"allExecutionsChartTitle_": "Default string if entityStrings[id.resourceType] is null or undefined"
"allExecutionsChartTitle_Workflow": "String for Workflow"
"allExecutionsChartTitle_Tasks" : "String for Tasks"
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.
I see that you probably used as example other string, found few other instances not created by you. Will cleanup them separately :)
Few comments regarding styling and code reuse |
packages/zapp/console/src/components/Entities/EntityVersionDetails.tsx
Outdated
Show resolved
Hide resolved
packages/zapp/console/src/components/Entities/EntityVersionDetails.tsx
Outdated
Show resolved
Hide resolved
packages/zapp/console/src/components/Entities/test/EntityDetails.test.tsx
Outdated
Show resolved
Hide resolved
return usePagination<EntityType, IdentifierScope>( | ||
{ ...config, cacheItems: true, fetchArg: scope }, | ||
entityFunctions[(scope as Identifier)?.resourceType ?? Core.ResourceType.UNSPECIFIED] | ||
.listEntity, |
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.
do we need to use xx.lisrEntity ?? someDefaultValue
or wrap it with try/catch?
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.
Mainly nits.
The string need to be updates, gave a sample implementation to Carina's comment
cool will fix it with next pr with the versions detail complete |
4dc7232
to
b76d4ea
Compare
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.
Mainly nits, One or two comments required fix.
It also has a big drop in test coverage.. Can you please work on increasing t for files you worked with? You can see missed checks in PR marked with notifications as:
Or you can run yarn test-coverage
and than open coverage info in browser. For me it's file:///Users/narusina/prj/flyte/flyteconsole/.coverage/index.html
- You can find you relative path.
Otherwise LGTM
packages/zapp/console/src/components/Entities/EntityDescription.tsx
Outdated
Show resolved
Hide resolved
packages/zapp/console/src/components/Entities/VersionDetails/EntityVersionDetails.tsx
Outdated
Show resolved
Hide resolved
packages/zapp/console/src/components/Entities/VersionDetails/EntityVersionDetails.tsx
Outdated
Show resolved
Hide resolved
launchStrings: (typeString: string) => `Launch ${startCase(typeString)}`, | ||
noDescription: (typeString: string) => `This ${typeString} has no description.`, | ||
noSchedules: (typeString: string) => `This ${typeString} has no schedules.`, | ||
launchStrings_workflow: launchStrings('Workflow'), |
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.
nit: in real string files ready for localization we would never have functions inside, so ideally This Workflow has no schedules.
should be used here and below instead of launchStrings('Workflow')
.
Mainly note for future, as we anyway would need tp go though all our files before we will be ready to add real localization support.
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.
ohhh. I see now. that makes sense will fix it
...zapp/console/src/components/Executions/ExecutionDetails/NodeExecutionDetailsPanelContent.tsx
Outdated
Show resolved
Hide resolved
7bb8253
to
22e0130
Compare
Signed-off-by: eugenejahn <[email protected]>
22e0130
to
9494fb8
Compare
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.
LGTM, Nice Work
🚀
feat: task version details Signed-off-by: eugenejahn <[email protected]>
TL;DR
Task Details Page:
https://localhost.demo.nuclyde.io:3000/projects/flytesnacks/domains/development/tasks/athena.athena.print_athena_schema?duration=all
Task Version Details Page:
https://localhost.demo.nuclyde.io:3000/projects/flytesnacks/domains/development/task/athena.athena.print_athena_schema/version/katrinathena6
Task Details Link in Executions Details Page
https://localhost.demo.nuclyde.io:3000/projects/flytesnacks/domains/development/executions/ei0ud0veie?duration=all
Type
Are all requirements met?
Complete description
Tracking Issue
Remove the 'fixes' keyword if there will be multiple PRs to fix the linked issue
fixes https://github.com/flyteorg/flyteconsole/issues/448
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/