Repository navigation
feat(clusters): label Operator updates in deployment history - #3098
Conversation
|
View your CI Pipeline Execution ↗ for commit 44e1b6b
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## staging #3098 +/- ##
===========================================
- Coverage 53.79% 51.51% -2.29%
===========================================
Files 915 1382 +467
Lines 23295 30853 +7558
Branches 7238 9077 +1839
===========================================
+ Hits 12532 15894 +3362
- Misses 8706 12422 +3716
- Partials 2057 2537 +480
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
All reported issues were addressed across 15 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Bump qovery-typescript-axios to 1.1.1007 for the new `operation` field on ClusterDeploymentHistory. An Operator update now reads "Operator" (hover tooltip "Operator update") instead of "Deploy" in the cluster deployment list and the last-deployment section, and gets an "Operator update" badge in the deployment logs header. The last-deployment section only trusts `operation` when the history entry matches the cluster status's last execution. The audit logs suffix cluster events whose change carries `operation: OPERATOR_UPDATE` with "· Operator update", with the full label in a tooltip since the event column truncates. DeploymentAction gains an optional `label` override so the Operator action reuses its markup. The Status cell's action group can now wrap so badges never overlap the status icon.
b310958 to
358a277
Compare
| <div className={twMerge('flex items-center gap-2 text-sm', className)}> | ||
| <span className={iconClassName}>{action.icon}</span> | ||
| <span className={twMerge('text-neutral', textClassName)}>{action.status}</span> | ||
| <span className={twMerge('text-neutral', textClassName)}>{label ?? action.status}</span> |
There was a problem hiding this comment.
Could we avoid overriding just the label here? The icon still comes from status, so the two can get out of sync. I'd rather resolve the label and icon together for an Operator update
There was a problem hiding this comment.
Done: DeploymentAction takes operation and resolves label, icon and description together. The label override is gone.
| return ( | ||
| <Tooltip content="Operator update"> | ||
| <div> | ||
| <DeploymentAction status={status} label="Operator" /> |
There was a problem hiding this comment.
Do we need another component just to override the label and add a tooltip? Could we handle deployment operations in one place, keeping the action name, icon and description consistent?
There was a problem hiding this comment.
Removed ClusterDeploymentAction, it's all in DeploymentAction now.
| return eventName.split('_').map(upperCaseFirstLetter).join(' ') | ||
| } | ||
|
|
||
| const isOperatorUpdateEvent = ({ target_type, change }: OrganizationEventResponse) => { |
There was a problem hiding this comment.
Could we expose operation directly on the audit event through the API, like we do for deployment history, instead of parsing change on the frontend?
There was a problem hiding this comment.
Agreed. I removed the audit logs from this PR; we'll add an OPERATOR_UPDATE audit event type in q-core and redo it on top.
| <span className="block truncate whitespace-nowrap"> | ||
| <span className={isEventTypeFailed ? 'text-negative' : 'text-brand'}> | ||
| {formatEventName(event.event_type ?? '')} | ||
| <Tooltip content={`${eventName} · Operator update`} disabled={!isOperatorUpdate}> |
There was a problem hiding this comment.
Could we build the full event label once and reuse it for the text and tooltip? Right now, “Operator update” is handled separately in both places
There was a problem hiding this comment.
Gone with the audit logs part, will be handled in the follow-up.
|
|
||
| return ( | ||
| <Tooltip content="Operator update"> | ||
| <div> |
There was a problem hiding this comment.
The tooltip only opens on hover. Could we also make it accessible when the row or link is focused with the keyboard?
There was a problem hiding this comment.
Tooltip removed. "Operator update" is now screen-reader text in the action, so it's part of the row and card link name.
DeploymentAction takes the cluster deployment `operation` and resolves the label, icon and screen-reader description in one place: an Operator update reads "Operator" with the rotate-right icon and "Operator update" as sr-only text. This replaces the ClusterDeploymentAction wrapper, its tooltip and the `label` override. The audit-logs labelling is dropped from this PR; it will come back once the API exposes `operation` on audit events.
Summary
q-core now returns
operation(CLUSTER|OPERATOR_UPDATE) on cluster deployment history entries. A Qovery Operator update on a BYOK / EKS Anywhere cluster no longer looks like a plain cluster deploy.qovery-typescript-axios1.1.1004 → 1.1.1007.DeploymentActiontakes an optionaloperationand resolves label, icon and description together: an Operator update reads Operator with therotate-righticon, and "Operator update" as screen-reader text. Other call sites are unchanged.last_execution_id.operationon audit events.Screenshots / Recordings
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-releaseSummary by cubic
Labels Operator updates in cluster deployment history so they no longer read as regular "Deploy" actions. Bumps
qovery-typescript-axiosto 1.1.1007 for the newoperationfield onClusterDeploymentHistory, andDeploymentActionnow resolves the Operator label, icon, and screen-reader text in one place.operationwhen the history entry's execution ID doesn't match the cluster status's last execution.DeploymentActiontakesoperationand resolves the label, icon, and description itself; the Status cell's action group can wrap so badges never overlap the status icon.Written for commit 44e1b6b. Summary will update on new commits.