cloudfoundry / notifications

The notifications service component of Cloud Foundry
Apache License 2.0
17 stars 22 forks source link

go-gorp warnings spam when running tests #17

Closed osis closed 5 years ago

osis commented 5 years ago

When running tests, it's hard to sift out the useful output due to this go-gorp warning being spammed...

2019/01/16 09:39:21 Warning: Automatic mapping of Version struct members to version columns (see optimistic locking) will be deprecated in next version (V2) See: https://github.com/go-gorp/gorp/pull/214

Would be great to silence this warning somehow.

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

osis commented 5 years ago

Investigated and it seems like the only way to get rid of it is to migrate to 2.0.

Go-Gorp is warning about a migration we should be making because they are introducing a breaking change in 2.0, but we already explicitly map our version column and the deprecation warning logic doesn't have that context so it will fire indefinitely.

Unless we want to rename the version to something else, which seems like overkill to remove the warning.