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

Check cloud feature before setting billing access for web #6537

Merged
merged 7 commits into from
May 5, 2021

Conversation

kimlisa
Copy link
Contributor

@kimlisa kimlisa commented Apr 21, 2021

fixes #6447

Description

Init web handler with feature flags on proxy init

  • Retrieve auth server settings by calling Ping, which contains the server feature flags in the response
  • Check for cloud feature is supported before setting billing access

@kimlisa kimlisa force-pushed the lisa/cloud-feature-flag branch from ccea797 to 1993c8c Compare April 21, 2021 18:29
lib/web/apiserver.go Outdated Show resolved Hide resolved
@kimlisa kimlisa requested a review from klizhentas as a code owner April 22, 2021 17:55
@kimlisa kimlisa force-pushed the lisa/cloud-feature-flag branch from 0c31d2c to 19b4199 Compare April 22, 2021 17:56
Copy link
Contributor

@alex-kovoy alex-kovoy left a comment

Choose a reason for hiding this comment

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

Looks good to me, just do not forget to remove Print statements.

lib/web/apiserver.go Outdated Show resolved Hide resolved
@kimlisa kimlisa force-pushed the lisa/cloud-feature-flag branch 4 times, most recently from 147f910 to c341b6b Compare April 26, 2021 18:08
lib/service/connect.go Outdated Show resolved Hide resolved
lib/service/connect.go Outdated Show resolved Hide resolved
lib/service/cfg.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
@kimlisa kimlisa force-pushed the lisa/cloud-feature-flag branch 2 times, most recently from c4f6194 to 7cc9a96 Compare April 28, 2021 16:58
@kimlisa kimlisa force-pushed the lisa/cloud-feature-flag branch from 7cc9a96 to 61ed3a9 Compare April 28, 2021 22:40
@kimlisa kimlisa requested a review from r0mant April 29, 2021 00:57
if err == nil {
process.setClusterFeatures(pingResponse.GetServerFeatures())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please log server features loaded from auth server here? In Info mode. It would be helpful for troubleshooting, right now there's no visibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

logged

Copy link
Contributor

@russjones russjones left a comment

Choose a reason for hiding this comment

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

Bot.

kimlisa added 5 commits May 5, 2021 13:00
- Use Ping (that responds with server features) instead of GetNamespace to test c/n
- Set server features for web handler (to set it once on register.proxy)
- Add lock before setting
- Remove print statements
- rename authServerFeatures to clusterFeatures
- defined a locked getter to retrieve cluster features
- check for nil before setting
@kimlisa kimlisa force-pushed the lisa/cloud-feature-flag branch from 61ed3a9 to 14fecbd Compare May 5, 2021 20:26
@kimlisa kimlisa merged commit 9c06ddc into master May 5, 2021
@kimlisa kimlisa deleted the lisa/cloud-feature-flag branch May 5, 2021 21:58
kimlisa added a commit that referenced this pull request May 5, 2021
* Init web handler with auth server feature flags on proxy init
* Retrieve auth server features by calling Ping when connecting
  to auth svc which contains the server feature flags in the response
kimlisa added a commit that referenced this pull request May 5, 2021
* Init web handler with auth server feature flags on proxy init
* Retrieve auth server features by calling Ping when connecting 
  to auth svc which contains the server feature flags in the response
kimlisa added a commit that referenced this pull request May 5, 2021
* Init web handler with auth server feature flags on proxy init
* Retrieve auth server features by calling Ping when connecting
  to auth svc which contains the server feature flags in the response
kimlisa added a commit that referenced this pull request May 6, 2021
…#6754)

* Create GET db and kube list web handlers (#6672)
* Check cloud feature before setting billing access for web (#6537)
 - Init web handler with auth server feature flags on proxy init
 - Retrieve auth server features by calling Ping when connecting 
  to auth svc which contains the server feature flags in the response
kimlisa added a commit that referenced this pull request May 6, 2021
)

* Init web handler with auth server feature flags on proxy init
* Retrieve auth server features by calling Ping when connecting
  to auth svc which contains the server feature flags in the response
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

Successfully merging this pull request may close these issues.

Do not show billing and usage on non-cloud
4 participants