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

Add an endpoint and client method to fetch the boards cloud limits #3058

Merged
merged 5 commits into from May 16, 2022

Conversation

mgdelacroix
Copy link
Member

@mgdelacroix mgdelacroix commented May 12, 2022

Summary

This PR updates the server dependency to be able to use the new cloud limit plugin APIs and adds an endpoint and a client method to generate and fetch the Boards version of Cloud Limits.

A follow up PR will populate the two fields of the new struct (cardLimitTimestamp and usedCards).

@mgdelacroix mgdelacroix added the 2: Dev Review Requires review by a core committer label May 12, 2022
@mgdelacroix mgdelacroix requested a review from a team as a code owner May 12, 2022 10:29
Copy link
Member

@sbishel sbishel left a comment

Choose a reason for hiding this comment

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

Just wondering if non plugin should be error or not otherwise. LGTM

func (a *App) GetBoardsCloudLimits() (*model.BoardsCloudLimits, error) {
if a.pluginAPI == nil {
return nil, ErrNilPluginAPI
}
Copy link
Member

Choose a reason for hiding this comment

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

It depends on the UI implementation, but should this just return an unlimited BoardCloudLimits object, so that the UI code works the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

0/5 on this, I've updated the response to return a Not Implemented to follow what Channels is doing for unlicensed and non-cloud instances, but I'm happy to return an empty object. Limit = 0 should effectively be the same as no limit, so we can make no distinction and do it like that

@harshilsharma63 harshilsharma63 merged commit 79362d4 into release-7.0 May 16, 2022
@harshilsharma63 harshilsharma63 deleted the add-limits-endpoint branch May 16, 2022 12:16
@harshilsharma63
Copy link
Member

I'm cherrypicking this to main.

harshilsharma63 added a commit that referenced this pull request Jun 6, 2022
…3058)

* Add an endpoint and client method to fetch the boards cloud limits

* Fix linter

* Respond with Not Implemented if the plugin is not set

* Fixing server tests

* lint fix

Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants