wc-catalogue / blaze-elements

Web Component Blaze Elements
https://wc-catalogue.github.io/blaze-elements/
MIT License
10 stars 4 forks source link

resolve issues with atlassian semantic release #222

Closed elmariofredo closed 7 years ago

elmariofredo commented 7 years ago

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => You can submit support request here, but we preffer to chat about it realtime at our [ngParty slack](https://ngparty.herokuapp.com/)

Current behavior Current release is failing with errors as

info:    Executing getNpmConfig in packages/input
info:    Executing makeSrConfig in packages/input
info:    Executing pre in packages/input
ERR! commits The commit the last release of this package was derived from is not in the direct history of the "master" branch.
ERR! commits This means semantic-release can not extract the commits between now and then.
ERR! commits This is usually caused by force pushing, releasing from an unrelated branch, or using an already existing package name.
ERR! commits You can recover from this error by publishing manually or restoring the commit "499e2d7dac1cf1e9df96405244cddc78ee0382b9".
error:    message=Commit not in history, code=ENOTINHISTORY

and

info:    Executing getNpmConfig in packages/toggle
info:    Executing makeSrConfig in packages/toggle
info:    Executing pre in packages/toggle
ERR! commits The commit the last release of this package was derived from is not in the direct history of the "master" branch.
ERR! commits This means semantic-release can not extract the commits between now and then.
ERR! commits This is usually caused by force pushing, releasing from an unrelated branch, or using an already existing package name.
ERR! commits You can recover from this error by publishing manually or restoring the commit "9c105947cbfbfb18dfb7c08ab579527ae7b92a15".
error:    message=Commit not in history, code=ENOTINHISTORY

as you can see if you open line https://travis-ci.org/wc-catalogue/blaze-elements/jobs/204198870#L906

Expected behavior lerna sematic release should work

elmariofredo commented 7 years ago

I see two problems here

  1. According to this issue semantic-release use npm gitHead which slightly undocumented property to determine which revision was used to publish particular npm package version. I we look for example at @blaze-elements/input we will get 1ec9488803ff8f1845b07a949908fde13bc84e63 which doesn't exists, I guess it wasn't properly pushed to master for some reason.

  2. According to this code lerna-semantic-release is determining affected packages base on affect string in commit message which is used as standart in atlaskit repo.

Conclusion: Even if we fix first issue manually we still are not 100% sure it won't occur again as root cause is still yet to be discovered. Then we have to strictly use affect string which is in my opinion duplicate to scope. I have started investigate around custom solution from https://github.com/material-components/material-components-web/tree/master/scripts which is doing exactly what @Hotell proposed.

elmariofredo commented 7 years ago

I will release manually following packages to resolve current issues

Malformed packages:

elmariofredo commented 7 years ago

all problematic packages were manually released

elmariofredo commented 7 years ago

This seems to be still happening as seen in https://travis-ci.org/wc-catalogue/blaze-elements/builds/209739945#L905 for some strange reason tags are published, but appear in weird detached state which result command git branch --no-color --contains with empty output instead of master.

I will try to mirror approach of atlassian guys here and šŸ™ for miracle, otherwise digging deep into git internals in inevitable šŸ˜‚

elmariofredo commented 7 years ago

After discussing with team I will prepare testing repo where we can test lerna-semantic-release functionality without risk of poisoning blaze-elements repo.

Hotell commented 7 years ago

I'm very happy that everyone in the team reads my emails...

@davidrus @hopkins-tk

screen shot 2017-03-14 at 9 53 48 am