-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support vetting source available license #38
Conversation
Automatically detect the new, [Source Available](https://docs.mattermost.com/about/faq-mattermost-source-available-license.html). `enterprise` package within the existing `github.com/mattermost/mattermost/server/v8` module and ensure the appropriate comment. Path checking is preferred to a new, `sourceAvailableLicense` command since we want to retain the ability to `go vet ./...` within the parent `server` package. This does mean it's slightly brittle to major version changes (e.g. switching to v9).
We should bump it to v9 to match with the release version. It's a mistake we haven't done that. @lieut-data - would you like to open a PR to bump that? I'll also check with Amy to add this as a reminder in the checklist for every major version release. For this PR, could we use a regex to match anything >=8? |
Using a regex is brilliant! Thanks @agnivade. On bumping But in that future, do we care about the major version at all anymore? And even now for those clients that still have to import things outside of the public submodule, we almost always recommend pinning at a hash anyway. Thoughts on just leaving it? |
/update-branch |
Summary
This change is a prerequisite to introducing the new, Source Available
enterprise
package within the monorepo, scheduled to contain a (small) subset of the current enterprise functionality.We currently run
go vet
with our custom vet tool with two invocations, essentially vetting theserver/...
package within the monorepo using-license
, and then the separateenterprise/...
repository using-enterpriseLicense
:This pull request proposes automatically detecting the new
enterprise
package atgithub.com/mattermost/mattermost/server/v8/enterprise
and treating it slightly differently for the purpose of vetting the license. In principle, we could support a-sourceAvailable
license check, but then we'd need a way to./...
while excluding theenterprise/
package.The downside to this approach is that we're effectively embedding the major version into this tool, and it will break if we ever bump to
v9/
. (Though with the new public submodule, it's not really clear we ever "need" to do that.)Suggestions welcome on better approaches here! Once this is merged, though, I'll push the affected enterprise source to the monorepo.
Ticket Link
None.