dosubot[bot] commented on issue #8629: URL: https://github.com/apache/incubator-devlake/issues/8629#issuecomment-3473787684
<!-- Answer --> This is a confirmed critical bug: the GitHub plugin's release converter crashes with a nil pointer dereference when processing releases where `PublishedAt` is nil, typically for draft releases. The root cause is the absence of a nil check before dereferencing `PublishedAt` in the converter function, despite a SQL filter intended to exclude such cases. This leads to 100% pipeline failure for affected repositories. The recommended and widely accepted fix is to add a nil check before dereferencing the pointer, skipping releases where `PublishedAt` is nil (i.e., draft releases) to prevent the panic and ensure pipeline stability. This approach is consistent with defensive programming best practices in Go and is supported by related issues and discussions in the project, which highlight similar patterns and fixes for nullable fields in other plugins as well ([source](https://github.com/apache/incubator-devlake/issues/8624), [source](https://github.com/apache/incubator-devlake/issues/8442), [source](https://github.com/apache/incubator-devlake/issues/8309)). There is no project documentation specifically covering best practices for handling nullable fields or defensive programming in Go, but the consensus in the codebase and issue tracker is to always check for nil before dereferencing pointers, especially when dealing with data from external APIs or databases that may be inconsistent. <!-- 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/81a4e5ba-da32-4a4d-b355-33d9de536ff9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/81a4e5ba-da32-4a4d-b355-33d9de536ff9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/81a4e5ba-da32-4a4d-b355-33d9de536ff9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/81a4e5ba-da32-4a4d-b355-33d9de536ff9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/81a4e5ba-da32-4a4d-b355-33d9de536ff9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/81a4e5ba-da32-4a4d-b355-33d9de536ff9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/81a4e5ba-da32-4a4d-b355-33d9de536ff9?feedback_type=other)</sup> [](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8629) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
