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

Git commit overwritten causes builds to fail #14

Open
dan-hipschman opened this issue Nov 15, 2020 · 8 comments
Open

Git commit overwritten causes builds to fail #14

dan-hipschman opened this issue Nov 15, 2020 · 8 comments

Comments

@dan-hipschman
Copy link

Hello,

Thanks for reflections!

We're using this project and had it pinned in Gopkg.lock as follows:

[[projects]]
  digest = "1:c17f50b4ccbba568a6fc10b06a24bb8ac99077470fd48a905759f9914d631dd7"
  name = "github.com/oleiade/reflections"
  packages = ["."]
  pruneopts = "NUT"
  revision = "2b6ec3da648e3e834dc41bad8d9ed7f2dc6a9496"
  version = "v1.0.0"

Earlier today it looks like our builds started failing because the commit 2b6ec3da648e3e834dc41bad8d9ed7f2dc6a9496 no longer exists in this repo. I don't have the full history, but it looks like new commits were force pushed over old commits and and the v1.0.0 tag was updated.

Just a heads up that this will break our builds (and whoever else is using it this way). We can update the lock file on our side, but just letting you know it would be appreciated if new commits are only merged and never rebased so history is preserved, and tags aren't updated.

Thanks again! :)

@filipeandre
Copy link

Please don't override tags.

@sashayakovtseva
Copy link

same issue with go modules :((

@huucp
Copy link

huucp commented Nov 19, 2020

same issue with go modules :((

I try to remove my go.sum, use go clean -modcache, then go mod tidy again.
Sometimes it's work, sometimes it's not.
Now, I have to hardcode the hash in go.sum to make the CI build run, but I cannot run the app in local.

@sashayakovtseva
Copy link

sashayakovtseva commented Nov 19, 2020

@huucp this works without need to hardcode hashsum:

  1. go clean --modcache
  2. rm go.sum
  3. GOSUMDB=off go mod tidy or whatever mod command you need

once done, no need for GOSUMDB=off any more

@thienna
Copy link

thienna commented Nov 23, 2020

@huucp
export GOSUMDB=off && go clean -modcache && rm go.sum && go mod tidy

@lagren
Copy link

lagren commented Nov 27, 2020

That solution is sadly not possible when using external systems, e.g. GitHub's Dependabot:

verifying github.com/oleiade/reflections@v1.0.0/go.mod: checksum mismatch
	downloaded: h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=
	go.sum:     h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

Maybe releasing a 1.0.1 could work?

@oleiade
Copy link
Owner

oleiade commented Nov 27, 2020

Hi folks,

Really sorry about that!! Thanks for reporting it @dan-hipschman-od (and your kindness about it) much appreciated. I updated all my libraries to support go modules in one go and wanted to "mark the hit" (like we say in french). I realize now, in hindsight, that rewriting the master history, and overriding the existing release was a terrible idea. That's a learning for me 👍

I will release a v1.0.1 right away to address the issue that have been mentioned above.
Thanks for your patience 🦕

@oleiade
Copy link
Owner

oleiade commented Nov 27, 2020

I have pushed a v1.0.1 tag, and published a release. Let me know if you're still experiencing issues after bumping the version you use on your side. Thanks for your support 🙏

yakkle added a commit to yakkle/rewardcalculator that referenced this issue Dec 3, 2020
dveeden added a commit to dveeden/tidb-dashboard that referenced this issue Feb 5, 2021
C0rby pushed a commit to owncloud/ocis that referenced this issue Feb 19, 2021
The replace should resolve the dependabot issue. See oleiade/reflections#14. Once https://github.com/ory/fosite has updated to reflections 1.0.1 or higher we can remove the replace.
C0rby pushed a commit to owncloud/ocis that referenced this issue Feb 23, 2021
Updated reva and also add a replace for github.com/oleiade/reflections.
The replace should resolve the dependabot issue. See oleiade/reflections#14. Once https://github.com/ory/fosite has updated to reflections 1.0.1 or higher we can remove the replace.
C0rby pushed a commit to owncloud/ocis that referenced this issue Feb 23, 2021
Update reva and also set a replace for github.com/oleiade/reflections.
The replace should resolve the dependabot issue. See oleiade/reflections#14. Once https://github.com/ory/fosite has updated to reflections 1.0.1 or higher we can remove the replace.
C0rby pushed a commit to owncloud/ocis that referenced this issue Feb 23, 2021
Update reva and also set a replace for github.com/oleiade/reflections.
The replace should resolve the dependabot issue. See oleiade/reflections#14. Once https://github.com/ory/fosite has updated to reflections 1.0.1 or higher we can remove the replace.
C0rby pushed a commit to owncloud/ocis that referenced this issue Feb 23, 2021
Update reva and also set a replace for github.com/oleiade/reflections.
The replace should resolve the dependabot issue. See oleiade/reflections#14. Once https://github.com/ory/fosite has updated to reflections 1.0.1 or higher we can remove the replace.
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

No branches or pull requests

7 participants