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

GitHub: Renovate attempts to reopen deleted Dashboard issue #32267

Open
rarkins opened this issue Nov 1, 2024 · 1 comment
Open

GitHub: Renovate attempts to reopen deleted Dashboard issue #32267

rarkins opened this issue Nov 1, 2024 · 1 comment
Assignees
Labels
core:dashboard Related to Dependency Dashboard functionality priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality

Comments

@rarkins
Copy link
Collaborator

rarkins commented Nov 1, 2024

Describe the proposed change(s).

Discussion: #32161

Workaround: change dependencyDashboardTitle

It would be good to strongly type Issue state to achieve this, e.g.

diff --git a/lib/modules/platform/types.ts b/lib/modules/platform/types.ts
index 91575d098..24eb42cba 100644
--- a/lib/modules/platform/types.ts
+++ b/lib/modules/platform/types.ts
@@ -87,13 +87,15 @@ export interface Pr {
   isDraft?: boolean;
 }
 
+export type IssueState = 'open' | 'closed' | 'deleted';
+
 /**
  * TODO: Proper typing
  */
 export interface Issue {
   body?: string;
   number?: number;
-  state?: string;
+  state?: IssueState;
   title?: string;
 }
 export type PlatformPrOptions = {
@rarkins rarkins added type:bug Bug fix of existing functionality priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others core:dashboard Related to Dependency Dashboard functionality labels Nov 1, 2024
@RahulGautamSingh
Copy link
Collaborator

RahulGautamSingh commented Nov 17, 2024

This issue will only occur when the repository cache is enabled. Because the deleted issue never gets removed from cache as the graphql api never returns any update data for the issue saying it's deleted, hance our cache stores the deleted issue as it was either open/closed.

Won't happen when cache is disabled cause we fetch the issues each time and deleted issues don't get returned in that api call.

We need to catch the error during getIssue() and check for the statusCode=410 and then remove the issue from cache or change its state to deleted and update cache.

Filtering is already done for state=open. Hence, the deleted issue will never be passed forward from findIssue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:dashboard Related to Dependency Dashboard functionality priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants