Skip to content

[server] Bump dependencies avoid pulling 'agent-base' < 6.0.0 #2388

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 3 commits into from
Jan 15, 2021

Conversation

geropl
Copy link
Member

@geropl geropl commented Dec 3, 2020

This is an alternative to the patching to work around agent-base in #2375.

No hurry to merge, but maybe a way to replace the workaround.

Test: http://gpl-at-gilab-api.staging.gitpod-dev.com/workspaces/

@geropl geropl requested a review from AlexTugarev December 3, 2020 10:08
@AlexTugarev
Copy link
Member

AlexTugarev commented Dec 3, 2020

👍🏻 You make it work! Wow!

This is great, replaces all old dependencies as well. Please rebase!

@@ -15,7 +15,7 @@
"downlevelIteration": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"target": "es6",
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻

@csweichel
Copy link
Contributor

csweichel commented Dec 3, 2020

Awesome stuff! This is the only way forward. 🚀

One thing I'm wondering about is the timing.
Q: how high is the risk that we're breaking something else because of the library version bumps? Also, how does the risk of this change trade off with the one that's already in master?

@geropl
Copy link
Member Author

geropl commented Dec 3, 2020

One thing I'm wondering about is the timing.
Q: how high is the risk that we're breaking something else because of the library version bumps? Also, how does the risk of this change trade off with the one that's already in master?

That's what I meant with "no hurry to merge". As we already merged the patch and tested it, this is more of a cleanup thing. Let's do it sometime in over the next weeks.

@@ -52,7 +53,11 @@ export const productionEEContainerModule = new ContainerModule((bind, unbind, is
bind(PrebuildRateLimiter).toSelf().inSingletonScope();
bind(PrebuildQueueMaintainer).toSelf().inSingletonScope();
bind(IPrefixContextParser).to(StartPrebuildContextParser).inSingletonScope();
bind(GithubApp).toSelf().inSingletonScope();
bind(GithubApp).toDynamicValue(ctx => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: This might be irrelevant

Copy link
Member

Choose a reason for hiding this comment

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

isn't it same as the ctor injection?
or did you try to solve an issue with eager dep resolution?

const user = await this.userDB.findUserByIdentity({ authProviderId: this.env.githubAppAuthProviderId, authId });
const userId = user ? user.id : undefined;
await this.appInstallationDB.recordNewInstallation("github", 'platform', ctx.payload.installation.id, userId, ctx.payload.sender.id);
await this.appInstallationDB.recordNewInstallation("github", 'platform', accountId, userId, `${ctx.payload.sender.id}`);
Copy link
Member

Choose a reason for hiding this comment

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

⚠️ ctx.payload.installation.id vs. ctx.payload.installation.account.id

Copy link
Member

Choose a reason for hiding this comment

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

same?

Copy link
Member

Choose a reason for hiding this comment

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

@geropl, AFAIR this question was the only important thing to have a look at. otherwise we should merge it to get rid of the technical dept.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@AlexTugarev
Copy link
Member

@geropl did you delete yarn.lock and run yarn? there are quite a lot changes in there. just asking to understand why this is so.

@AlexTugarev
Copy link
Member

yarn.lock is actually not updated (again)

@AlexTugarev AlexTugarev added this to the January 2021 milestone Jan 7, 2021
@geropl geropl self-assigned this Jan 8, 2021
@AlexTugarev
Copy link
Member

would be good to remove https://github.com/gitpod-io/gitpod/blob/39c7e56b694591162fa3ad12cd9968fce56f07a8/components/server/src/patch-agent-base.ts and references to it.

@geropl geropl requested a review from AlexTugarev January 13, 2021 14:37
@AlexTugarev
Copy link
Member

AlexTugarev commented Jan 15, 2021

/werft run

👍 started the job as gitpod-build-gpl-at-gilab-api.8

@AlexTugarev
Copy link
Member

AlexTugarev commented Jan 15, 2021

=> Found "[email protected]"
info Has been hoisted to "agent-base"
info Reasons this module exists
   - "workspace-aggregator-769cbf04-dba8-4677-98a6-7bba861de53f" depends on it
   - Hoisted from "_project_#https-proxy-agent#agent-base"
   - Hoisted from "_project_#@gitpod#server#@graphql-codegen#cli#@graphql-tools#prisma-loader#http-proxy-agent#agent-base"
info Disk size without dependencies: "172KB"
info Disk size with unique dependencies: "304KB"
info Disk size with transitive dependencies: "320KB"
info Number of shared dependencies: 2
=> Found "puppeteer#[email protected]"
info Reasons this module exists
   - "_project_#@theia#cli#puppeteer#https-proxy-agent" depends on it
   - Hoisted from "_project_#@theia#cli#puppeteer#https-proxy-agent#agent-base"
info Disk size without dependencies: "68KB"
info Disk size with unique dependencies: "88KB"
info Disk size with transitive dependencies: "484KB"
info Number of shared dependencies: 2
Done in 1.73s.

it still finds [email protected] via @theia#cli#puppeteer#https-proxy-agent, which isn't relevant as long as [email protected] is hoisted.

Copy link
Member

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

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

👏🏻 Great!

@geropl geropl merged commit 1ac8fbe into master Jan 15, 2021
@geropl geropl deleted the gpl/at/gilab-api branch January 15, 2021 17:06
pavan-tri pushed a commit to trilogy-group/gitpod that referenced this pull request Apr 28, 2021
…-io#2388)

* [server] Bump dependencies avoid pulling 'agent-base' < 6.0.0

* [server] Remove patch-agent-base and references

* [server] Cleanup: yarn.lock
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.

3 participants