Skip to content

[WIP] [Experimental] new architecture #6155

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

Open
wants to merge 64 commits into
base: newarchitecture
Choose a base branch
from
Open

Conversation

kanwarujjaval
Copy link
Member

No description provided.

@kanwarujjaval kanwarujjaval requested a review from Copilot April 19, 2025 09:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements experimental architectural changes across multiple modules and improves error handling and code clarity. Key changes include updating the database connection call in pluginManager.js, adding a fallback for performance.now() in log.js, fixing a typographical error in changeStreamReader.js, and enhancing optional chaining in ingestor.js.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
plugins/pluginManager.js Updates the dbConnection invocation method
api/utils/log.js Adds a fallback function for performance.now()
api/parts/data/changeStreamReader.js Fixes a spelling typo in the onData parameter comment
api/ingestor.js Enhances optional chaining with default values
Files not reviewed (1)
  • .eslintrc.json: Language not supported
Comments suppressed due to low confidence (1)

plugins/pluginManager.js:1841

  • The new arrow function reverses the parameter order for dbConnection compared to the original bind call. Please verify that the intended argument order is preserved to avoid unintended behavior.
databases = await Promise.all(dbs.map((db) => this.dbConnection(db, return_original)));

@kanwarujjaval kanwarujjaval requested a review from Copilot April 23, 2025 05:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the architecture by removing the extra “dont-enclose” parameter from all require calls and adapting code to changes in API responses (e.g. findOneAndUpdate now returning a .value field).

  • Removes the extra parameter across multiple modules to simplify module loading
  • Adjusts handling of findOneAndUpdate responses in app user and similar modules
  • Employs optional chaining for configuration object access in the ingestor module

Reviewed Changes

Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugins/locale/frontend/app.js Removed "dont-enclose" argument from require call for countlyConfig
plugins/enterpriseinfo/frontend/app.js Updated require of countlyConfig by removing the extra parameter
plugins/dashboards/frontend/app.js Removed "dont-enclose" argument for consistency
plugins/crashes/frontend/app.js Removed the extra parameter from countlyConfig import
frontend/express/public/javascripts/countly/countly.config.sample.js Added new property INGESTOR_URL configuration
frontend/express/libs/members.js Removed "dont-enclose" from require call for configs
frontend/express/app.js Updated countlyConfig import by removing extra parameter
api/utils/utils.js Removed extra parameter on countlyConfig require call
api/parts/mgmt/app_users.js Updated result extraction from findOneAndUpdate to use .value.seq
api/parts/jobs/index.js Removed unnecessary parameter from countlyConfig require call
api/parts/data/changeStreamReader.js Fixed a typo in a comment and removed extra require parameter
api/ingestor.js Removed extra parameter; added optional chaining for configuration access
api/api.js Removed extra parameter from countlyConfig require call
api/aggregator.js Removed extra parameter from countlyConfig require call
Files not reviewed (2)
  • .eslintrc.json: Language not supported
  • package.json: Language not supported

kanwarujjaval and others added 17 commits April 23, 2025 19:12
Bumps [moment](https://github.com/moment/moment) from 2.29.4 to 2.30.1.
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.4...2.30.1)

---
updated-dependencies:
- dependency-name: moment
  dependency-version: 2.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.35 to 0.5.48.
- [Release notes](https://github.com/moment/moment-timezone/releases)
- [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md)
- [Commits](moment/moment-timezone@0.5.35...0.5.48)

---
updated-dependencies:
- dependency-name: moment-timezone
  dependency-version: 0.5.48
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [mocha](https://github.com/mochajs/mocha) from 10.8.2 to 11.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](mochajs/mocha@v10.8.2...v11.1.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-version: 11.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 24.7.1 to 24.7.2.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](puppeteer/puppeteer@puppeteer-v24.7.1...puppeteer-v24.7.2)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-version: 24.7.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…s/moment-2.30.1

Bump moment from 2.29.4 to 2.30.1 in /ui-tests
Bumps [chai](https://github.com/chaijs/chai) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
- [Commits](chaijs/chai@v5.1.1...v5.2.0)

---
updated-dependencies:
- dependency-name: chai
  dependency-version: 5.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…ipts/timezones/moment-timezone-0.5.48

Bump moment-timezone from 0.5.35 to 0.5.48 in /bin/scripts/timezones
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.7 to 3.3.2.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](node-fetch/node-fetch@v2.6.7...v3.3.2)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-version: 3.3.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
ar2rsawseen and others added 24 commits April 24, 2025 22:04
…s/faker-js/faker-9.7.0

Bump @faker-js/faker from 8.2.0 to 9.7.0 in /ui-tests
…ns-64de86c0d2

Bump the actions group with 6 updates
* Localization fixes

* Add scripts to remove unused localization

* Fixes

* fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* fix

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Update changelog

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

---------

Co-authored-by: Can Angun <[email protected]>
Update heatmap to use new drill events collection
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 24.7.2 to 24.8.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](puppeteer/puppeteer@puppeteer-v24.7.2...puppeteer-v24.8.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-version: 24.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
* add eslint rules to restrict Bluebird-specific methods and enforce single quotes and remove vue3 subapp specific rules

* add pre-commit hook with lint-staged for automatic linting

* remove quotes rule from eslint configuration

* remove only plugin dependent rules

* refactor eslint configuration to remove plugins based rules and remove vue file patterns

* plugin free eslint

---------

Co-authored-by: Arturs Sosins <[email protected]>
…er-24.8.0

Bump puppeteer from 24.7.2 to 24.8.0
@kanwarujjaval kanwarujjaval marked this pull request as ready for review May 7, 2025 10:45
@kanwarujjaval kanwarujjaval changed the title [Experimental] new architecture [WIP] [Experimental] new architecture May 13, 2025
@kanwarujjaval kanwarujjaval self-assigned this May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants