Skip to content
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

[PRO] Nightly stopped publishing releases #3541

Closed
3 tasks done
aymanbagabas opened this issue Nov 9, 2022 · 7 comments · Fixed by #3547
Closed
3 tasks done

[PRO] Nightly stopped publishing releases #3541

aymanbagabas opened this issue Nov 9, 2022 · 7 comments · Fixed by #3547
Assignees
Labels
bug Something isn't working pro
Milestone

Comments

@aymanbagabas
Copy link

aymanbagabas commented Nov 9, 2022

What happened?

The nightly release doesn't get published even though publish_release is set to true. It creates a draft release without publishing it on GitHub.

How can we reproduce this?

nightly:
  name_template: "{{ .ShortCommit }}-devel"
  publish_release: true
  keep_single_release: true
  tag_name: nightly

goreleaser version

goreleaser v1.12.3-pro

log
GoReleaser latest installed successfully
/opt/hostedtoolcache/goreleaser-action/1.12.3-pro/x64/goreleaser release --rm-dist --nightly
  • by using this software you agree with its EULA, available at https://goreleaser.com/eula
  • running goreleaser v1.12.3-pro
  • starting release...
  • loading config file                              file=.goreleaser.yml
  • loading environment variables
  • getting and validating git state
    • building...                                    commit=8341c17e16fea093856c9432439e97d72e57d3a7 latest tag=v3.3.0
    • pipe skipped                                   reason=validation is disabled
  • parsing tag
  • setting defaults
  • running before hooks
    • running hook                                   hook=rm -rf static
    • running hook                                   hook=go run .
    • took: 42s
  • nightly
    • building nightly...                            version=8341c17-devel
  • checking distribution directory
  • loading go mod information
  • build prerequisites
  • writing effective config file
    • writing                                        config=dist/config.yaml
  • adjusting internal git state
  • generating changelog
    • writing                                        changelog=dist/CHANGELOG.md
  • building binaries
    • skip is set                                    id=PROJECT
  • archives
    • creating                                       archive=dist/PROJECT-devel.tar.gz
    • took: 1s
  • calculating checksums
  • storing release metadata
    • writing                                        file=dist/artifacts.json
    • writing                                        file=dist/metadata.json
  • publishing
    • scm releases
      • creating or updating release                 repo=USER/PROJECT tag=8341c17e16fea093856c9432439e97d72e57d3a7
      • deleted previous nightly pre-release         commit=main name=e393ee05486deccd8be8d78c71a9fafe6c7fbbea tag=nightly
      • deleted previous nightly tag
      • uploading to release                         file=dist/PROJECT-devel_checksums.txt name=PROJECT-devel_checksums.txt
      • uploading to release                         file=dist/PROJECT-devel.tar.gz name=PROJECT-devel.tar.gz
      • published                                    url=https://github.com/USER/PROJECT/releases/tag/nightly
      • took: 4s
  • took: 4s
  • release succeeded after 47s
  • thanks for using goreleaser-pro!

GoReleaser Check

  • goreleaser check shows no errors

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

@aymanbagabas aymanbagabas added bug Something isn't working triage Issue pending triage by one of the maintainers labels Nov 9, 2022
@caarlos0
Copy link
Member

caarlos0 commented Nov 9, 2022

Hmmm I saw that happening a couple of times myself... I'm not sure why, it might be some sort of github api bug... will look into it once more. Thanks for reporting ayman! 🙏

@caarlos0 caarlos0 added pro and removed triage Issue pending triage by one of the maintainers labels Nov 9, 2022
@caarlos0 caarlos0 added this to the v1.13.0 milestone Nov 9, 2022
@caarlos0
Copy link
Member

yes, this definitely looks like some sort of bug in github... will come up with a workaround though...

caarlos0 added a commit that referenced this issue Nov 18, 2022
It makes no sense, but I saw it happens some times... the release will
be created as a draft, even though there's nothing telling it to do so.

Editing the release later might do the trick, hopefully.

closes #3541

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0
Copy link
Member

just tested it multiple times in a project of mine, got it to reproduce the issue once, even with this patch... I have no idea why it happens though...

I'm thinking... maybe some caching thing when deleting the previous nightly tag? I have no idea at this point :(

@caarlos0 caarlos0 reopened this Nov 18, 2022
@caarlos0
Copy link
Member

okay, at this point I'm fairly sure this is a github bug... opened a ticket for them, will revert part of #3547

https://support.github.com/ticket/personal/0/1883035 <- probably not visible for y'all, but just so I can track it later.

caarlos0 added a commit that referenced this issue Nov 18, 2022
refs #3541
refs #3547

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 modified the milestones: v1.13.0, v1.14.0 Nov 20, 2022
@caarlos0
Copy link
Member

added request id logs so we can track this in the future, as github support also can't reproduce this

@caarlos0
Copy link
Member

caarlos0 commented Dec 5, 2022

got one request id of a failure, reported.

@caarlos0 caarlos0 modified the milestones: v1.14.0, v1.15.0 Dec 29, 2022
@caarlos0
Copy link
Member

after many exchanged emails, my best guess is that its some sort of eventual consistency issue on github, so I added a 5s sleep after deleting the release & tag to prevent re-creating it right away

what seems to be happening is that both the release deletion and creation requests arrive at the same time/out of order, so the creation is processed first (which we then handle as an edit) and after that it deletes it, then when we edit it, because the tag was deleted, it set the release to draft.

I did test it a bit and it seems to be working, so I'll close this once v1.15 is released if everything works out well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pro
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants