dosubot[bot] commented on issue #8490: URL: https://github.com/apache/incubator-devlake/issues/8490#issuecomment-3033454276
<!-- Greeting --> Hi @dameeks! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the incubator-devlake team. <!-- Answer --> This error happens because the GitHub data collector is encountering an invalid datetime value ('0000-00-00') for the started_at field, which MySQL (in strict mode) rejects as invalid. The code that extracts and processes GitHub job data does not currently sanitize or filter out these invalid datetime values—if the GitHub API returns a bad or missing date, it can propagate through and cause this MySQL error during insertion. There are no built-in guards for this in the GitHub job extraction logic, unlike other parts of the codebase that use custom time types to skip invalid dates ([reference](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/plugins/github/tasks/cicd_job_extractor.go), [reference](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/core/models/common/cst_time.go)). Upgrading from 1.0.0 to 1.0.2 does not resolve this because there have been no recent changes or fixes related to datetime handling in this area. To work around this, you could: (1) check your MySQL configuration and, if possible, temporarily relax strict mode (not recommended for production), or (2) patch the extraction code to skip or default invalid dates before inserting into the database. If you want to pursue the code patch, look for where started_at is set in the GitHub job extraction and add a check to ignore or replace '0000-00-00' values before saving to the DB. Let me know if you want more detailed guidance on where to add this check in the code. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/a3fbc4e3-2f82-45ff-b121-2a80fa2bd093?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a3fbc4e3-2f82-45ff-b121-2a80fa2bd093?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a3fbc4e3-2f82-45ff-b121-2a80fa2bd093?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a3fbc4e3-2f82-45ff-b121-2a80fa2bd093?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a3fbc4e3-2f82-45ff-b121-2a80fa2bd093?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a3fbc4e3-2f82-45ff-b121-2a80fa2bd093?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a3fbc4e3-2f82-45ff-b121-2a80fa2bd093?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8490) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org