project-bot icon indicating copy to clipboard operation
project-bot copied to clipboard

Some card(s)/column(s) sometimes fail(s)

Open janpio opened this issue 7 years ago • 4 comments

Note that each comment here represents another step of my investigation of this bug. The first message is my first idea, the second comment adds more insight etc. I updated the issue title to reflect the last state, but left the comments themselves alone.


I was just debugging some columns with automation cards not working. A column on the right of my board didn't work, which didn't make sense as the exact same configuration card had worked earlier more to the left.

Seems that a column with a merged_pullrequest card causes a closed_pullrequest column/card to fail:

###### Automation Rules
- `merged_pullrequest`

And right to it:

###### Automation Rules
- `closed_pullrequest`

When I moved the closed_pullrequest card to the left of the merged_pullrequest one, closed PRs were moved to the correct column again.

(I unfortunately couldn't test the merged_pullrequest at all because I have no real testing repository)

Probably caused by the similarness of closed and merged? Maybe they block each other somehow?

janpio avatar Sep 20 '18 12:09 janpio

Ok, while debugging another issue (which looked like #11) I have another combination of failing cards/columns:

If

###### Automation Rules
- `added_label` **wontfix**

is right to

###### Automation Rules
- `accepted_pullrequest`

adding the wontfix label doesn't do anything.

Here I don't see any topical connection, so this doesn't make sense at all.

Is it maybe connected to the fact that the columns is x columns to the right? What would be the best way to debug this? Could/shoult the bot maybe add a comment to an issue/PR if moving it fails for whatever reason with some information?

janpio avatar Sep 20 '18 12:09 janpio

I created a new project board and setup up just 4 columns to test what I wrote in the comment before:

###### Automation Rules
- `new_issue`
###### Automation Rules
- `added_label` **bug**
###### Automation Rules
- `accepted_pullrequest`
###### Automation Rules
- `added_label` **discussion**

per my observation and theory in https://github.com/philschatz/project-bot/issues/17#issuecomment-423170552 after creating a new issue, it should have appeared in column 1. Then adding the bug label should have moved it to column 2. That both worked. Then removing bug and adding discussion should not have moved it to column 4 because of the theorized blocking of accepted_pullrequest. But - the issue moved to column 4 just fine. Toggling the labels between discussion and bug also toggled the issue from col 2 to 4.

So it seems not to be connected to actual content of a column left to it at all. Which leaves only "too much to the right" of my previous theories.

Strange.

janpio avatar Sep 20 '18 12:09 janpio

Cards in columns do not block a card from moving to a column on the right. In general, the only way in which project-bot is aware of the order of columns is that it checks if a GitHub event matches the configuration. If so, it moves the card. And I believe it applies the cards in-order left-to-right and top-to-bottom.

column | column
1      | 3
2      | 4

philschatz avatar Sep 22 '18 21:09 philschatz

Hm, I expected so - but still have some automation rules not working sometimes, similar to https://github.com/philschatz/project-bot/issues/11 and the ones documented above of course :/

What would be the best way to debug this? Any idea what could possibly result in a rule not being executed?

janpio avatar Sep 22 '18 21:09 janpio