Gitea API: trailing None transaction from issue #76

Closed
opened 2024-01-12 15:05:29 +01:00 by Dalai Felinto · 4 comments

If I request the timeline (all the transactions) from the issue 116097

I get a None transaction element (full json attached):

[ {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, null ]

I can just ignore this on the metrics script. But I wanted to check if this is the expected behaviour. My guess is that the user mis-referenced this issue on a different one, and remove their comment (or edited?).

If I request the [timeline](https://projects.blender.org/api/v1/repos/blender/blender/issues/116097/timeline) (all the transactions) from the issue [116097](https://projects.blender.org/blender/blender/issues/116097) I get a None transaction element (full json attached): ``` [ {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, null ] ``` I can just ignore this on the metrics script. But I wanted to check if this is the expected behaviour. My guess is that the user mis-referenced this issue on a different one, and remove their comment (or edited?).

I had a short look but cannot find anything obvious there.

select * from issue where index=116097;
reveals the original issue-text, tells us that the internal ID is 123279.

select * from comments where issue_id=12379;

Gives me a number of records that seem to correlate well with the different actions applied to the issue.
It'd involve going into the code to see what other artifacts it pulls to provide timeline information and why it'd be NULL here. I'll assuming it doesnt return the spurious null on other requests ?

I had a short look but cannot find anything obvious there. select * from issue where index=116097; reveals the original issue-text, tells us that the internal ID is 123279. select * from comments where issue_id=12379; Gives me a number of records that seem to correlate well with the different actions applied to the issue. It'd involve going into the code to see what other artifacts it pulls to provide timeline information and why it'd be NULL here. I'll assuming it doesnt return the spurious null on other requests ?
Author
Owner

I managed to reproduce by adding a comment that refers to an issue, and then deleting said comment.

For the record the (deleted) comment was added to: blender/blender#117068
And was referring to this own task.

Before [{"id":1100660,"type":"commit_ref","html_url":"#76 (comment) Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"body":"\u003ca href=\"/infrastructure/blender-metrics/commit/cdc21e4fdc2b91327b5735803b2a53a17411d1d2\"\u003eMake fetching more robust when transactions are NULL\u003c/a\u003e","created_at":"2024-01-12T15:11:48+01:00","updated_at":"2024-01-12T15:11:48+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"cdc21e4fdc2b91327b5735803b2a53a17411d1d2","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},{"id":1100720,"type":"comment","html_url":"#76 (comment) Marijnissen","email":"arnd@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/f9c46e001759bc51ebd0a47fda2deb1c1e80f9c1ef77528457c1178409af8b87","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2022-02-22T13:07:03+01:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":1,"following_count":0,"starred_repos_count":0,"username":"Arnd"},"body":"I had a short look but cannot find anything obvious there.\r\n\r\nselect * from issue where index=116097; \r\nreveals the original issue-text, tells us that the internal ID is 123279.\r\n\r\nselect * from comments where issue_id=12379;\r\n\r\nGives me a number of records that seem to correlate well with the different actions applied to the issue. \r\nIt'd involve going into the code to see what other artifacts it pulls to provide timeline information and why it'd be NULL here. I'll assuming it doesnt return the spurious null on other requests ?\r\n","created_at":"2024-01-12T15:44:44+01:00","updated_at":"2024-01-12T15:44:44+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},{"id":1100799,"type":"comment_ref","html_url":"#76 (comment) Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"body":"","created_at":"2024-01-12T16:05:00+01:00","updated_at":"2024-01-12T16:05:00+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":{"id":124398,"url":"https://projects.blender.org/api/v1/repos/blender/blender/issues/117068","html_url":"blender/blender#117068","number":117068,"user":{"id":1179,"login":"dfelinto","login_name":"","full_name":"Dalai Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"original_author":"","original_author_id":0,"title":"Testing a gitea bug in production","body":"Wait for it :)\n\n","ref":"","assets":[],"labels":[{"id":301,"name":"Type/To Do","exclusive":true,"is_archived":false,"color":"505862","description":"","url":"https://projects.blender.org/api/v1/repos/blender/blender/labels/301"}],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":1,"created_at":"2024-01-12T16:04:47+01:00","updated_at":"2024-01-12T16:05:00+01:00","closed_at":null,"due_date":null,"pull_request":null,"repository":{"id":15,"name":"blender","owner":"blender","full_name":"blender/blender"},"pin_order":0},"ref_comment":{"id":1100798,"html_url":"blender/blender#117068 (comment) Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"original_author":"","original_author_id":0,"body":"See I'm referring to: #76","assets":[],"created_at":"2024-01-12T16:05:00+01:00","updated_at":"2024-01-12T16:05:00+01:00"},"ref_action":"none","ref_commit_sha":"","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null}]
After [{"id":1100660,"type":"commit_ref","html_url":"#76 (comment) Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"body":"\u003ca href=\"/infrastructure/blender-metrics/commit/cdc21e4fdc2b91327b5735803b2a53a17411d1d2\"\u003eMake fetching more robust when transactions are NULL\u003c/a\u003e","created_at":"2024-01-12T15:11:48+01:00","updated_at":"2024-01-12T15:11:48+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"cdc21e4fdc2b91327b5735803b2a53a17411d1d2","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},{"id":1100720,"type":"comment","html_url":"#76 (comment) Marijnissen","email":"arnd@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/f9c46e001759bc51ebd0a47fda2deb1c1e80f9c1ef77528457c1178409af8b87","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2022-02-22T13:07:03+01:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":1,"following_count":0,"starred_repos_count":0,"username":"Arnd"},"body":"I had a short look but cannot find anything obvious there.\r\n\r\nselect * from issue where index=116097; \r\nreveals the original issue-text, tells us that the internal ID is 123279.\r\n\r\nselect * from comments where issue_id=12379;\r\n\r\nGives me a number of records that seem to correlate well with the different actions applied to the issue. \r\nIt'd involve going into the code to see what other artifacts it pulls to provide timeline information and why it'd be NULL here. I'll assuming it doesnt return the spurious null on other requests ?\r\n","created_at":"2024-01-12T15:44:44+01:00","updated_at":"2024-01-12T15:44:44+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},null]
I managed to reproduce by adding a comment that refers to an issue, and then deleting said comment. For the record the (deleted) comment was added to: https://projects.blender.org/blender/blender/issues/117068 And was referring to [this own task](https://projects.blender.org/api/v1/repos/infrastructure/blender-projects-platform/issues/76/timeline). <details> <summary>Before</summary> [{"id":1100660,"type":"commit_ref","html_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76#issuecomment-1100660","pull_request_url":"","issue_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76","user":{"id":1179,"login":"dfelinto","login_name":"","full_name":"Dalai Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"body":"\u003ca href=\"/infrastructure/blender-metrics/commit/cdc21e4fdc2b91327b5735803b2a53a17411d1d2\"\u003eMake fetching more robust when transactions are NULL\u003c/a\u003e","created_at":"2024-01-12T15:11:48+01:00","updated_at":"2024-01-12T15:11:48+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"cdc21e4fdc2b91327b5735803b2a53a17411d1d2","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},{"id":1100720,"type":"comment","html_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76#issuecomment-1100720","pull_request_url":"","issue_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76","user":{"id":30282,"login":"Arnd","login_name":"","full_name":"Arnd Marijnissen","email":"arnd@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/f9c46e001759bc51ebd0a47fda2deb1c1e80f9c1ef77528457c1178409af8b87","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2022-02-22T13:07:03+01:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":1,"following_count":0,"starred_repos_count":0,"username":"Arnd"},"body":"I had a short look but cannot find anything obvious there.\r\n\r\nselect * from issue where index=116097; \r\nreveals the original issue-text, tells us that the internal ID is 123279.\r\n\r\nselect * from comments where issue_id=12379;\r\n\r\nGives me a number of records that seem to correlate well with the different actions applied to the issue. \r\nIt'd involve going into the code to see what other artifacts it pulls to provide timeline information and why it'd be NULL here. I'll assuming it doesnt return the spurious null on other requests ?\r\n","created_at":"2024-01-12T15:44:44+01:00","updated_at":"2024-01-12T15:44:44+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},{"id":1100799,"type":"comment_ref","html_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76#issuecomment-1100799","pull_request_url":"","issue_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76","user":{"id":1179,"login":"dfelinto","login_name":"","full_name":"Dalai Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"body":"","created_at":"2024-01-12T16:05:00+01:00","updated_at":"2024-01-12T16:05:00+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":{"id":124398,"url":"https://projects.blender.org/api/v1/repos/blender/blender/issues/117068","html_url":"https://projects.blender.org/blender/blender/issues/117068","number":117068,"user":{"id":1179,"login":"dfelinto","login_name":"","full_name":"Dalai Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"original_author":"","original_author_id":0,"title":"Testing a gitea bug in production","body":"Wait for it :)\n\n","ref":"","assets":[],"labels":[{"id":301,"name":"Type/To Do","exclusive":true,"is_archived":false,"color":"505862","description":"","url":"https://projects.blender.org/api/v1/repos/blender/blender/labels/301"}],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":1,"created_at":"2024-01-12T16:04:47+01:00","updated_at":"2024-01-12T16:05:00+01:00","closed_at":null,"due_date":null,"pull_request":null,"repository":{"id":15,"name":"blender","owner":"blender","full_name":"blender/blender"},"pin_order":0},"ref_comment":{"id":1100798,"html_url":"https://projects.blender.org/blender/blender/issues/117068#issuecomment-1100798","pull_request_url":"","issue_url":"https://projects.blender.org/blender/blender/issues/117068","user":{"id":1179,"login":"dfelinto","login_name":"","full_name":"Dalai Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"original_author":"","original_author_id":0,"body":"See I'm referring to: https://projects.blender.org/infrastructure/blender-projects-platform/issues/76","assets":[],"created_at":"2024-01-12T16:05:00+01:00","updated_at":"2024-01-12T16:05:00+01:00"},"ref_action":"none","ref_commit_sha":"","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null}] </details> <details> <summary>After </summary> [{"id":1100660,"type":"commit_ref","html_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76#issuecomment-1100660","pull_request_url":"","issue_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76","user":{"id":1179,"login":"dfelinto","login_name":"","full_name":"Dalai Felinto","email":"dfelinto@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/82a45a3af74abd0d6d29f54852df1e39a8377d657085dea611619b369a041cab","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2006-06-02T05:16:33+02:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":7,"following_count":3,"starred_repos_count":0,"username":"dfelinto"},"body":"\u003ca href=\"/infrastructure/blender-metrics/commit/cdc21e4fdc2b91327b5735803b2a53a17411d1d2\"\u003eMake fetching more robust when transactions are NULL\u003c/a\u003e","created_at":"2024-01-12T15:11:48+01:00","updated_at":"2024-01-12T15:11:48+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"cdc21e4fdc2b91327b5735803b2a53a17411d1d2","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},{"id":1100720,"type":"comment","html_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76#issuecomment-1100720","pull_request_url":"","issue_url":"https://projects.blender.org/infrastructure/blender-projects-platform/issues/76","user":{"id":30282,"login":"Arnd","login_name":"","full_name":"Arnd Marijnissen","email":"arnd@noreply.localhost","avatar_url":"https://projects.blender.org/avatars/f9c46e001759bc51ebd0a47fda2deb1c1e80f9c1ef77528457c1178409af8b87","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2022-02-22T13:07:03+01:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":1,"following_count":0,"starred_repos_count":0,"username":"Arnd"},"body":"I had a short look but cannot find anything obvious there.\r\n\r\nselect * from issue where index=116097; \r\nreveals the original issue-text, tells us that the internal ID is 123279.\r\n\r\nselect * from comments where issue_id=12379;\r\n\r\nGives me a number of records that seem to correlate well with the different actions applied to the issue. \r\nIt'd involve going into the code to see what other artifacts it pulls to provide timeline information and why it'd be NULL here. I'll assuming it doesnt return the spurious null on other requests ?\r\n","created_at":"2024-01-12T15:44:44+01:00","updated_at":"2024-01-12T15:44:44+01:00","old_project_id":0,"project_id":0,"old_milestone":null,"milestone":null,"tracked_time":null,"old_title":"","new_title":"","old_ref":"","new_ref":"","ref_issue":null,"ref_comment":null,"ref_action":"none","ref_commit_sha":"","review_id":0,"label":null,"assignee":null,"assignee_team":null,"removed_assignee":false,"resolve_doer":null,"dependent_issue":null},null] </details>
Brecht Van Lommel added the
bug
label 2024-01-14 16:48:43 +01:00

I suggest to close this issue, and either report it upstream or ignore it in your script.

For this issue tracker (and for what we officially ask Gitea developers as a project), I want to limit it to issue that significantly impact Blender development.

I suggest to close this issue, and either report it upstream or ignore it in your script. For this issue tracker (and for what we officially ask Gitea developers as a project), I want to limit it to issue that significantly impact Blender development.
Author
Owner

Will close for now. If I ever report it upstream I will send the link here.

Will close for now. If I ever report it upstream I will send the link here.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/blender-projects-platform#76
No description provided.