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

Strictnullchecks 1 #1140

Merged
merged 39 commits into from
Dec 2, 2024
Merged

Strictnullchecks 1 #1140

merged 39 commits into from
Dec 2, 2024

Conversation

Richard87
Copy link
Contributor

No description provided.

@Richard87 Richard87 self-assigned this Nov 20, 2024
@Richard87 Richard87 linked an issue Nov 20, 2024 that may be closed by this pull request
@Richard87 Richard87 marked this pull request as draft November 22, 2024 14:49
# Conflicts:
#	src/components/app-overview/index.tsx
#	src/components/async-resource/async-resource.tsx
#	src/components/component/dns-aliases.tsx
#	src/components/create-job-form/index.tsx
#	src/components/create-job-form/pipeline-form-build-branches.tsx
#	src/components/create-job-form/use-get-application-branches.ts
#	src/components/environments-summary/environment-ingress.tsx
#	src/components/environments-summary/index.tsx
#	src/components/page-configuration/index.tsx
@Richard87 Richard87 requested a review from satr November 28, 2024 09:59
@Richard87 Richard87 marked this pull request as ready for review November 28, 2024 10:04
ended,
}) => {
type DurationProps = { started: Date; ended?: Date };
const ReplicaDuration = ({ started, ended }: DurationProps) => {
Copy link
Contributor

@satr satr Nov 29, 2024

Choose a reason for hiding this comment

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

Replica started is another field startTime. So technically it is created

started={new Date(replica.created)}

For component

func GetReplicaSummary(pod corev1.Pod, lastEventWarning string) ReplicaSummary {
...
	creationTimestamp := pod.GetCreationTimestamp()
	replicaSummary.Created = radixutils.FormatTimestamp(creationTimestamp.Time)

For job pod

func GetReplicaSummaryByJobPodStatus(radixBatchJob radixv1.RadixBatchJob, jobPodStatus radixv1.RadixBatchJobPodStatus) models.ReplicaSummary {
	summary := models.ReplicaSummary{
		Name:          jobPodStatus.Name,
		Created:       utils.FormatTimestamp(jobPodStatus.CreationTime.Time),
...
	}
	if jobPodStatus.StartTime != nil {
		summary.StartTime = utils.FormatTimestamp(jobPodStatus.StartTime.Time)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I see what you mean, but wanted all the Duration components to have the same API, and felt that it didn't need to know anything about replica status or where its used :)

src/store/ms-graph-api.ts Outdated Show resolved Hide resolved
src/store/ms-graph-api.ts Outdated Show resolved Hide resolved
satr
satr previously approved these changes Nov 29, 2024
Copy link
Contributor

@satr satr left a comment

Choose a reason for hiding this comment

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

Couple suggestions

Co-authored-by: Sergey Smolnikov <ssmol@equinor.com>
Richard87 and others added 2 commits December 2, 2024 08:34
@Richard87 Richard87 merged commit 48b6fc1 into master Dec 2, 2024
5 checks passed
@Richard87 Richard87 deleted the strictnullchecks-1 branch December 2, 2024 08:45
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.

Enable strict null checks in Typescript
2 participants