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

Use WebSocket to get global settings #2008

Merged
merged 33 commits into from
Feb 26, 2020
Merged

Use WebSocket to get global settings #2008

merged 33 commits into from
Feb 26, 2020

Conversation

maciaszczykm
Copy link
Contributor

@maciaszczykm maciaszczykm commented Feb 14, 2020

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #1903.

Special notes for your reviewer:

  • serve crashes on websocket close angular/angular-cli#11156 is a known bug that will crash the app if it is served locally and the connection will be rejected/canceled by the server.
  • changeOrigin: true in our proxy configurations doesn't change the Origin header but Host (Update options.changeOrigin description in docs chimurai/http-proxy-middleware#141). Backend is checking for the Origin header as it does not allow cross-origin requests. It will not be a problem as both UI and API will be normally served on the same host, but it was a problem for our development setup. headers: {'Origin': 'https://dev.kubermatic.io'} solves that problem as the proxy will override the Origin header too. I am leaving it there as it was extremely hard to find it as Angular CLI uses webpack-dev-server which uses http-middleware-proxy and each one of them has different configuration which are not documented.

Release note:

Use WebSocket to get global settings.

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Feb 14, 2020
@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maciaszczykm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 14, 2020
@codecov
Copy link

codecov bot commented Feb 14, 2020

Codecov Report

Merging #2008 into master will increase coverage by 0.12%.
The diff coverage is 52.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2008      +/-   ##
==========================================
+ Coverage   68.67%   68.79%   +0.12%     
==========================================
  Files         248      248              
  Lines        9168     9169       +1     
  Branches     1170     1169       -1     
==========================================
+ Hits         6296     6308      +12     
+ Misses       2866     2855      -11     
  Partials        6        6
Impacted Files Coverage Δ
src/environments/environment.ts 100% <ø> (ø) ⬆️
src/app/settings/admin/admin-settings.component.ts 41.93% <0%> (-0.69%) ⬇️
src/app/wizard/wizard.component.ts 48.53% <100%> (ø) ⬆️
src/app/core/services/settings/settings.service.ts 64.93% <90%> (+12.37%) ⬆️
src/app/kubermatic.component.ts 65.75% <0%> (+2.73%) ⬆️
src/app/core/components/footer/footer.component.ts 92.3% <0%> (+7.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 888b9b3...6dd5e76. Read the comment docs.

@kubermatic-bot kubermatic-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 17, 2020
@maciaszczykm
Copy link
Contributor Author

/assign @floreks

@maciaszczykm maciaszczykm changed the title [WIP] Use WebSocket endpoint to get global settings Use WebSocket endpoint to get global settings Feb 17, 2020
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 17, 2020
@kubermatic-bot kubermatic-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 18, 2020
@kubermatic-bot kubermatic-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2020
@kubermatic-bot
Copy link
Contributor

kubermatic-bot commented Feb 21, 2020

@maciaszczykm: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-dashboard-e2e d6d0fae link /test pull-dashboard-e2e

Full PR test history

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@maciaszczykm maciaszczykm changed the title [WIP] Use WebSocket endpoint to get global settings Improve global settings WebSocket Feb 24, 2020
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 24, 2020
@maciaszczykm maciaszczykm changed the title Improve global settings WebSocket [WIP] Add global settings WebSocket Feb 24, 2020
@kubermatic-bot kubermatic-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 24, 2020
@maciaszczykm maciaszczykm changed the title [WIP] Add global settings WebSocket [WIP] Use WebSocket endpoint to get global settings Feb 24, 2020
@maciaszczykm
Copy link
Contributor Author

/retest

@maciaszczykm maciaszczykm changed the title [WIP] Use WebSocket endpoint to get global settings Use WebSocket endpoint to get global settings Feb 25, 2020
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 25, 2020
@maciaszczykm maciaszczykm changed the title Use WebSocket endpoint to get global settings Use WebSocket to get global settings Feb 25, 2020
@maciaszczykm
Copy link
Contributor Author

@floreks Please take another look, it seems that I have fixed existing problems already. Please also test it, there is no hurry with it and I'd like to be sure that nothing breaks.

/assign @kgroschoff

Please verify it too if you can.

@floreks
Copy link
Contributor

floreks commented Feb 26, 2020

/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2020
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 158872838ad4a357f4a3ff886f8cd4bc24df1889

@kubermatic-bot kubermatic-bot merged commit cd8acb0 into kubermatic:master Feb 26, 2020
@maciaszczykm maciaszczykm deleted the feature/settings-ws branch February 26, 2020 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a watch mechanism (sockets) for the live updates
4 participants