hellofresh / kangal

Run performance tests in Kubernetes cluster with Kangal
Apache License 2.0
161 stars 22 forks source link

Investigate why JobStatus is not persisted for LoadTest resources #195

Open lucasmdrs opened 2 years ago

lucasmdrs commented 2 years ago

We have experienced before some loadTestStatus.JobStatus not being persisted after we process the object in SyncStatus.

That require us to process the finished loadTest object every time in SyncStatus to update loadTestStatus.JobStatus and check if it can be deleted or not.

Further investigation is required to understand why UpdateStatus doesn’t save the updated status.

Example:

Screenshot
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

amandahla commented 2 years ago

I'm not sure if this could be a solution but I made a test changing the loadtest CRD to something like that (not exactly JobStatus) then it was updated.

jobStatus:
                      type: object
                      properties:
                        conditions:
                          type: object
                        startTime:
                          type: string
                        completionTime:
                          type: string
                        active:
                          type: integer
                          format: int32
                          title: |-
                            The number of actively running pods.
                            +optional
                        succeeded:
                          type: integer
                          format: int32
                          title: |-
                            The number of pods which reached phase Succeeded.
                            +optional
                        failed:
                          type: integer
                          format: int32
                          title: |-
                            The number of pods which reached phase Failed.
                            +optional
                      description: JobStatus represents the current state of a Job.
...
status:
  jobStatus:
    active: 1
    startTime: "2022-06-08T19:41:51Z"
  namespace: loadtest-plundering-rabbit
  phase: running