You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Github] Incorrect datetime value: '0000-00-00' for column 'started_at' #8442
I had searched in the issues and found no similar issues.
What happened
When running the pipeline against a github repo that was working normally, this started to appear. I don't know why this started. The other repos here (5+) are all working fine.
What do you expect to happen
I would expect this not to happen.
How to reproduce
I do not know how to reproduce it. The other projects are not having this error.
Hello @gbrancaglione! I'm here to help you tackle any bugs, answer questions, and assist you in becoming a contributor while you wait for a human maintainer. Let's get to the bottom of this! 🤖
The MySQL error "Incorrect datetime value: '0000-00-00' for column 'started_at'" is likely caused by the StartedAt field in the DbCheckRun struct being set to a zero date value ('0000-00-00'). MySQL does not accept '0000-00-00' as a valid date unless the SQL mode is configured to allow it, which is not the default behavior.
To resolve this issue, ensure that the StartedAt field is initialized with a valid datetime value before it is inserted into the database. You can add a check in the Extract function to handle cases where checkRun.StartedAt is '0000-00-00' and set it to a valid default datetime or handle it according to your application's requirements. Here's a code snippet to handle this:
ifcheckRun.StartedAt=="0000-00-00" {
checkRun.StartedAt="1970-01-01"// or any other default valid datetime
}
This check should be added before the githubJob struct is created in the Extract function [1].
Maybe we should skip those records without started_at value? What do you guys think.
That sounds good. Is it possible to configure somehow directly while importing records? I've set 'skip failed tasks' after the initial sync and increased timeline from "last 14 days" to "last year". While showing 'partial success' in tasks it still doesn't update values in grafana dashboards (they show last 14 days).
What extra steps can I take to load only what loads correctly and see the full picture? Thank you in advance for your support
@jekader It’s a bit unconventional to have a v1.0.4-alpha change released into a v1.0.3-betax version, since it mixes versions in a way that could be confusing. That said, I’m open to it if everyone else is aligned.
@petkostasI
recommend including this fix in the v1.0.3 release line since it's currently in beta. Using v1.0.4-alpha for this change was likely premature given our release schema:
I think I found the root cause of why some people still see the issue while it is reported as fixed: older installations use GitHub API to scrub data while GraphQL is used by default on new blueprints and this is what #8583 fixed.
There is no way to set the backend from the UI - removed in #7784 so existing pipelines still use the deprecated backend.
I updated the DB manually to get around this: UPDATE lake._tool_github_connections SET enable_graphql=1;
Will open an issue proposing always using GraphQL regardless of what the DB says.
Activity
dosubot commentedon May 15, 2025
Hello @gbrancaglione! I'm here to help you tackle any bugs, answer questions, and assist you in becoming a contributor while you wait for a human maintainer. Let's get to the bottom of this! 🤖
The MySQL error "Incorrect datetime value: '0000-00-00' for column 'started_at'" is likely caused by the
StartedAtfield in theDbCheckRunstruct being set to a zero date value ('0000-00-00'). MySQL does not accept '0000-00-00' as a valid date unless the SQL mode is configured to allow it, which is not the default behavior.To resolve this issue, ensure that the
StartedAtfield is initialized with a valid datetime value before it is inserted into the database. You can add a check in theExtractfunction to handle cases wherecheckRun.StartedAtis '0000-00-00' and set it to a valid default datetime or handle it according to your application's requirements. Here's a code snippet to handle this:This check should be added before the
githubJobstruct is created in theExtractfunction [1].To reply, just mention @dosu.
Docs are dead. Just use Dosu.
klesh commentedon May 16, 2025
Try the latest beta. https://github.com/apache/incubator-devlake/releases/tag/v1.0.2-beta8
zvika-finally commentedon May 19, 2025
This bug is related to #8214. It is solved, but it is not associated with any version. What's the procedure for adding it to a release?
Joerg-Tech commentedon Jun 6, 2025
We've the same issue.
Would be nice to know for sure, which version or release-candidate will contain the fix.
vadim-ilchenko commentedon Jun 6, 2025
It fixed the initial sync (latest 14 days), but then I tried to get older data (last year) and it started failing again. Even in
v1.0.2-beta8klesh commentedon Jun 9, 2025
Maybe we should skip those records without
started_atvalue?What do you guys think.
vadim-ilchenko commentedon Jun 9, 2025
That sounds good. Is it possible to configure somehow directly while importing records? I've set 'skip failed tasks' after the initial sync and increased timeline from "last 14 days" to "last year". While showing 'partial success' in tasks it still doesn't update values in grafana dashboards (they show last 14 days).
What extra steps can I take to load only what loads correctly and see the full picture? Thank you in advance for your support
dsiebel commentedon Jun 23, 2025
I can confirm this issue still exists in
v1.0.2-beta9.Brend-Smits commentedon Jul 2, 2025
Also still exists in
v1.0.3-beta1.Can we skip records for now that have invalid date time?
fix(github): skip jobs with no started_at in cicd_job_convertor
Brend-Smits commentedon Jul 2, 2025
I've opened a small PR with your proposed fix, would you be able to have a look at that please?
#8488
klesh commentedon Jul 7, 2025
@Brend-Smits . Good job, thanks for the PR.
29 remaining items
d4x1 commentedon Oct 15, 2025
I think you can release a v1.0.4-alpha1 on the main branch if possible. @petkostas
jekader commentedon Oct 15, 2025
Is there anything preventing the fix from landing in 1.0.3?
petkostas commentedon Oct 15, 2025
@jekader It’s a bit unconventional to have a
v1.0.4-alphachange released into av1.0.3-betaxversion, since it mixes versions in a way that could be confusing. That said, I’m open to it if everyone else is aligned.klesh commentedon Oct 16, 2025
@petkostasI
recommend including this fix in the v1.0.3 release line since it's currently in beta. Using v1.0.4-alpha for this change was likely premature given our release schema:
v1.0.3-beta1 → v1.0.3-beta2 → ... → v1.0.3 (stable) → v1.0.4-alpha → ...
petkostas commentedon Oct 20, 2025
Since
v1.3.0-beta7was released I will be closing this ticket! Kudos to @d4x1 🙏🏼ederevea commentedon Oct 20, 2025
Deployed
docker.io/apache/devlake:v1.0.3-beta7and still getting the same error with GitHub:Is there anything specific that needs to be configured for this to go away?
karl-d commentedon Oct 28, 2025
I have also deployed
devlake.docker.scarf.sh/apache/devlake:v1.0.3-beta7and am still receiving the same error.This is the value it is trying to insert for the
started_at0000-00-00 00:00:00Joerg-Tech commentedon Oct 30, 2025
We've updated to v1.0.3-beta7 and the error is gone.
Thanks a lot for your work!
GGurbanov commentedon Nov 18, 2025
I've tried both
v1.0.3-beta7&v1.0.3-beta8and the error is still therejekader commentedon Nov 18, 2025
I can confirm that we still see this bug on both
v1.0.3-beta7andv1.0.3-beta8@petkostas should we reopen this one or open a new issue tracker?
jekader commentedon Dec 16, 2025
I think I found the root cause of why some people still see the issue while it is reported as fixed: older installations use GitHub API to scrub data while GraphQL is used by default on new blueprints and this is what #8583 fixed.
There is no way to set the backend from the UI - removed in #7784 so existing pipelines still use the deprecated backend.
I updated the DB manually to get around this:
UPDATE lake._tool_github_connections SET enable_graphql=1;Will open an issue proposing always using GraphQL regardless of what the DB says.
klesh commentedon Dec 18, 2025
Perhaps we should add a migration script for that.
fix(github): skip jobs with no started_at in cicd_job_convertor (apac…