deis / deisrel

A releaser tool for Deis
MIT License
5 stars 13 forks source link

changelog (and potentially other commands) can't handle working from branches #130

Open helgi opened 8 years ago

helgi commented 8 years ago

I had to release v2.4.1 and base if of v2.4.0 instead of master / workflow-dev. When I went to the changelog individual phase then that command got rather confused.

The way I created my branch in Controller was to create a stable-v2.4.1 (name doesn't really matter much) from the v2.4.0 tag, cherry-pick changes from master that I wanted released (note that in other cases special commits may have to be done since cherry-pick may not always work).

I did not push the branch up. When I ran changelog individual then it tried to pull info from master... I tried --base-tag and --sha but it wasn't very clear what was what.

Maybe this is all side effect of always working against the GH API? Maybe I should have pushed my branch?

vdice commented 8 years ago

Maybe this is all side effect of always working against the GH API? Maybe I should have pushed my branch?

@helgi I think indeed this is the issue. @Joshua-Anderson thoughts?

Joshua-Anderson commented 8 years ago

Yes, you needed to push your branch before using deisrel to generate a changelog.

Joshua-Anderson commented 8 years ago

@helgi is this behavior ok or would you like to see something different?

helgi commented 8 years ago

Not really sure why I'd have to push - So we can use GH HTTP APIs instead of dropping down to git mechanics?

Joshua-Anderson commented 8 years ago

We use the GH api to get the commit diff between the old tag and the SHA of the new tag. If the new sha doesn't exist, it can't calculate the range.

We could use raw git, but it's less deterministic (different checkouts, haven't pulled) and parsing the output from the git CLI is much more difficult than using the GH Go SDK.

helgi commented 8 years ago

The tool will still have to verify the branch has been pushed and all that, which would involve git operations, no?

Joshua-Anderson commented 8 years ago

I'd see this workflow for a patch release:

  1. Person creates new branch from old tag, cherrypicks changes and pushes to GH for verification and testing by other people.
  2. Person uses deisrel to generate diff between the old tag and the new SHA.
  3. Person creates new tag with created changelog.
helgi commented 8 years ago

Alright but that doesn't really answer my question - The tool needs to be able to enforce certain steps happen and let you know when they do not. Such as "you have not pushed your branch" and similar.

Joshua-Anderson commented 8 years ago

The tool needs to be able to enforce certain steps happen and let you know when they do not. Such as "you have not pushed your branch" and similar.

I'd personally feel this is more of a documentation problem than a deisrel problem. Is there much that can be done in deisrel to check for this? I guess we could clean up the message to say "could not find SHA, has it been pushed to github"?

Cryptophobia commented 6 years ago

This issue was moved to teamhephy/deisrel#2