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

Chore: Update Meteor to 2.5.3 #24075

Merged
merged 58 commits into from
Jan 14, 2022
Merged

Chore: Update Meteor to 2.5.3 #24075

merged 58 commits into from
Jan 14, 2022

Conversation

sampaiodiego
Copy link
Member

@sampaiodiego sampaiodiego commented Dec 31, 2021

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

This is a very early draft. Things still missing:

  • Publish updated fork of Meteor package pauli:linkedin-oauth - instead of publishing a fork I added the code to /packages folder
  • Publish updated fork of Meteor package pauli:accounts-linkedin - instead of publishing a fork I added the code to /packages folder
  • Publish updated fork of Meteor package nimble:restivus - published as rocketchat:restivus
  • Publish updated fork of Meteor package rocketchat:oauth2-server
  • Publish updated fork of Meteor package rocketchat:tap-i18n
  • Fix an issue with async_hooks - we found out Meteor 2.5 is not compatible with Async Hooks (as per Usage of async_hooks / AsyncLocalStorage conflicts with Meteor 2.3+ / Node 12+ meteor/meteor#11539) so we switched to use Fibers instead
  • Modify "oembed" to not use request from HTTPInternals
  • Update Node version everywhere (workflows, Dockerfiles, etc)
  • Test LinkedIn OAuth flow
  • logoutOtherClients was removed
  • npmRequestOptions is not supported anymore
  • tests are breaking because of there is no MAIL_URL set, this changed in recent meteor versions, we need to figure out a way to be able to run tests without an email service
  • Test on IE11

I have a local copy of all those packages updated, it is just a matter of forking and publishing.

The other issues are real work that needs to be done.

What needs to be tested

Some parts of the system had to be re-written, so it would be good to have a focus on tests:

  • Apps using the HTTP bridge
  • App management (install from zip, install from url, update, etc)
  • Integrations:
    • Outgoing webhook requests
    • Incoming/outgoing webhook with custom scripts using HTTP calls
  • Update avatar from URL
  • File upload coming from SMS/MMS (omnichannel)
  • Logout from other clients
  • Oembed (URL previews on messages)
  • Services - both using micro services with an EE license and the execution of internal services on CE
  • The email sending during tests had to be overwritten to show only a console.log
  • Every outgoing request that should not validate the HTTP certificate (per "Allow Invalid Self-Signed Certs" setting)
  • LinkedIn Oauth flow

@sampaiodiego
Copy link
Member Author

so looks like the async hooks issue was fixed on recent node versions nodejs/node#34556 (v15+)
but since we need to stick with v14, I'm not sure how to deal with it

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have added 6 .js files, please convert to ts(x).
packages/accounts-linkedin/linkedin.js
packages/accounts-linkedin/notice.js
packages/accounts-linkedin/package.js
packages/linkedin-oauth/linkedin-client.js
packages/linkedin-oauth/linkedin-server.js
packages/linkedin-oauth/package.js

@sampaiodiego
Copy link
Member Author

with all package dependencies updated, everyone is able to run the code now.

@github-actions github-actions bot dismissed their stale review January 3, 2022 12:54

js files removed

@RocketChat RocketChat deleted a comment from lgtm-com bot Jan 5, 2022
@lgtm-com
Copy link

lgtm-com bot commented Jan 5, 2022

This pull request introduces 7 alerts when merging ad5f566 into bf6878e - view on LGTM.com

new alerts:

  • 4 for Syntax error
  • 3 for Comparison between inconvertible types

@lgtm-com
Copy link

lgtm-com bot commented Jan 10, 2022

This pull request introduces 1 alert and fixes 2 when merging b665425 into 0e755f2 - view on LGTM.com

new alerts:

  • 1 for Disabling certificate validation

fixed alerts:

  • 2 for Useless conditional

@debdutdeb
Copy link
Member

@RocketChat/documentation-team fyi - parts of our documentation might need update. Would be good to have them ready before this gets merged, especially with the gsoc students coming in.

Let me know if I can help in any way.

@debdutdeb
Copy link
Member

cc @Rodriq (since you weren't in the gh team when i mentioned by that)

@lgtm-com
Copy link

lgtm-com bot commented Jan 10, 2022

This pull request introduces 1 alert and fixes 2 when merging 1df2cb4 into 50d55d7 - view on LGTM.com

new alerts:

  • 1 for Disabling certificate validation

fixed alerts:

  • 2 for Useless conditional

rodrigok
rodrigok previously approved these changes Jan 11, 2022
alansikora
alansikora previously approved these changes Jan 11, 2022
Copy link
Collaborator

@alansikora alansikora left a comment

Choose a reason for hiding this comment

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

Great job

@@ -230,7 +230,7 @@
"express": "^4.17.1",
"express-rate-limit": "^5.2.6",
"fflate": "^0.7.1",
"fibers": "4.0.3",
"fibers": "^5.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this going to break CentOS 7 support?

Copy link
Member Author

Choose a reason for hiding this comment

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

I hope not. I can make sure and test it though

@lgtm-com
Copy link

lgtm-com bot commented Jan 12, 2022

This pull request introduces 1 alert and fixes 2 when merging 1544a5e into a06e811 - view on LGTM.com

new alerts:

  • 1 for Disabling certificate validation

fixed alerts:

  • 2 for Useless conditional

@sampaiodiego sampaiodiego dismissed stale reviews from alansikora and rodrigok via af58958 January 12, 2022 12:56
@lgtm-com
Copy link

lgtm-com bot commented Jan 12, 2022

This pull request introduces 1 alert and fixes 2 when merging af58958 into a06e811 - view on LGTM.com

new alerts:

  • 1 for Disabling certificate validation

fixed alerts:

  • 2 for Useless conditional

@lgtm-com
Copy link

lgtm-com bot commented Jan 13, 2022

This pull request introduces 1 alert and fixes 2 when merging 4644f91 into f37c2f4 - view on LGTM.com

new alerts:

  • 1 for Disabling certificate validation

fixed alerts:

  • 2 for Useless conditional

@@ -36,12 +36,12 @@ RUN aptMark="$(apt-mark showmanual)" \
&& apt-mark auto '.*' > /dev/null \
&& apt-mark manual $aptMark > /dev/null \
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
&& find /usr/local -type f -perm /111 -exec ldd '{}' ';' \

-executable doesn't exactly detect if a file is executable or not, since it uses the access syscall. It can potentially return all files (and dirs if no -type f) for a given directory. Since we are updating a lot of stuff in this pr already, let's also change it from this point.

I have not tested it yet, but this change shouldn't affect the image in any way.

Let me know if I'm misreading the purpose of this line 🙈

Copy link
Member

Choose a reason for hiding this comment

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

"on behalf of" definitely not right 😬

Copy link
Member Author

@sampaiodiego sampaiodiego Jan 14, 2022

Choose a reason for hiding this comment

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

I have to say I don't know what that does 😅 it was copied from node's Dockerfile 🤷

https://github.com/nodejs/docker-node/blob/66b46292a6e5dd5856b1d5204dc51547c80eb17a/14/buster-slim/Dockerfile#L45

Copy link
Member

Choose a reason for hiding this comment

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

Looks to me like it's making sure all npm/node dependencies are not accidentally removed when removing some other package with a similar dependency, thus not reducing/eliminating child image issues.

Also, looking at the Dockerfile, I'm not sure we even need those lines to be part of our image, do you remember why those were added initially? 🤔

Copy link
Member Author

@sampaiodiego sampaiodiego Jan 14, 2022

Choose a reason for hiding this comment

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

this image specifically is not intended for production, we call is as "preview" since it has mongo installed and can be used to have a "preview" of a rocket.chat version.

we use the same technique on the production one though.. the ideia is to install some packages just to run the npm install and then clean it up..

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, looks like I commented on the wrong file, but these are part of our production one as well .docker/Dockerfile.

this isn't a big deal 🙈 maybe slightly more time spent on 'building', nothing else.

@lgtm-com
Copy link

lgtm-com bot commented Jan 14, 2022

This pull request introduces 1 alert and fixes 2 when merging 6a46e57 into 1441feb - view on LGTM.com

new alerts:

  • 1 for Disabling certificate validation

fixed alerts:

  • 2 for Useless conditional

@debdutdeb
Copy link
Member

debdutdeb commented Jan 14, 2022

Since it is not part of the diff, the Dockerfile contains the MONGO_(OPLOG_)?URL variables, continuing the alpine image discussion, maybe we should consider not keeping them?

If we need them to be part of the Dockerfile for some external tool parsing, we can just mark them without putting any values

env MONGO_URL ''
env MONGO_OPLOG_URL ''

Ex.

Dockerfile

from scratch

env MONGO_URL ''
[debdut@Venn dd]$ docker inspect -f '{{ .Config.Env}}' 31208319d32a
[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MONGO_URL=]

AFAIK the connection string also has to have the replicaset information a part as well now, which means another assumption by the image.

@sampaiodiego sampaiodiego changed the title Chore: Update Meteor to 2.5.2 Chore: Update Meteor to 2.5.3 Jan 14, 2022
@sampaiodiego sampaiodiego merged commit 96c5555 into develop Jan 14, 2022
@sampaiodiego sampaiodiego deleted the update-meteor-2.5.2 branch January 14, 2022 21:01
gabriellsh added a commit that referenced this pull request Jan 17, 2022
…ove/setup-wizard

* 'develop' of github.com:RocketChat/Rocket.Chat: (176 commits)
  [IMPROVE] Admin page header buttons consistency (#24168)
  i18n: Language update from LingoHub 🤖 on 2022-01-17Z (#24193)
  [FIX] Integration section crashing opening in My Account (#24068)
  [IMPROVE] Rewrite roomNotFound to React Component (#24044)
  Regression: Enable custom emoji on admin custom status page (#24186)
  Chore: Update Meteor to 2.5.3 (#24075)
  [NEW] Apple Login (#24060)
  Chore: Update Apps-Engine to 1.29.2 (#24171)
  feat: enabling emoji on custom status (#24170)
  [FIX] App Framework Enable hanging indefinitely (#24158)
  [FIX] CSV Importer failing to import users (#24090)
  Fix Engagement Dashboard API requests (#24142)
  Language update from LingoHub 🤖 (#24127)
  Chore: Migrate useOutsideClick to fuselage-hooks (#24133)
  Revert "Use fibers to store context"
  Use fibers to store context
  Chore: Include REG_TOKEN in docker-compose (#24123)
  [FIX] Custom Emoji Image preview #24117
  [IMPROVE] Added a Reset Button in the Account Profile Page (#24078)
  Revert: "[IMPROVE] Throw 404 error in invalid endpoints" (#24118)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Jan 29, 2022
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.

None yet

6 participants