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

Assigned issue URLs are not displayed on reaching max task limit #96

Closed
rndquu opened this issue Nov 28, 2024 · 19 comments
Closed

Assigned issue URLs are not displayed on reaching max task limit #96

rndquu opened this issue Nov 28, 2024 · 19 comments

Comments

@rndquu
Copy link
Member

rndquu commented Nov 28, 2024

Check this comment which displays a warning that max task limit is reached.

It should also display URLs to already assigned github issues (example).

There seems to be a bug since this logic is already implemented.

What should be done:

  1. Fix the bug
  2. Write a unit test for the feature

Original comment

@Sisilika
Copy link

/start

@Sisilika
Copy link

Sisilika commented Dec 1, 2024

/wallet 0xeCae1b52dC66b70b159C91d047d24A1211D0b36C

Copy link

+ Successfully registered wallet address

Copy link

@Sisilika the deadline is at Sun, Dec 1, 10:33 AM UTC

Copy link

Passed the deadline and no activity is detected, removing assignees: @Sisilika.

@ariesgun
Copy link
Contributor

/start

Copy link

! This task does not reflect a business priority at the moment. You may start tasks with one of the following labels: Priority: 3 (High), Priority: 4 (Urgent), Priority: 5 (Emergency)

Copy link

@ariesgun the deadline is at Fri, Dec 13, 9:07 AM UTC

Copy link

Important

  • Be sure to link a pull-request before the first reminder to avoid disqualification.
  • Reminders will be sent every 7 days if there is no activity.
  • Assignees will be disqualified after 14 days of inactivity.

@ariesgun
Copy link
Contributor

ariesgun commented Dec 13, 2024

Found out that the user sshivaditya2019 has already opened 5 PRs but was assigned to 0 issues.
Some examples:

ubiquity-os-marketplace/text-vector-embeddings#61
ubiquity-os-marketplace/command-ask#31

Question:

  • Why is the author not assigned to the issues although he is working on those issues? Is this typical?
  • What is the expected result in this scenario? Should we assign the issue or not?
  • One possible way to solve it is to check the PR body and parse the "Resolve #XXX" text to retrieve the issues someone is working on. It is going to make to code check quite complicated. What do you think of this solution?

@rndquu
Copy link
Member Author

rndquu commented Dec 13, 2024

Why is the author not assigned to the issues although he is working on those issues? Is this typical?

Because the author didn't call the /start command. As far as I remember when PR is opened an issue should be assigned automatically, not sure if this feature exists or that's a bug (@gentlementlegen help).

What is the expected result in this scenario? Should we assign the issue or not?

I don't fully understand the question. This warning was triggered because max task limit was reached. The only thing left is to find out how assigned issues were calculated and attach missing URLs to PRs.

One possible way to solve it is to check the PR body and parse the "Resolve #XXX" text to retrieve the issues someone is working on. It is going to make to code check quite complicated. What do you think of this solution?

Why do we need to parse comments? Can't we use already implemented solutions?

@ariesgun
Copy link
Contributor

ariesgun commented Dec 13, 2024

I don't fully understand the question. This warning was triggered because max task limit was reached. The only thing left is to find out how assigned issues were calculated and attach missing URLs to PRs.

The author is assigned 0 issue , but he has created 5 PRs. That's why when he tried to call the /start command, it said max task limit was reached (abs(0 issue - 5 open PRs) > limit 2). The question is should it returns 'max task limit' or should it assign the issue?

  // check for max and enforce max
  if (Math.abs(assignedIssues.length - openedPullRequests.length) >= limit) {

@gentlementlegen
Copy link
Member

@rndquu yes on pull-request linking if the task is not assign it should assign you. The reason why it has not been working is that when a profile is private the plugin fails to retrieve the pull-requests of a user due to privacy settings.

@ariesgun
Copy link
Contributor

It sounds like the PR linking can also implement the fallback function in case the profile is a private one, similar to this.

https://github.com/ubiquity-os-marketplace/command-start-stop/blob/70a9619d496a175a09c6a3c4de4d7a84da1da919/src/utils/get-pull-requests-fallback.ts#L13C1-L13C50

@rndquu
Copy link
Member Author

rndquu commented Dec 17, 2024

I don't fully understand the question. This warning was triggered because max task limit was reached. The only thing left is to find out how assigned issues were calculated and attach missing URLs to PRs.

The author is assigned 0 issue , but he has created 5 PRs. That's why when he tried to call the /start command, it said max task limit was reached (abs(0 issue - 5 open PRs) > limit 2). The question is should it returns 'max task limit' or should it assign the issue?

  // check for max and enforce max
  if (Math.abs(assignedIssues.length - openedPullRequests.length) >= limit) {

I suppose right now the logic is correct. If user has 0 assigned issues and 5 opened PRs then user should not be assigned. He can simply close PRs and try to /start again.

@0x4007
Copy link
Member

0x4007 commented Dec 17, 2024

Maybe this is an edge case because we fixed the disqualifier to close pulls now.

And when pulls are opened the author should be assigned.

There shouldn't be a situation where they have five pulls open and no assignments, unless they are not funded tasks, in which case that is out of our system (especially if it's on an org without our bot installation) and we should not count that against their quotas, I think.

@ariesgun
Copy link
Contributor

I assume this one can be closed?

@0x4007
Copy link
Member

0x4007 commented Dec 22, 2024

@gentlementlegen

@gentlementlegen
Copy link
Member

Can be open again if needed.

@gentlementlegen gentlementlegen closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants