Skip to content

fix: make FinishTime optional for unfinished builds#7401

Merged
klesh merged 1 commit into
apache:mainfrom
mr-ks:fix-7369
Apr 28, 2024
Merged

fix: make FinishTime optional for unfinished builds#7401
klesh merged 1 commit into
apache:mainfrom
mr-ks:fix-7369

Conversation

@mr-ks
Copy link
Copy Markdown
Contributor

@mr-ks mr-ks commented Apr 27, 2024

Summary

Builds in progress do not have a finish time set, causing an internal server error when the plugin attempts to write "0000-00-00" into the database. To address this issue, the FinishTime field of the Build API response struct is changed from time.Time to a pointer value *time.Time.

The build duration is calculated only when FinishTime is set, otherwise it is set to 0.0.

Does this close any open issues?

Closes #7369

Builds in progress do not have a finish time set, causing an internal server error when the plugin attempts to write "0000-00-00" into the database. To address this issue, the FinishTime field of the Build API response struct is changed from `time.Time` to a pointer value `*time.Time`.
Copy link
Copy Markdown
Contributor

@klesh klesh left a comment

Choose a reason for hiding this comment

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

LGTM, Nice work.

@klesh klesh merged commit 9542510 into apache:main Apr 28, 2024
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.

[Bug][azuredevops_go] Incorrect datetime value: '0000-00-00' for column 'finish_time'

2 participants