Skip to content

FEAT: do not throw error if previous release was not found #11

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

Conversation

rreckonerr
Copy link
Contributor

Since I found no way to add a test for it I'd like to check out if it actually works before merging this. I will let you know if this PR prevents the build pipeline from failing in case a release commit wasn't found.

Closes #10

Copy link
Member

@Exelord Exelord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On your mark!😎

@rreckonerr
Copy link
Contributor Author

@Exelord
Something strange is going on, it seems like sentry-cli doesn't expect multiple flags to be set. First, it created a release "--ignore-missing", then threw an error that ignore-missing is not an argument when I moved flags to the end of the command. I suspect that it expects --auto OR --ignore-missing flags to be passed. I will ask around in sentry-cli repo and get back to you 🥲

@rreckonerr rreckonerr force-pushed the feat/do-not-throw-error-if-previous-release-was-not-found branch from 5bfcd46 to fa6162d Compare May 26, 2021 19:05
@rreckonerr
Copy link
Contributor Author

rreckonerr commented May 26, 2021

@Exelord I think I figured out what's going on here. Seems like the problem is about the order of passed flags vs actual release version.

So if "set-commits --active --ignore-missing RELEASE_VERSION" flags are passed before the release version, the second argument (in our case --ignore-missing) will be treated as a release version and release named "--ignore-missing" will be created, and we'll publish another release with proper name from the didDeploy hook. In that case all assosiated commits will stay in "--ignore-missing" release and the proper release will have no assosiated commits 🤦‍♂️

I've moved the flags after the release version and now it seems to work as expected, also I've opened a new issue in the sentry-cli repo.

I think it's still safe to go with the workaround of moving flags to after the release version, but before actually merging this I'd like some one else to test this version too 🙂

@Exelord
Copy link
Member

Exelord commented May 27, 2021

I think we are good :)

@Exelord Exelord merged commit f717155 into EmberExperts:master Jun 22, 2021
@rreckonerr
Copy link
Contributor Author

Thanks, @Exelord 🎉🎉🎉

@urbany
Copy link

urbany commented Jul 20, 2021

@Exelord hi, first of all thanks for the plugin would you accept a PR to also add --ignore-empty to this command?

@Exelord
Copy link
Member

Exelord commented Jul 21, 2021

Hey @urbany :) Could you briefly explain what it does?

@urbany
Copy link

urbany commented Jul 21, 2021

I'm not sure, I found this issue when they added the option getsentry/sentry-cli#993
My deploy only works when I add that option, i think it won't affect anything, just doesn't error when no new commits are found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should fail gracefully if SHA of the previous release commit wasn't found
3 participants