Skip to content

Conversation

@sampaiodiego
Copy link
Member

@sampaiodiego sampaiodiego commented Dec 17, 2024

Proposed changes (including videos or screenshots)

The idea is to remove code dependencies to "settings cached" during the startup that are spread everywhere in the codebase. This is basically but not only represented by code using settings in the file's top level scope.

The currently method to make sure the settings cache is built before code is run is importing the "cached settings" from the file that builds the cache, so the top level await will ensure the cache is built before everything else runs. The proposal here is that we don't rely on this mechanism anymore by having a more clear code path, so we first build the cache and after that we import everything else.

So this is the first step of many to come, the changes are basically moving code relying on settings to functions and then calling this functions on the appropriate moment.

Issue(s)

ARCH-1398

Steps to test or reproduce

Further comments

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 17, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2024

⚠️ No Changeset found

Latest commit: fbdb1e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-34199/
on branch gh-pages at 2025-01-08 15:05 UTC

@codecov
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.13%. Comparing base (facee3b) to head (fbdb1e7).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           develop   #34199       +/-   ##
============================================
+ Coverage    59.21%   75.13%   +15.92%     
============================================
  Files         2824      519     -2305     
  Lines        67988    22944    -45044     
  Branches     15122     5537     -9585     
============================================
- Hits         40257    17240    -23017     
+ Misses       24902     5038    -19864     
+ Partials      2829      666     -2163     
Flag Coverage Δ
e2e ?
e2e-api ?
unit 75.13% <ø> (ø)

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

@sampaiodiego sampaiodiego force-pushed the remove-settings-deps-on-startup branch from 621797f to 63fef6e Compare December 17, 2024 18:12
@sampaiodiego sampaiodiego changed the title chore: Remove settings dependency on startup refactor: Remove settings dependency on startup Dec 17, 2024
@sampaiodiego sampaiodiego marked this pull request as ready for review December 19, 2024 19:12
@sampaiodiego sampaiodiego requested a review from a team as a code owner December 19, 2024 19:12
ricardogarim
ricardogarim previously approved these changes Jan 7, 2025
KevLehman
KevLehman previously approved these changes Jan 8, 2025
@KevLehman KevLehman dismissed their stale review January 8, 2025 13:56

There's a lint issue i didn't notice first :)

@sampaiodiego sampaiodiego added the stat: QA assured Means it has been tested and approved by a company insider label Feb 10, 2025
@sampaiodiego sampaiodiego added this to the 7.4.0 milestone Feb 10, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 10, 2025
@kodiakhq kodiakhq bot merged commit a49eb98 into develop Feb 10, 2025
47 of 48 checks passed
@kodiakhq kodiakhq bot deleted the remove-settings-deps-on-startup branch February 10, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants