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

Proxy upstream support #60

Merged
merged 13 commits into from
Jun 11, 2020
Merged

Proxy upstream support #60

merged 13 commits into from
Jun 11, 2020

Conversation

lieut-data
Copy link
Member

Summary

Support proxying to an upstream marketplace via --upstream or the BUILD_UPSTREAM_URL environment variable that is baked into a binary.

This is useful for customers that want to supply their own plugins, but simultaneously stay up-to-date to an upstream marketplace like api.integrations.mattermost.com. This is immediately useful for launching a "beta listing" of the marketplace in which to list upcoming efforts, such as the incident response plugin, but without exposing to all users of the marketplace.

Ticket Link

N/A

@lieut-data lieut-data added the 2: Dev Review Requires review by a core committer label Apr 23, 2020
@lieut-data lieut-data requested review from hanzei and alifarooq0 April 23, 2020 02:51
@lieut-data lieut-data added the 3: QA Review Requires review by a QA tester label Apr 23, 2020
Makefile Outdated Show resolved Hide resolved
Copy link
Contributor

@alifarooq0 alifarooq0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done sir! Great feature 🎉

internal/store/proxy_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One questions and one comment about the code flow.

Great work Jesse 🎉

Makefile Outdated Show resolved Hide resolved
cmd/lambda/main.go Outdated Show resolved Hide resolved
@lieut-data lieut-data requested a review from hanzei April 29, 2020 17:48
@hanzei hanzei removed the 2: Dev Review Requires review by a core committer label Apr 29, 2020
@lieut-data lieut-data requested a review from DHaussermann April 30, 2020 15:01
@DHaussermann
Copy link

@lieut-data can you please provide some guidance for testing this change? It's not quite clear to me how to test this.
If start my server withgo run ./cmd/marketplace server --upstream https://api.integrations.mattermost.com and then point the Mattermost server to my local instance, should it also show me additional plgins coming from https://api.integrations.mattermost.com?

@lieut-data
Copy link
Member Author

@DHaussermann, yes, that's basically the idea. You'll have to edit your local plugins.json with something to "overlay" the upstream. Note that this is live on https://api.private-beta.integrations.mattermost.com/ as well.

@DHaussermann
Copy link

@hanzei if you have time, is this something you would be able to peer test using the peer testing process documented here?https://mattermost.atlassian.net/wiki/spaces/INT/pages/619937892/Peer+Testing+Process

@hanzei hanzei self-requested a review June 10, 2020 09:50
@hanzei
Copy link
Collaborator

hanzei commented Jun 10, 2020

Sure @DHaussermann 👍

Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope

Allow upstream marketplace

Testing notes

  • Modified plugins.json to only contain a Matterpoll release
  • Run go run ./cmd/marketplace server --upstream https://api.integrations.mattermost.com
  • Confirmed that Marketplace Modal shows all plugins from https://api.integrations.mattermost.com and the Matterpoll release

Follow-up concerns

None

@hanzei
Copy link
Collaborator

hanzei commented Jun 10, 2020

@DHaussermann ☝️

@lieut-data lieut-data added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Jun 10, 2020
@lieut-data lieut-data removed the request for review from DHaussermann June 10, 2020 12:05
@lieut-data
Copy link
Member Author

Thanks, @hanzei!

@DHaussermann
Copy link

Thanks for testing @hanzei! Much appreciated.

@lieut-data lieut-data merged commit 9b5b455 into master Jun 11, 2020
@lieut-data lieut-data deleted the proxy-upstream branch June 11, 2020 13:32
lieut-data added a commit that referenced this pull request Jul 13, 2020
* [MM-21749] [MM-22214] Add "Beta" and "Community" label (#37)

* Add beta and community label

* wording

* Feedback

* Make use of model.IsValid() (#44)

* Pin github.com/rakyll/statik version (#47)

* document automatic deployment (#46)

* document automatic deployment

* tweak merging language

Co-authored-by: Ben Schumacher <[email protected]>

* Add issue templates for community plugins (#45)

Add two issue templates: one for adding a new community plugin and one for updating an existing community plugin.

* [MM-23184] Omit empty labels list (#48)

* Drop iconPaths workaround (#62)

* Use GITHUB_TOKEN env variable instead of having the user define it (#54)

* Proxy upstream support (#60)

* s/store/staticStore/

* prefer later plugins if version exactly matches

* introduce merged and proxy stores

* support --upstream

* generate on run-server

* update to go1.14

* tidy up interface/comments

* golangci-lint local-only complaints

* Update internal/store/proxy_test.go

* revert generate on run-server

* avoid merged store unless needed

Co-authored-by: Ben Schumacher <[email protected]>
Co-authored-by: mattermod <[email protected]>

* Ensure manually added plugins stay in the database (#68)

* Send Announcements for new plugins (#76)

* Limit enterprise plugins to E20 installations (#79)

* Limit enterprise plugins to E20 installations

* Apply suggestions from code review

Co-authored-by: Aaron Rothschild <[email protected]>

* Make getPlugins signature more clear

* Don't omit enterprise in json

* make generate

* Include workaround for https://mattermost.atlassian.net/browse/MM-26507

* Fix typo

* Changes as requested

* Drop else

* Move minVersionSupportingEnterpriseFlags into global scope

Co-authored-by: Aaron Rothschild <[email protected]>

* Add Enterprise label to MS Calendar

* make generate

Co-authored-by: Jesse Hallam <[email protected]>
Co-authored-by: mattermod <[email protected]>
Co-authored-by: Aaron Rothschild <[email protected]>
lieut-data added a commit that referenced this pull request Jul 13, 2020
* [MM-21749] [MM-22214] Add "Beta" and "Community" label (#37)

* Add beta and community label

* wording

* Feedback

* Make use of model.IsValid() (#44)

* Pin github.com/rakyll/statik version (#47)

* document automatic deployment (#46)

* document automatic deployment

* tweak merging language

Co-authored-by: Ben Schumacher <[email protected]>

* Add issue templates for community plugins (#45)

Add two issue templates: one for adding a new community plugin and one for updating an existing community plugin.

* [MM-23184] Omit empty labels list (#48)

* Drop iconPaths workaround (#62)

* Use GITHUB_TOKEN env variable instead of having the user define it (#54)

* Proxy upstream support (#60)

* s/store/staticStore/

* prefer later plugins if version exactly matches

* introduce merged and proxy stores

* support --upstream

* generate on run-server

* update to go1.14

* tidy up interface/comments

* golangci-lint local-only complaints

* Update internal/store/proxy_test.go

* revert generate on run-server

* avoid merged store unless needed

Co-authored-by: Ben Schumacher <[email protected]>
Co-authored-by: mattermod <[email protected]>

* Ensure manually added plugins stay in the database (#68)

* Send Announcements for new plugins (#76)

* Limit enterprise plugins to E20 installations (#79)

* Limit enterprise plugins to E20 installations

* Apply suggestions from code review

Co-authored-by: Aaron Rothschild <[email protected]>

* Make getPlugins signature more clear

* Don't omit enterprise in json

* make generate

* Include workaround for https://mattermost.atlassian.net/browse/MM-26507

* Fix typo

* Changes as requested

* Drop else

* Move minVersionSupportingEnterpriseFlags into global scope

Co-authored-by: Aaron Rothschild <[email protected]>

* Merge production into master (#88)

* Merge master into production (#49)

* [MM-21749] [MM-22214] Add "Beta" and "Community" label (#37)

* Add beta and community label

* wording

* Feedback

* Make use of model.IsValid() (#44)

* Pin github.com/rakyll/statik version (#47)

* document automatic deployment (#46)

* document automatic deployment

* tweak merging language

Co-authored-by: Ben Schumacher <[email protected]>

* Add issue templates for community plugins (#45)

Add two issue templates: one for adding a new community plugin and one for updating an existing community plugin.

* [MM-23184] Omit empty labels list (#48)

Co-authored-by: Jesse Hallam <[email protected]>

* Add v0.14.0 of mattermost-plugin-github to the Marketplace (#51)

* Add v1.3.0 of mattermost-plugin-zoom to the Marketplace (#50)

* Add v1.2.0 of mattermost-plugin-custom-attributes to the Marketpl… (#53)

* Add mattermost plugin autolink v1.2.0 (#56)

* Add v1.2.0 of mattermost-plugin-autolink to the Marketplace

* Remove custom-attributes from this PR

* add the statik.go file after manually removed autolink from plugins.json and reran 'make generate'

Co-authored-by: Ben Schumacher <[email protected]>

* Add v1.3.1 of mattermost-plugin-zoom to the Marketplace (#59)

* Add mattermost plugin todo v0.2.0 (#57)

* Add v2.4.0 of mattermost-plugin-jira to the Marketplace (#66)

* Add v1.0.4 of mattermost-plugin-nps to the Marketplace (#63)

* Add v0.2.0 of mattermost-plugin-skype4business to the Marketplace (#70)

* Add v1.0.0 of mattermost-plugin-github to the Marketplace (#69)

* Add v1.2.0 of mattermost-plugin-confluence to the Marketplace (#73)

* Add mattermost plugin welcomebot v1.2.0 (#71)

* Add v1.0.0 of mattermost-plugin-mscalendar to the Marketplace (#78)

* Add v1.1.0 of mattermost-plugin-jenkins to the Marketplace (#80)

* Add v2.0.0 of mattermost-plugin-jitsi to the Marketplace (#82)

* Add Enterprise label to MS Calendar

* make generate

* Add v1.3.0 of mattermost-plugin-giphy-moussetc to the Marketplace (#85)

Co-authored-by: Jesse Hallam <[email protected]>
Co-authored-by: Jason Frerich <[email protected]>

* s/sls/serverless

Co-authored-by: Ben Schumacher <[email protected]>
Co-authored-by: mattermod <[email protected]>
Co-authored-by: Aaron Rothschild <[email protected]>
Co-authored-by: Jason Frerich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants