pkgjs / wiby

"Will I break you" - a tool for testing dependents
Apache License 2.0
33 stars 7 forks source link

Existing branch handling #95

Closed dominykas closed 3 years ago

dominykas commented 3 years ago

Scenarios:

  1. Suppose you're on a branch some-branch on the parent repo
  2. You run wiby test
  3. One of the dependent repos already has a branch called wiby-some-branch a) It could be that you already ran wiby test and did not wiby clean afterwards (most common) b) It could be that whoever was testing, wanted to make additional changes on the branch to get the tests to pass with the linked parent c) It could be that it exists, because multiple dependencies are being tested

Thinking out loud:


Related issues:

ghinks commented 3 years ago

Thank you for thinking of these cases. Initially due to looking at this at the end of the day I did not understand the issues. But I think you have explained them. My turn to think aloud.

Essentially the wiby-some-branch may exist and there are different reasons to why it could be preexist. But these come down to 2 use cases ( a or b/c).

As a thought experiment I tried to rationalize methods of determining what the two cases are or avoiding having this situation.

avoid this situation

If the branch names where unique to a particular run of wiby wiby-branch-name-unique-id then the use cases would be known and the means to address them would be understood. However that would mean keeping track of the unique branch names raised locally. So that would make things complicated at a stage we don't want them to be complicated further.

Place a well known comment in the PR ( if one exists ) before we attempt to clean it. If as in the raise draft PR we check to see if a comment from clean was added.

accept the situation

If we accept that we cannot know what use case caused the branch to exist we can ask the user. This would require the user to understand things and would mean that wiby would essentially have to scan the repos for these situations before asking the question of the user.

Hope my thinking out load helps with this conversation.

The actual options are limited and in some sense is a help to working out a potential solution.

dominykas commented 3 years ago

OK, so after discussing this in PM WG meeting, here's my current thinking:

Going forward:

dominykas commented 3 years ago

:tada: This issue has been resolved in version 0.9.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: