Skip to content

[admin] (temp) disable telemetry for gitpod.io #8386

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

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Feb 22, 2022

NONE

mrsimonemms
mrsimonemms previously approved these changes Feb 22, 2022
@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #8386 (be8cf75) into main (d9b9f30) will increase coverage by 2.75%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            main    #8386      +/-   ##
=========================================
+ Coverage   8.41%   11.17%   +2.75%     
=========================================
  Files         33       18      -15     
  Lines       2340      993    -1347     
=========================================
- Hits         197      111      -86     
+ Misses      2138      880    -1258     
+ Partials       5        2       -3     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
install-installer-raw-app ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...installer/pkg/components/ws-manager/rolebinding.go
install/installer/pkg/common/objects.go
install/installer/pkg/common/render.go
install/installer/pkg/common/ca.go
components/local-app/pkg/auth/auth.go
install/installer/pkg/common/common.go
...nstall/installer/pkg/components/ws-manager/role.go
...l/installer/pkg/components/ws-manager/configmap.go
.../installer/pkg/components/ws-manager/deployment.go
install/installer/pkg/common/storage.go
... and 5 more

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 d9b9f30...be8cf75. Read the comment docs.

@@ -22,11 +22,14 @@ export default function Settings() {
const { user } = useContext(UserContext);

useEffect(() => {
if (isGitpodIo()) {
return; // temporarily disable to avoid hight CPU on the DB
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need to disable it since the missing dependency arg is what's causing the infinite loop?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think yes, because we should not be giving our users insights or the permission to see/set this page for the whole SAAS instance? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

It wasn't causing an infinite loop. 😌 It's just on each re-render it was called, instead of a single init call.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, if it's only the missing dependency arg. It could also be that this query is too expensive with our large instance DB:

public async getInstanceCount(type?: string): Promise<number> {
const workspaceInstanceRepo = await this.getWorkspaceInstanceRepo();
const queryBuilder = workspaceInstanceRepo.createQueryBuilder("wsi")
.leftJoinAndMapOne("wsi.workspace", DBWorkspace, "ws", "wsi.workspaceId = ws.id")
.where("ws.type = :type", { type: type ? type.toString() : "regular" }); // only regular workspaces by default
return await queryBuilder.getCount();
}

Don't know how to figure that out, though.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right. The useEffect issue was not a big deal, it just amplified the actual problem.

Copy link
Contributor

@JanKoehnlein JanKoehnlein left a comment

Choose a reason for hiding this comment

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

LGTM

@roboquat roboquat merged commit adf6a32 into main Feb 23, 2022
@roboquat roboquat deleted the at/disable-telemetry branch February 23, 2022 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/XS team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants