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

/stop can start again #69

Closed
0x4007 opened this issue Oct 27, 2024 · 53 comments · Fixed by #113
Closed

/stop can start again #69

0x4007 opened this issue Oct 27, 2024 · 53 comments · Fixed by #113

Comments

@0x4007
Copy link
Member

0x4007 commented Oct 27, 2024

example

ubiquity/ts-template#61 (comment)

Calling stop should not penalize. If they called stop they should be able to reassign in the future becauss its not a disqualification.

@ishowvel

This comment was marked as off-topic.

@ishowvel
Copy link

/start

Copy link

Deadline Mon, Oct 28, 8:08 AM UTC
Beneficiary 0x340D8d2bd82dEb4f485623453c9F6ad307e6B027

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@ishowvel
Copy link

i have noticed that only 1 plugin works in the kernel at the time, my pricing plugin doesnt work when i add this start stop plugin to the .ubiquity-os config, the kernel only forwards the payload to one plugin for some reason

@ishowvel
Copy link

this may already be implemented

@ishowvel
Copy link

/stop

@ishowvel
Copy link

/start

Copy link

! ishowvel you were previously unassigned from this task. You cannot be reassigned.

@ishowvel
Copy link

@gentlementlegen might you know why the kernel is only forwarding payload to the first plugin found in any repo containing the ubiquity-os config like found here

[wrangler:inf] POST /events 200 OK (1397ms)
Creating empty kv KvNamespace {}
Event issue_comment received (id: bae1fd80-9536-11ef-8375-aa28c5354825)
Skipping plugin chain Assistive pricing because command does not match. {
  allow: {
    'ubiquity:example': '/allow @user1 label',
    description: 'Allows the user to modify the given label.'
  }
}
[wrangler:inf] POST /events 200 OK (1009ms)

@ishowvel
Copy link

the kernel doesnt even know if these plugins exist

@0x4007
Copy link
Member Author

0x4007 commented Oct 28, 2024

My best guess is that you have a formatting problem in your yml config. Sometimes it's difficult to get the indentations perfectly.

@gentlementlegen
Copy link
Member

It is trying to forward it but what it received is not a valid command like /label. Plugins react only to certain events / inputs.

@ishowvel
Copy link

Shouldn't it receive the valid commands for this plugin ie /start, /stop

@gentlementlegen
Copy link
Member

gentlementlegen commented Oct 28, 2024

In the configuration file you gave, you chained plugins so it won't. You need to change it to something like

plugins:
  - uses:
    - plugin: http://127.0.0.1:4000
      with:
        labels:
          time:
            - "Time: <15 Minutes"
            - "Time: <1 Hour"
            - "Time: <2 Hours"
            - "Time: <4 Hours"
            - "Time: <1 Day"
            - "Time: <1 Week"
            - "Time: <2 Weeks"
            - "Time: <1 Month"
          priority:
            - "Priority: 1 (Normal)"
            - "Priority: 2 (Medium)"
            - "Priority: 3 (High)"
            - "Priority: 4 (Urgent)"
            - "Priority: 5 (Emergency)"
        basePriceMultiplier: 2
        publicAccessControl:
          setLabel: true
          fundExternalClosedIssue: false
  -  uses:
    - plugin: ishowvel/daemon-disqualifier:compute.yml@testing
      with:
        disqualification: "2 minutes"
        warning: "1 minutes"
        watch:
          optOut:
            - "repoName"
            - "repoName2"
        eventWhitelist:
          - "review_requested"
          - "ready_for_review"
          - "commented"
          - "committed"
  - uses:
    - plugin: http://localhost:4001 # or the URL where the plugin is hosted
      name: start-stop
      id: start-stop-command
      with:
        reviewDelayTolerance: "3 Days"
        taskStaleTimeoutDuration: "30 Days"
        maxConcurrentTasks: # Default concurrent task limits per role.
          member: 5
          contributor: 3
        startRequiresWallet: true # default is true
        emptyWalletText: "Please set your wallet address with the /wallet command first and try again."
        rolesWithReviewAuthority: ["MEMBER", "OWNER"]
    

so every plugin is called individually.

@ishowvel
Copy link

@0x4007 can i be assigned to this

Copy link

@ishowvel the deadline is at Thu, Oct 31, 7:54 PM UTC

Copy link

A new workroom has been created for this task. Join chat

@ishowvel
Copy link

ishowvel commented Nov 1, 2024

@0x4007 i cant seem to recreate the issue

@ishowvel
Copy link

ishowvel commented Nov 1, 2024

the problem for me was i was using the github app id as the BOT_USER_ID but instead i should have used
image

@0x4007
Copy link
Member Author

0x4007 commented Nov 1, 2024

Show me the conversation/QA on GitHub so I have context on your problem

@ishowvel
Copy link

ishowvel commented Nov 2, 2024

ishowvel-org/.ubiquity-os#4
After a certain point i switched the BOT_USER_ID from the GitHub app Id to the GitHub app user id

@0x4007
Copy link
Member Author

0x4007 commented Nov 2, 2024

It looks like it works. @gentlementlegen rfc

@gentlementlegen
Copy link
Member

It should not, otherwise it means that users can also assign themselves again after disqualification.

Copy link

! ariesgun you were previously unassigned from this task. You cannot be reassigned.

@ariesgun
Copy link
Contributor

ariesgun commented Nov 8, 2024

Cannot assign the issue to me anymore.

BOT_USER_ID === payload.user.type === "BOT" && payload.user.login === "UbiquityOS"

Not sure if this is what is used in the code, but shouldn't it be

rest.user.getByUsername("ubiquity-os-beta[bot]").data.id

@Keyrxng
Copy link
Contributor

Keyrxng commented Nov 8, 2024

Cannot assign the issue to me anymore.

BOT_USER_ID === payload.user.type === "BOT" && payload.user.login === "UbiquityOS"

Not sure if this is what is used in the code, but shouldn't it be

rest.user.getByUsername("ubiquity-os-beta[bot]").data.id

Yeah sorry you are correct it's probably better to use -beta[bot] than just ubiquity-os[bot] but you get the idea it's user.id of the bot entity

@ariesgun
Copy link
Contributor

ariesgun commented Nov 8, 2024

Cannot assign the issue to me anymore.

BOT_USER_ID === payload.user.type === "BOT" && payload.user.login === "UbiquityOS"

Not sure if this is what is used in the code, but shouldn't it be

rest.user.getByUsername("ubiquity-os-beta[bot]").data.id

Yeah sorry you are correct it's probably better to use -beta[bot] than just ubiquity-os[bot] but you get the idea it's user.id of the bot entity

I see.. so for this issue, is it possible to verify if the BOT_USER_ID in dev.vars is set properly or not?
If I look inside function,

if (await hasUserBeenUnassigned(context, username)) {
,

the most probable root cause is the event.actorId !== BOT_USER_ID

@Keyrxng
Copy link
Contributor

Keyrxng commented Nov 8, 2024

The cause is likely because we have two bots and so we have two BOT_USER_IDs to compare. Perhaps it makes sense to add both bot ids and check the actor.id against both?

That is just an assumption obviously but to answer the question: TypeBox verifies that the env vars are defined. Whether they reflect our actual bot is another question, we opt'd for the ID over the username a while back although if there is no other clean solution it'll have to do.

@ariesgun
Copy link
Contributor

ariesgun commented Nov 8, 2024

Or just check for [bot] in the actorname?

image

@Keyrxng
Copy link
Contributor

Keyrxng commented Nov 8, 2024

Or just check for [bot] for the actorname?

image

That's a quick fix I guess yes.

The original intention behind specifying it's our bot was so that in a partner org where they may have lots of little bots installed that perform actions on tasks and PRs this avoids any interference with our logic.

@gentlementlegen
Copy link
Member

I think it is safe to assume that a bot un-assign action is from our bot, and would cover both cases.

@ariesgun
Copy link
Contributor

ariesgun commented Nov 9, 2024

If it is agreed to do it this way, (check name for [bot] I can make the changes quickly .
Can you assign this task to me again?

@Keyrxng
Copy link
Contributor

Keyrxng commented Nov 9, 2024

@ariesgun Sounds to me like it was implied so yeah go ahead with that solution. I can't assign you but you can link the PR and you'll be assigned when someone else sees this

@gentlementlegen
Copy link
Member

@ariesgun i think you should check for the user type to be a bot instead.

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)

@ariesgun
Copy link
Contributor

@0x4007 , is it possible to start this task?

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)

@Sadaf-A
Copy link

Sadaf-A commented Dec 20, 2024

/start

Copy link

Warning! This task was created over 53 days ago. Please confirm that this issue specification is accurate before starting.
Deadline Fri, Dec 20, 10:25 PM UTC
Beneficiary 0x0BEd00438D57d07E3667b85Fa8EB86Af147C7025

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@Sadaf-A
Copy link

Sadaf-A commented Dec 20, 2024

/stop

Copy link

Deadline Fri, Dec 27, 7:35 AM UTC
Beneficiary 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

Copy link

+ Evaluating results. Please wait...

Copy link

 [ 27.81 WXDAI ] 

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueTask125
IssueComment72.81
ReviewComment10
Conversation Incentives
CommentFormattingRelevancePriorityReward
It is trying to forward it but what it received is not a valid c…
1.44
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 23
  wordValue: 0.1
  result: 1.44
010
In the configuration file you gave, you chained plugins so it wo…
1.65
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 27
  wordValue: 0.1
  result: 1.65
010
It should not, otherwise it means that users can also assign the…
1
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 15
  wordValue: 0.1
  result: 1
110.25
No I mean that if no code was changed, it should not allow re-as…
1.22
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 19
  wordValue: 0.1
  result: 1.22
110.31
The `BOT_USER_ID` should match the id of the app your in…
6.59
content:
  content:
    p:
      score: 0
      elementCount: 3
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 26
  wordValue: 0.1
  result: 1.59
111.65
I think it is safe to assume that a bot un-assign action is from…
1.38
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 22
  wordValue: 0.1
  result: 1.38
110.35
@ariesgun i think you should check for the user type to be a bot…
1
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 15
  wordValue: 0.1
  result: 1
110.25
Resolves #69QA: https://github.com/Meniole/command-start-stop/…
6
content:
  content:
    p:
      score: 0
      elementCount: 4
    h2:
      score: 1
      elementCount: 1
    a:
      score: 5
      elementCount: 1
  result: 6
regex:
  wordCount: 104
  wordValue: 0
  result: 0
0.910

 [ 8.074 WXDAI ] 

@0x4007
Contributions Overview
ViewContributionCountReward
IssueSpecification16.49
IssueComment41.584
Conversation Incentives
CommentFormattingRelevancePriorityReward
example https://github.com/ubiquity/ts-template/issues/61#issue…
6.49
content:
  content:
    p:
      score: 0
      elementCount: 1
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 24
  wordValue: 0.1
  result: 1.49
116.49
My best guess is that you have a formatting problem in your yml …
1.44
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 23
  wordValue: 0.1
  result: 1.44
0.510.72
Show me the conversation/QA on GitHub so I have context on your …
0.94
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 14
  wordValue: 0.1
  result: 0.94
0.210.188
It looks like it works. @gentlementlegen rfc
0.52
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 7
  wordValue: 0.1
  result: 0.52
0.310.156
Disqualification and self unassignment are different things
0.52
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 7
  wordValue: 0.1
  result: 0.52
110.52

 [ 3.49 WXDAI ] 

@ariesgun
Contributions Overview
ViewContributionCountReward
IssueComment53.49
Conversation Incentives
CommentFormattingRelevancePriorityReward
Cannot assign the issue to me anymore.Not sure if this is what…
1.44
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 23
  wordValue: 0.1
  result: 1.44
010
I see.. so for this issue, is it possible to verify if the `…
6.85
content:
  content:
    p:
      score: 0
      elementCount: 4
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 31
  wordValue: 0.1
  result: 1.85
111.71
Or just check for `[bot]` in the actorname?![image](ht…
5.52
content:
  content:
    p:
      score: 0
      elementCount: 2
    img:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 7
  wordValue: 0.1
  result: 0.52
111.38
If it is agreed to do it this way, (check name for `[bot] …
1.59
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 26
  wordValue: 0.1
  result: 1.59
110.4
@0x4007 , is it possible to start this task?
0.59
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 8
  wordValue: 0.1
  result: 0.59
010

 [ 2.07 WXDAI ] 

@Keyrxng
Contributions Overview
ViewContributionCountReward
IssueComment52.07
Conversation Incentives
CommentFormattingRelevancePriorityReward
`BOT_USER_ID` === `payload.user.type === "BOT" &…
1.38
content:
  content:
    p:
      score: 0
      elementCount: 3
  result: 0
regex:
  wordCount: 22
  wordValue: 0.1
  result: 1.38
0.510.175
Yeah sorry you are correct it's probably better to use `-bet…
1.59
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 26
  wordValue: 0.1
  result: 1.59
0.510.2
The cause is likely because we have two bots and so we have two …
4.41
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 86
  wordValue: 0.1
  result: 4.41
111.1
That's a quick fix I guess yes.The original intention behind s…
2.64
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 47
  wordValue: 0.1
  result: 2.64
0.510.33
@ariesgun Sounds to me like it was implied so yeah go ahead with…
2.1
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 36
  wordValue: 0.1
  result: 2.1
0.510.265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment