Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][Github] Pipelines failing on converting issue to incident #8122

Closed
2 of 3 tasks
sanjchhoker opened this issue Oct 1, 2024 · 11 comments
Closed
2 of 3 tasks

[Bug][Github] Pipelines failing on converting issue to incident #8122

sanjchhoker opened this issue Oct 1, 2024 · 11 comments
Labels
devops Something about CI/CD (devops) type/bug This issue is a bug

Comments

@sanjchhoker
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Pipelines only using github integration is failing consistently with below on dora step.
Checked database and we have nothing in incident table.

IMG_8431

What do you expect to happen

Pipeline should run successfully

How to reproduce

Run pipeline with a github connection.

Anything else

No response

Version

v1.0.1

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@sanjchhoker sanjchhoker added the type/bug This issue is a bug label Oct 1, 2024
Copy link

dosubot bot commented Oct 1, 2024

The issue with the GitHub integration pipelines failing at the "ConvertIssuesToIncidents" step in version v1.0.1 is due to the database schema not supporting the "INCIDENT" type in the "type" column of the "issues" table. The code expects this type to exist, and if it's missing, it causes the pipeline to fail [1].

To resolve this, ensure that the database schema is updated to include the "INCIDENT" type for the "type" column in the "issues" table. This should allow the pipeline to run successfully.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the devops Something about CI/CD (devops) label Oct 1, 2024
@sanjchhoker
Copy link
Author

@dosu The type column is set to varchar(100) so not sure what does INCIDENT type mean.

Copy link

dosubot bot commented Oct 1, 2024

The "INCIDENT" type in the context of the "type" column set to varchar(100) refers to an issue that is a bug found after release. It is one of the standardized types used to categorize issues in Apache DevLake. The other standard types are "REQUIREMENT" for features and "BUG" for bugs found during testing [1].

To continue talking to Dosu, mention @dosu.

@sanjchhoker
Copy link
Author

@dosu what will then be the column type for type column in issues table?

Copy link

dosubot bot commented Oct 1, 2024

The column type for the "type" column in the "issues" table should be varchar with a length of 100 [1].

To continue talking to Dosu, mention @dosu.

@sanjchhoker
Copy link
Author

@dosu this is what it is present then not sure what is the cause of failing pipeline

Copy link

dosubot bot commented Oct 1, 2024

The pipeline failure might be due to other issues beyond the column type. Here are some potential causes:

  1. Database Schema: Ensure that the database schema is correctly set up to recognize the "INCIDENT" type. There might be missing migrations or setup steps.

  2. SQL Errors: Check for any SQL errors related to the "INCIDENT" type. The error log you mentioned indicates a missing column, which might be due to incorrect SQL queries or missing migrations.

  3. Code Logic: Verify the logic in the ConvertIssuesToIncidents step. There might be conditions or checks that are not met, leading to failures [1].

  4. Dependencies: Ensure all dependencies and prerequisites for the ConvertIssuesToIncidents step are fulfilled, such as data related to users and teams [2].

Review these areas to identify the root cause of the failure.

To continue talking to Dosu, mention @dosu.

@sanjchhoker
Copy link
Author

Resolved this by adding below columns
incident in issues
incident in issue_assignees
boards in project_mapping

@kgalli
Copy link

kgalli commented Nov 27, 2024

I ran into exactly this problem with version 1.0.1 using Postgres. I did not ran into this issue with MySQL. As I have to use Postgres in my environment can you provide some hints if this is a recent bug and if this is supposed to be fixed. From the previous comment I only get that certain columns are added to certain tables but I can not see any PR related which addresses this.

See some part of the error message I get in the logs:

ERROR: column \"INCIDENT\" does not exist (SQLSTATE 42703)\n\x1b[0m\x1b[33m[0.210ms] \x1b[34;1m[rows:0]\x1b[0m \n\t\tDELETE\n\t\tFROM incidents

I'm happy to provide a PR I just need to understand if this is supposed to be already fixed or if the mentioned tables have to be patched. I also wonder why this is working on MySQL. Maybe there are some migrations to fix? Any hint would be much appreciated and I'm happy to support to get things fixed. I just need a starting point.

UPDATE:

I updated from v1.0.0 that is why it worked with MySQL. So it also fails with MySQL and it is not a Postgres only issue. This seems to be a major issue for people using GitHub. Do you see the option to point the user docs to version 1.0.0. I moved to version 1.0.1 because of the banner in the doc

Screenshot 2024-11-27 at 16 22 13

@vateseeb
Copy link

We are facing the same issue after the upgrade to v1.0.1. We use Postgres as well and the Azure DevOps connection.
The last step of the pipeline fails when trying to delete previous incidents:
image

We tried to add the columns manually as mentioned by @sanjchhoker but still the same error.

Resolved this by adding below columns incident in issues incident in issue_assignees boards in project_mapping

@vateseeb
Copy link

vateseeb commented Dec 2, 2024

@kgalli I think the issue was fixed with this PR #8163 and it is included in the release v1.0.2-beta4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops Something about CI/CD (devops) type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

3 participants