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

Github deployments are broken when deploying to multiple repositories #928

Closed
xPaw opened this Issue Nov 21, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@xPaw
Copy link

xPaw commented Nov 21, 2018

#923 appears to have broken Github deployments when deploying to multiple repositories

This PR appears to have broken deploying files to other repositories because target_commitish does not exist in the other repository.

It failed like this:

/home/travis/.rvm/gems/ruby-2.4.5/gems/octokit-4.6.2/lib/octokit/response/raise_error.rb:16:in `on_complete': PATCH https://api.github.com/repos/thelounge/thelounge/releases/14115585: 422 - Validation Failed (Octokit::UnprocessableEntity)
Error summary:
  resource: Release
  code: invalid
  field: target_commitish // See: https://developer.github.com/v3/repos/releases/#edit-a-release

Build: https://travis-ci.com/thelounge/thelounge-deb/builds/92133900
Config: https://github.com/thelounge/thelounge-deb/blob/v3.0.0-rc.5/.travis.yml

It used to work before. It appears to have attached the file correctly on the repo that it threw the error on, but the file is missing on the main repo (second deploy option)

https://github.com/thelounge/thelounge/releases/tag/v3.0.0-rc.5
https://github.com/thelounge/thelounge-deb/releases/tag/v3.0.0-rc.5

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Nov 21, 2018

We should add a check if the repo is the same when supplying tag_commitish.

As for the state of these two releases in question: The second deployment (the one for thelounge/theloung-deb) did not run after the first one added the file, but failed to update the release.

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Nov 21, 2018

Could you test the potential fix with the following?

deploy:
  provider: releases
  edge:
    branch: releases-check-repo# rest

Thanks.

@xPaw

This comment has been minimized.

Copy link
Author

xPaw commented Nov 21, 2018

Would I need to re-create the git tag to make a new build with that config?

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Nov 21, 2018

@xPaw You'll need a new commit to test it, so it's probably easier to create a new tag. Reusing the current tag (v3.0.0-rc.5) might work, but that will mean force pushing this tag. I don't know what GitHub is going to do with the existing releases if you do that.

xPaw added a commit to thelounge/thelounge-deb that referenced this issue Nov 21, 2018

@xPaw

This comment has been minimized.

Copy link
Author

xPaw commented Nov 21, 2018

I just deleted the tag and created it again in thelounge-deb repository, and removed the attached file in thelounge repo.

Appears to have worked correctly, both repos got the file attached in the release.

Build: https://travis-ci.com/thelounge/thelounge-deb/builds/92185890

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Nov 21, 2018

@xPaw Thanks for testing. We'll have a release next week. (It's a bit too close to Thanksgiving weekend, so I'd like to not have a release.)

@astorije

This comment has been minimized.

Copy link

astorije commented Jan 27, 2019

@BanzaiMan, we just got the same issue at https://travis-ci.com/thelounge/thelounge/jobs/173300551, was this fix released? Thanks! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment