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

[BUGFIX identifiers] Address issue with polymorphic findRecord #7363

Merged
merged 2 commits into from
Dec 1, 2020

Conversation

igorT
Copy link
Member

@igorT igorT commented Oct 30, 2020

Fixes issue when encountering polymorphic records with a subtype on initial load.
Builds on #7325

@github-actions
Copy link

github-actions bot commented Oct 30, 2020

Performance Report for 1bc07ea

Relationship Analysis
                        -------------

__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
 _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
  _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
   _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
    _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
     _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
      _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
       _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
        _\///______________\///______________\///__\///////////////__


                          Runtime Edition

        PM2 is a Production Process Manager for Node.js applications
                     with a built-in Load Balancer.

                Start and Daemonize any application:
                $ pm2 start app.js

                Load Balance 4 instances of api.js:
                $ pm2 start api.js -i 4

                Monitor in production:
                $ pm2 monitor

                Make pm2 auto-boot at server restart:
                $ pm2 startup

                To go further checkout:
                http://pm2.io/


                        -------------

[PM2] Spawning PM2 daemon with pm2_home=/home/runner/.pm2
[PM2] PM2 Successfully daemonized
[PM2] Starting /home/runner/work/data/data/bin/relationship-performance-tracking/src/har-remix.js in fork_mode (1 instance)
[PM2] Done.
┌─────┬────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name       │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ control    │ default     │ N/A     │ fork    │ 3021     │ 0s     │ 0    │ online    │ 0%       │ 30.4mb   │ runner   │ disabled │
└─────┴────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2] Starting /home/runner/work/data/data/bin/relationship-performance-tracking/src/har-remix.js in fork_mode (1 instance)
[PM2] Done.
┌─────┬───────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name          │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼───────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ control       │ default     │ N/A     │ fork    │ 3021     │ 0s     │ 0    │ online    │ 0%       │ 72.2mb   │ runner   │ disabled │
│ 1   │ experiment    │ default     │ N/A     │ fork    │ 3059     │ 0s     │ 0    │ online    │ 0%       │ 25.4mb   │ runner   │ disabled │
└─────┴───────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

===============================================================================
Processing CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md README.md RELEASE.md bin lerna.json node_modules package.json packages tmp tsconfig.json yarn.lock
[PM2] [v] Modules Stopped
[PM2] Applying action deleteProcessId on app [all](ids: [ 0, 1 ])
[PM2] [control](0) ✓
[PM2] [experiment](1) ✓
[PM2] [v] All Applications Stopped
[PM2] [v] PM2 Daemon Stopped

@github-actions
Copy link

github-actions bot commented Oct 30, 2020

Asset Size Report for 1bc07ea

IE11 Builds

EmberData increased by 111.0 B uncompressed but decreased by 1.0 B compressed

Warnings

The uncompressed size of the package @ember-data/store has increased by 111.0 B.

Changeset


EmberData 161.41 KB +111.0 B (34.7 KB -1.0 B compressed)
    @ember-data/store 69.96 KB +111.0 B (15.04 KB -1.0 B compressed)
        @ember-data/store/-private 69.05 KB +111.0 B (14.85 KB -1.0 B compressed)

Full Asset Analysis (IE11)

Asset Size Report
=================


Library: EmberData
┌────────────┬─────────────┐
│  (index)   │   Values    │
├────────────┼─────────────┤
│   bytes    │ '161.41 KB' │
│ compressed │ '34.70 KB'  │
│  packages  │      9      │
│  modules   │     46      │
└────────────┴─────────────┘

Package: @ember-data/store
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '69.96 KB' │
│  compressed  │ '15.04 KB' │
│ % Of Library │   '43.3'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/store/-private                        | 69.05 KB  | 14.85 KB   | 98.7          | 42.8
	@ember-data/store/index                           | 936.00 B  | 201.24 B   | 1.3           | 0.6

Package: @ember-data/record-data
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '22.62 KB' │
│  compressed  │ '4.86 KB'  │
│ % Of Library │   '14.0'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/record-data/-private                  | 22.62 KB  | 4.86 KB    | 100.0         | 14.0

Package: @ember-data/serializer
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '19.33 KB' │
│  compressed  │ '4.16 KB'  │
│ % Of Library │   '12.0'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/serializer/json                       | 7.10 KB   | 1.53 KB    | 36.7          | 4.4
	@ember-data/serializer/-private                   | 5.37 KB   | 1.15 KB    | 27.8          | 3.3
	@ember-data/serializer/json-api                   | 3.71 KB   | 817.01 B   | 19.2          | 2.3
	@ember-data/serializer/rest                       | 2.71 KB   | 595.77 B   | 14.0          | 1.7
	@ember-data/serializer/index                      | 243.00 B  | 52.24 B    | 1.2           | 0.1
	@ember-data/serializer/transform                  | 215.00 B  | 46.22 B    | 1.1           | 0.1

Package: @ember-data/adapter
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '14.99 KB' │
│  compressed  │ '3.22 KB'  │
│ % Of Library │   '9.3'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/adapter/rest                          | 8.01 KB   | 1.72 KB    | 53.4          | 5.0
	@ember-data/adapter/-private                      | 3.57 KB   | 786.26 B   | 23.8          | 2.2
	@ember-data/adapter/error                         | 1.91 KB   | 421.19 B   | 12.8          | 1.2
	@ember-data/adapter/json-api                      | 897.00 B  | 192.85 B   | 5.8           | 0.5
	@ember-data/adapter/index                         | 635.00 B  | 136.52 B   | 4.1           | 0.4

Package: @ember-data/model
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '13.55 KB' │
│  compressed  │ '2.91 KB'  │
│ % Of Library │   '8.4'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/model/-private                        | 13.07 KB  | 2.81 KB    | 96.5          | 8.1
	@ember-data/model/index                           | 486.00 B  | 104.49 B   | 3.5           | 0.3

Package: ember-data
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '9.28 KB' │
│  compressed  │ '2.00 KB' │
│ % Of Library │   '5.8'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-data/index                                  | 2.32 KB   | 511.49 B   | 25.0          | 1.4
	ember-data/-private                               | 2.02 KB   | 445.70 B   | 21.8          | 1.3
	ember-data/adapters/errors                        | 1.19 KB   | 261.65 B   | 12.8          | 0.7
	ember-data/setup-container                        | 503.00 B  | 108.14 B   | 5.3           | 0.3
	ember-data/relationships                          | 318.00 B  | 68.37 B    | 3.3           | 0.2
	ember-data/serializers/embedded-records-mixin     | 274.00 B  | 58.91 B    | 2.9           | 0.2
	ember-data/serializers/json-api                   | 251.00 B  | 53.96 B    | 2.6           | 0.2
	ember-data/adapters/json-api                      | 245.00 B  | 52.67 B    | 2.6           | 0.1
	ember-data/serializers/json                       | 243.00 B  | 52.24 B    | 2.6           | 0.1
	ember-data/serializers/rest                       | 243.00 B  | 52.24 B    | 2.6           | 0.1
	ember-data/transform                              | 241.00 B  | 51.81 B    | 2.5           | 0.1
	ember-data/adapters/rest                          | 237.00 B  | 50.95 B    | 2.5           | 0.1
	ember-data/serializer                             | 232.00 B  | 49.88 B    | 2.4           | 0.1
	ember-data/adapter                                | 226.00 B  | 48.59 B    | 2.4           | 0.1
	ember-data/model                                  | 222.00 B  | 47.73 B    | 2.3           | 0.1
	ember-data/store                                  | 222.00 B  | 47.73 B    | 2.3           | 0.1
	ember-data/attr                                   | 218.00 B  | 46.87 B    | 2.3           | 0.1
	ember-data/version                                | 162.00 B  | 34.83 B    | 1.7           | 0.1

Package: ember-inflector
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '7.91 KB' │
│  compressed  │ '1.70 KB' │
│ % Of Library │   '4.9'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-inflector/lib/system/inflector              | 2.76 KB   | 607.81 B   | 34.9          | 1.7
	ember-inflector/lib/system/inflections            | 1.57 KB   | 346.15 B   | 19.9          | 1.0
	ember-inflector/index                             | 1.12 KB   | 246.82 B   | 14.2          | 0.7
	ember-inflector/lib/ext/string                    | 783.00 B  | 168.34 B   | 9.7           | 0.5
	ember-inflector/lib/system                        | 452.00 B  | 97.18 B    | 5.6           | 0.3
	ember-inflector/lib/system/string                 | 351.00 B  | 75.46 B    | 4.3           | 0.2
	ember-inflector/lib/helpers/pluralize             | 348.00 B  | 74.82 B    | 4.3           | 0.2
	ember-inflector/lib/utils/make-helper             | 308.00 B  | 66.22 B    | 3.8           | 0.2
	ember-inflector/lib/helpers/singularize           | 271.00 B  | 58.26 B    | 3.3           | 0.2

Package: @ember-data/debug
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '2.68 KB'  │
│  compressed  │ '590.61 B' │
│ % Of Library │   '1.7'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/debug/index                           | 2.20 KB   | 483.32 B   | 81.8          | 1.4
	@ember-data/debug/setup                           | 499.00 B  | 107.28 B   | 18.2          | 0.3

Package: @ember/ordered-set
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '1.08 KB'  │
│  compressed  │ '237.14 B' │
│ % Of Library │   '0.7'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember/ordered-set/index                          | 1.08 KB   | 237.14 B   | 100.0         | 0.7

Modern Builds

EmberData increased by 111.0 B uncompressed but decreased by 1.0 B compressed

Warnings

The uncompressed size of the package @ember-data/store has increased by 111.0 B.

Changeset


EmberData 161.41 KB +111.0 B (34.7 KB -1.0 B compressed)
    @ember-data/store 69.96 KB +111.0 B (15.04 KB -1.0 B compressed)
        @ember-data/store/-private 69.05 KB +111.0 B (14.85 KB -1.0 B compressed)

Full Asset Analysis (Modern)

Asset Size Report
=================


Library: EmberData
┌────────────┬─────────────┐
│  (index)   │   Values    │
├────────────┼─────────────┤
│   bytes    │ '161.41 KB' │
│ compressed │ '34.70 KB'  │
│  packages  │      9      │
│  modules   │     46      │
└────────────┴─────────────┘

Package: @ember-data/store
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '69.96 KB' │
│  compressed  │ '15.04 KB' │
│ % Of Library │   '43.3'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/store/-private                        | 69.05 KB  | 14.85 KB   | 98.7          | 42.8
	@ember-data/store/index                           | 936.00 B  | 201.24 B   | 1.3           | 0.6

Package: @ember-data/record-data
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '22.62 KB' │
│  compressed  │ '4.86 KB'  │
│ % Of Library │   '14.0'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/record-data/-private                  | 22.62 KB  | 4.86 KB    | 100.0         | 14.0

Package: @ember-data/serializer
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '19.33 KB' │
│  compressed  │ '4.16 KB'  │
│ % Of Library │   '12.0'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/serializer/json                       | 7.10 KB   | 1.53 KB    | 36.7          | 4.4
	@ember-data/serializer/-private                   | 5.37 KB   | 1.15 KB    | 27.8          | 3.3
	@ember-data/serializer/json-api                   | 3.71 KB   | 817.01 B   | 19.2          | 2.3
	@ember-data/serializer/rest                       | 2.71 KB   | 595.77 B   | 14.0          | 1.7
	@ember-data/serializer/index                      | 243.00 B  | 52.24 B    | 1.2           | 0.1
	@ember-data/serializer/transform                  | 215.00 B  | 46.22 B    | 1.1           | 0.1

Package: @ember-data/adapter
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '14.99 KB' │
│  compressed  │ '3.22 KB'  │
│ % Of Library │   '9.3'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/adapter/rest                          | 8.01 KB   | 1.72 KB    | 53.4          | 5.0
	@ember-data/adapter/-private                      | 3.57 KB   | 786.26 B   | 23.8          | 2.2
	@ember-data/adapter/error                         | 1.91 KB   | 421.19 B   | 12.8          | 1.2
	@ember-data/adapter/json-api                      | 897.00 B  | 192.85 B   | 5.8           | 0.5
	@ember-data/adapter/index                         | 635.00 B  | 136.52 B   | 4.1           | 0.4

Package: @ember-data/model
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '13.55 KB' │
│  compressed  │ '2.91 KB'  │
│ % Of Library │   '8.4'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/model/-private                        | 13.07 KB  | 2.81 KB    | 96.5          | 8.1
	@ember-data/model/index                           | 486.00 B  | 104.49 B   | 3.5           | 0.3

Package: ember-data
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '9.28 KB' │
│  compressed  │ '2.00 KB' │
│ % Of Library │   '5.8'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-data/index                                  | 2.32 KB   | 511.49 B   | 25.0          | 1.4
	ember-data/-private                               | 2.02 KB   | 445.70 B   | 21.8          | 1.3
	ember-data/adapters/errors                        | 1.19 KB   | 261.65 B   | 12.8          | 0.7
	ember-data/setup-container                        | 503.00 B  | 108.14 B   | 5.3           | 0.3
	ember-data/relationships                          | 318.00 B  | 68.37 B    | 3.3           | 0.2
	ember-data/serializers/embedded-records-mixin     | 274.00 B  | 58.91 B    | 2.9           | 0.2
	ember-data/serializers/json-api                   | 251.00 B  | 53.96 B    | 2.6           | 0.2
	ember-data/adapters/json-api                      | 245.00 B  | 52.67 B    | 2.6           | 0.1
	ember-data/serializers/json                       | 243.00 B  | 52.24 B    | 2.6           | 0.1
	ember-data/serializers/rest                       | 243.00 B  | 52.24 B    | 2.6           | 0.1
	ember-data/transform                              | 241.00 B  | 51.81 B    | 2.5           | 0.1
	ember-data/adapters/rest                          | 237.00 B  | 50.95 B    | 2.5           | 0.1
	ember-data/serializer                             | 232.00 B  | 49.88 B    | 2.4           | 0.1
	ember-data/adapter                                | 226.00 B  | 48.59 B    | 2.4           | 0.1
	ember-data/model                                  | 222.00 B  | 47.73 B    | 2.3           | 0.1
	ember-data/store                                  | 222.00 B  | 47.73 B    | 2.3           | 0.1
	ember-data/attr                                   | 218.00 B  | 46.87 B    | 2.3           | 0.1
	ember-data/version                                | 162.00 B  | 34.83 B    | 1.7           | 0.1

Package: ember-inflector
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '7.91 KB' │
│  compressed  │ '1.70 KB' │
│ % Of Library │   '4.9'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-inflector/lib/system/inflector              | 2.76 KB   | 607.81 B   | 34.9          | 1.7
	ember-inflector/lib/system/inflections            | 1.57 KB   | 346.15 B   | 19.9          | 1.0
	ember-inflector/index                             | 1.12 KB   | 246.82 B   | 14.2          | 0.7
	ember-inflector/lib/ext/string                    | 783.00 B  | 168.34 B   | 9.7           | 0.5
	ember-inflector/lib/system                        | 452.00 B  | 97.18 B    | 5.6           | 0.3
	ember-inflector/lib/system/string                 | 351.00 B  | 75.46 B    | 4.3           | 0.2
	ember-inflector/lib/helpers/pluralize             | 348.00 B  | 74.82 B    | 4.3           | 0.2
	ember-inflector/lib/utils/make-helper             | 308.00 B  | 66.22 B    | 3.8           | 0.2
	ember-inflector/lib/helpers/singularize           | 271.00 B  | 58.26 B    | 3.3           | 0.2

Package: @ember-data/debug
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '2.68 KB'  │
│  compressed  │ '590.61 B' │
│ % Of Library │   '1.7'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/debug/index                           | 2.20 KB   | 483.32 B   | 81.8          | 1.4
	@ember-data/debug/setup                           | 499.00 B  | 107.28 B   | 18.2          | 0.3

Package: @ember/ordered-set
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '1.08 KB'  │
│  compressed  │ '237.14 B' │
│ % Of Library │   '0.7'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember/ordered-set/index                          | 1.08 KB   | 237.14 B   | 100.0         | 0.7

Modern Builds (No Rollup)

The size of the library EmberData has increased by 123.0 B (66.0 B compressed) which exceeds the failure threshold of 75 bytes.

Warnings

The uncompressed size of the package @ember-data/store has increased by 123.0 B.

Changeset


EmberData 206.04 KB +123.0 B (39.24 KB +66.0 B compressed)
    @ember-data/store 102.57 KB +123.0 B (19.53 KB +66.0 B compressed)
        @ember-data/store/-private/identifiers/cache 3.86 KB +123.0 B (752.99 B +66.0 B compressed)

Full Asset Analysis (Modern)

Asset Size Report
=================


Library: EmberData
┌────────────┬─────────────┐
│  (index)   │   Values    │
├────────────┼─────────────┤
│   bytes    │ '206.04 KB' │
│ compressed │ '39.24 KB'  │
│  packages  │      9      │
│  modules   │     144     │
└────────────┴─────────────┘

Package: @ember-data/store
┌──────────────┬─────────────┐
│   (index)    │   Values    │
├──────────────┼─────────────┤
│    bytes     │ '102.57 KB' │
│  compressed  │ '19.53 KB'  │
│ % Of Library │   '49.8'    │
└──────────────┴─────────────┘
	Module                                                                             | Bytes     | Compressed | % of Package  | % Of Library
	--------------------------------------------------------------------------------------------------------------------------------------
	@ember-data/store/-private/system/core-store                                       | 17.51 KB  | 3.33 KB    | 17.1          | 8.5
	@ember-data/store/-private/system/model/internal-model                             | 16.97 KB  | 3.23 KB    | 16.5          | 8.2
	@ember-data/store/-private/system/model/states                                     | 5.44 KB   | 1.04 KB    | 5.3           | 2.6
	@ember-data/store/-private/system/fetch-manager                                    | 4.93 KB   | 960.57 B   | 4.8           | 2.4
	@ember-data/store/-private/system/record-array-manager                             | 4.53 KB   | 882.68 B   | 4.4           | 2.2
	@ember-data/store/-private/index                                                   | 4.44 KB   | 864.97 B   | 4.3           | 2.2
	@ember-data/store/-private/system/store/finders                                    | 4.33 KB   | 844.40 B   | 4.2           | 2.1
	@ember-data/store/-private/identifiers/cache                                       | 3.86 KB   | 752.99 B   | 3.8           | 1.9
	@ember-data/store/-private/system/store/record-data-store-wrapper                  | 3.42 KB   | 665.96 B   | 3.3           | 1.7
	@ember-data/store/-private/system/store/internal-model-factory                     | 2.91 KB   | 567.32 B   | 2.8           | 1.4
	@ember-data/store/-private/system/snapshot                                         | 2.85 KB   | 555.13 B   | 2.8           | 1.4
	@ember-data/store/-private/system/record-arrays/record-array                       | 2.25 KB   | 439.72 B   | 2.2           | 1.1
	@ember-data/store/-private/system/ds-model-store                                   | 1.99 KB   | 387.35 B   | 1.9           | 1.0
	@ember-data/store/-private/system/request-cache                                    | 1.87 KB   | 365.07 B   | 1.8           | 0.9
	@ember-data/store/-private/system/references/has-many                              | 1.50 KB   | 292.13 B   | 1.5           | 0.7
	@ember-data/store/-private/system/schema-definition-service                        | 1.47 KB   | 286.61 B   | 1.4           | 0.7
	@ember-data/store/-private/system/relationship-meta                                | 1.45 KB   | 282.23 B   | 1.4           | 0.7
	@ember-data/store/-private/system/model/shim-model-class                           | 1.26 KB   | 245.66 B   | 1.2           | 0.6
	@ember-data/store/-private/system/references/belongs-to                            | 1.23 KB   | 240.33 B   | 1.2           | 0.6
	@ember-data/store/-private/system/store/serializer-response                        | 1.12 KB   | 219.19 B   | 1.1           | 0.5
	@ember-data/store/-private/identifiers/utils/uuid-v4                               | 1.05 KB   | 205.29 B   | 1.0           | 0.5
	@ember-data/store/-private/system/internal-model-map                               | 981.00 B  | 186.82 B   | 0.9           | 0.5
	@ember-data/store/-private/system/references/record                                | 966.00 B  | 183.96 B   | 0.9           | 0.5
	@ember-data/store/-private/system/references/reference                             | 942.00 B  | 179.39 B   | 0.9           | 0.4
	@ember-data/store/index                                                            | 936.00 B  | 178.25 B   | 0.9           | 0.4
	@ember-data/store/-private/system/record-arrays/adapter-populated-record-array     | 908.00 B  | 172.91 B   | 0.9           | 0.4
	@ember-data/store/-private/system/model/notify-changes                             | 862.00 B  | 164.15 B   | 0.8           | 0.4
	@ember-data/store/-private/system/errors-utils                                     | 759.00 B  | 144.54 B   | 0.7           | 0.4
	@ember-data/store/-private/system/snapshot-record-array                            | 753.00 B  | 143.40 B   | 0.7           | 0.4
	@ember-data/store/-private/system/record-notification-manager                      | 689.00 B  | 131.21 B   | 0.7           | 0.3
	@ember-data/store/-private/system/references                                       | 598.00 B  | 113.88 B   | 0.6           | 0.3
	@ember-data/store/-private/system/promise-proxies                                  | 556.00 B  | 105.88 B   | 0.5           | 0.3
	@ember-data/store/-private/utils/construct-resource                                | 506.00 B  | 96.36 B    | 0.5           | 0.2
	@ember-data/store/-private/system/store/common                                     | 499.00 B  | 95.02 B    | 0.5           | 0.2
	@ember-data/store/-private/system/coerce-id                                        | 494.00 B  | 94.07 B    | 0.5           | 0.2
	@ember-data/store/-private/system/record-arrays                                    | 487.00 B  | 92.74 B    | 0.5           | 0.2
	@ember-data/store/-private/system/identity-map                                     | 450.00 B  | 85.69 B    | 0.4           | 0.2
	@ember-data/store/-private/system/diff-array                                       | 438.00 B  | 83.41 B    | 0.4           | 0.2
	@ember-data/store/-private/ts-interfaces/identifier                                | 400.00 B  | 76.17 B    | 0.4           | 0.2
	@ember-data/store/-private/utils/symbol                                            | 393.00 B  | 74.84 B    | 0.4           | 0.2
	@ember-data/store/-private/identifiers/is-stable-identifier                        | 327.00 B  | 62.27 B    | 0.3           | 0.2
	@ember-data/store/-private/ts-interfaces/fetch-manager                             | 316.00 B  | 60.17 B    | 0.3           | 0.1
	@ember-data/store/-private/utils/promise-record                                    | 288.00 B  | 54.84 B    | 0.3           | 0.1
	@ember-data/store/-private/system/backburner                                       | 268.00 B  | 51.03 B    | 0.3           | 0.1
	@ember-data/store/-private/utils/brand                                             | 258.00 B  | 49.13 B    | 0.2           | 0.1
	@ember-data/store/-private/system/record-data-for                                  | 235.00 B  | 44.75 B    | 0.2           | 0.1
	@ember-data/store/-private/system/ts-upgrade-map                                   | 234.00 B  | 44.56 B    | 0.2           | 0.1
	@ember-data/store/-private/system/normalize-model-name                             | 220.00 B  | 41.89 B    | 0.2           | 0.1
	@ember-data/store/-private/utils/is-non-empty-string                               | 212.00 B  | 40.37 B    | 0.2           | 0.1
	@ember-data/store/-debug/index                                                     | 193.00 B  | 36.75 B    | 0.2           | 0.1
	@ember-data/store/-private/system/deprecated-evented                               | 190.00 B  | 36.18 B    | 0.2           | 0.1
	@ember-data/store/-private/ts-interfaces/record-data-store-wrapper                 | 136.00 B  | 25.89 B    | 0.1           | 0.1
	@ember-data/store/-private/ts-interfaces/record-data-schemas                       | 130.00 B  | 24.75 B    | 0.1           | 0.1
	@ember-data/store/-private/ts-interfaces/minimum-serializer-interface              | 98.00 B   | 18.66 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data-record-wrapper                | 96.00 B   | 18.28 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/minimum-adapter-interface                 | 95.00 B   | 18.09 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/schema-definition-service                 | 95.00 B   | 18.09 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data-json-api                      | 90.00 B   | 17.13 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/ember-data-json-api                       | 89.00 B   | 16.94 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/promise-proxies                           | 85.00 B   | 16.18 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-instance                           | 85.00 B   | 16.18 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data                               | 81.00 B   | 15.42 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/ds-model                                  | 78.00 B   | 14.85 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/utils                                     | 75.00 B   | 14.28 B    | 0.1           | 0.0

Package: @ember-data/record-data
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '26.05 KB' │
│  compressed  │ '4.96 KB'  │
│ % Of Library │   '12.6'   │
└──────────────┴────────────┘
	Module                                                                      | Bytes     | Compressed | % of Package  | % Of Library
	-------------------------------------------------------------------------------------------------------------------------------
	@ember-data/record-data/-private/relationships/state/relationship           | 8.16 KB   | 1.55 KB    | 31.3          | 4.0
	@ember-data/record-data/-private/record-data                                | 8.11 KB   | 1.54 KB    | 31.1          | 3.9
	@ember-data/record-data/-private/relationships/state/belongs-to             | 3.02 KB   | 588.83 B   | 11.6          | 1.5
	@ember-data/record-data/-private/relationships/state/has-many               | 2.82 KB   | 549.03 B   | 10.8          | 1.4
	@ember-data/record-data/-private/relationships/state/create                 | 1.15 KB   | 224.33 B   | 4.4           | 0.6
	@ember-data/record-data/-private/index                                      | 1023.00 B | 194.81 B   | 3.8           | 0.5
	@ember-data/record-data/-private/ordered-set                                | 598.00 B  | 113.88 B   | 2.2           | 0.3
	@ember-data/record-data/-private/record-data-for                            | 481.00 B  | 91.60 B    | 1.8           | 0.2
	@ember-data/record-data/-private/coerce-id                                  | 406.00 B  | 77.31 B    | 1.5           | 0.2
	@ember-data/record-data/-private/normalize-link                             | 249.00 B  | 47.41 B    | 0.9           | 0.1
	@ember-data/record-data/-private/ts-interfaces/relationship-record-data     | 100.00 B  | 19.04 B    | 0.4           | 0.0

Package: @ember-data/serializer
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '21.72 KB' │
│  compressed  │ '4.14 KB'  │
│ % Of Library │   '10.5'   │
└──────────────┴────────────┘
	Module                                                     | Bytes     | Compressed | % of Package  | % Of Library
	--------------------------------------------------------------------------------------------------------------
	@ember-data/serializer/json                                | 7.10 KB   | 1.35 KB    | 32.7          | 3.4
	@ember-data/serializer/-private/embedded-records-mixin     | 4.29 KB   | 837.17 B   | 19.8          | 2.1
	@ember-data/serializer/json-api                            | 3.71 KB   | 723.67 B   | 17.1          | 1.8
	@ember-data/serializer/rest                                | 2.71 KB   | 527.70 B   | 12.5          | 1.3
	@ember-data/serializer/-private/index                      | 1.18 KB   | 230.43 B   | 5.4           | 0.6
	@ember-data/serializer/-private/transforms/date            | 523.00 B  | 99.59 B    | 2.4           | 0.2
	@ember-data/serializer/-private/transforms/boolean         | 490.00 B  | 93.31 B    | 2.2           | 0.2
	@ember-data/serializer/-private/transforms/number          | 446.00 B  | 84.93 B    | 2.0           | 0.2
	@ember-data/serializer/-private/transforms/string          | 351.00 B  | 66.84 B    | 1.6           | 0.2
	@ember-data/serializer/-private/utils                      | 286.00 B  | 54.46 B    | 1.3           | 0.1
	@ember-data/serializer/index                               | 243.00 B  | 46.27 B    | 1.1           | 0.1
	@ember-data/serializer/-private/transforms/transform       | 242.00 B  | 46.08 B    | 1.1           | 0.1
	@ember-data/serializer/transform                           | 215.00 B  | 40.94 B    | 1.0           | 0.1

Package: @ember-data/model
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '17.49 KB' │
│  compressed  │ '3.33 KB'  │
│ % Of Library │   '8.5'    │
└──────────────┴────────────┘
	Module                                                   | Bytes     | Compressed | % of Package  | % Of Library
	------------------------------------------------------------------------------------------------------------
	@ember-data/model/-private/model                         | 6.28 KB   | 1.20 KB    | 35.9          | 3.0
	@ember-data/model/-private/system/many-array             | 2.39 KB   | 465.81 B   | 13.7          | 1.2
	@ember-data/model/-private/errors                        | 2.03 KB   | 396.11 B   | 11.6          | 1.0
	@ember-data/model/-private/index                         | 1.29 KB   | 251.57 B   | 7.4           | 0.6
	@ember-data/model/-private/system/relationships/ext      | 1.19 KB   | 231.38 B   | 6.8           | 0.6
	@ember-data/model/-private/attr                          | 743.00 B  | 141.49 B   | 4.1           | 0.4
	@ember-data/model/-private/belongs-to                    | 663.00 B  | 126.26 B   | 3.7           | 0.3
	@ember-data/model/-private/system/promise-many-array     | 642.00 B  | 122.26 B   | 3.6           | 0.3
	@ember-data/model/-private/has-many                      | 626.00 B  | 119.21 B   | 3.5           | 0.3
	@ember-data/model/index                                  | 486.00 B  | 92.55 B    | 2.7           | 0.2
	@ember-data/model/-private/util                          | 442.00 B  | 84.17 B    | 2.5           | 0.2
	@ember-data/model/-private/system/promise-belongs-to     | 410.00 B  | 78.08 B    | 2.3           | 0.2
	@ember-data/model/-private/system/model-for-mixin        | 404.00 B  | 76.93 B    | 2.3           | 0.2

Package: @ember-data/adapter
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '17.04 KB' │
│  compressed  │ '3.24 KB'  │
│ % Of Library │   '8.3'    │
└──────────────┴────────────┘
	Module                                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------------------
	@ember-data/adapter/rest                                      | 8.01 KB   | 1.53 KB    | 47.0          | 3.9
	@ember-data/adapter/error                                     | 1.91 KB   | 373.07 B   | 11.2          | 0.9
	@ember-data/adapter/-private/build-url-mixin                  | 1.81 KB   | 353.83 B   | 10.7          | 0.9
	@ember-data/adapter/-private/index                            | 1.03 KB   | 201.10 B   | 6.1           | 0.5
	@ember-data/adapter/json-api                                  | 897.00 B  | 170.82 B   | 5.1           | 0.4
	@ember-data/adapter/-private/utils/serialize-query-params     | 792.00 B  | 150.82 B   | 4.5           | 0.4
	@ember-data/adapter/index                                     | 635.00 B  | 120.92 B   | 3.6           | 0.3
	@ember-data/adapter/-private/utils/determine-body-promise     | 547.00 B  | 104.17 B   | 3.1           | 0.3
	@ember-data/adapter/-private/utils/parse-response-headers     | 480.00 B  | 91.41 B    | 2.8           | 0.2
	@ember-data/adapter/-private/utils/fetch                      | 454.00 B  | 86.45 B    | 2.6           | 0.2
	@ember-data/adapter/-private/utils/serialize-into-hash        | 347.00 B  | 66.08 B    | 2.0           | 0.2
	@ember-data/adapter/-private/utils/continue-on-reject         | 217.00 B  | 41.32 B    | 1.2           | 0.1

Package: ember-data
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '9.50 KB' │
│  compressed  │ '1.81 KB' │
│ % Of Library │   '4.6'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-data/index                                  | 2.32 KB   | 453.05 B   | 24.5          | 1.1
	ember-data/-private/index                         | 1.93 KB   | 375.92 B   | 20.3          | 0.9
	ember-data/adapters/errors                        | 1.19 KB   | 231.76 B   | 12.5          | 0.6
	ember-data/setup-container                        | 503.00 B  | 95.79 B    | 5.2           | 0.2
	ember-data/-private/core                          | 321.00 B  | 61.13 B    | 3.3           | 0.2
	ember-data/relationships                          | 318.00 B  | 60.55 B    | 3.3           | 0.2
	ember-data/serializers/embedded-records-mixin     | 274.00 B  | 52.18 B    | 2.8           | 0.1
	ember-data/serializers/json-api                   | 251.00 B  | 47.80 B    | 2.6           | 0.1
	ember-data/adapters/json-api                      | 245.00 B  | 46.65 B    | 2.5           | 0.1
	ember-data/serializers/json                       | 243.00 B  | 46.27 B    | 2.5           | 0.1
	ember-data/serializers/rest                       | 243.00 B  | 46.27 B    | 2.5           | 0.1
	ember-data/transform                              | 241.00 B  | 45.89 B    | 2.5           | 0.1
	ember-data/adapters/rest                          | 237.00 B  | 45.13 B    | 2.4           | 0.1
	ember-data/serializer                             | 232.00 B  | 44.18 B    | 2.4           | 0.1
	ember-data/adapter                                | 226.00 B  | 43.03 B    | 2.3           | 0.1
	ember-data/model                                  | 222.00 B  | 42.27 B    | 2.3           | 0.1
	ember-data/store                                  | 222.00 B  | 42.27 B    | 2.3           | 0.1
	ember-data/attr                                   | 218.00 B  | 41.51 B    | 2.2           | 0.1
	ember-data/version                                | 162.00 B  | 30.85 B    | 1.7           | 0.1

Package: ember-inflector
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '7.91 KB' │
│  compressed  │ '1.51 KB' │
│ % Of Library │   '3.8'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-inflector/lib/system/inflector              | 2.76 KB   | 538.37 B   | 34.9          | 1.3
	ember-inflector/lib/system/inflections            | 1.57 KB   | 306.60 B   | 19.9          | 0.8
	ember-inflector/index                             | 1.12 KB   | 218.62 B   | 14.2          | 0.5
	ember-inflector/lib/ext/string                    | 783.00 B  | 149.11 B   | 9.7           | 0.4
	ember-inflector/lib/system                        | 452.00 B  | 86.07 B    | 5.6           | 0.2
	ember-inflector/lib/system/string                 | 351.00 B  | 66.84 B    | 4.3           | 0.2
	ember-inflector/lib/helpers/pluralize             | 348.00 B  | 66.27 B    | 4.3           | 0.2
	ember-inflector/lib/utils/make-helper             | 308.00 B  | 58.65 B    | 3.8           | 0.1
	ember-inflector/lib/helpers/singularize           | 271.00 B  | 51.60 B    | 3.3           | 0.1

Package: @ember-data/debug
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '2.68 KB'  │
│  compressed  │ '523.13 B' │
│ % Of Library │   '1.3'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/debug/index                           | 2.20 KB   | 428.10 B   | 81.8          | 1.1
	@ember-data/debug/setup                           | 499.00 B  | 95.02 B    | 18.2          | 0.2

Package: @ember/ordered-set
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '1.08 KB'  │
│  compressed  │ '210.05 B' │
│ % Of Library │   '0.5'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember/ordered-set/index                          | 1.08 KB   | 210.05 B   | 100.0         | 0.5

@@ -343,6 +343,15 @@ export class IdentifierCache {
let newId = coerceId(data.id);
let existingIdentifier = detectMerge(this._cache.types, identifier, data, newId, this._cache.lids);

if (!existingIdentifier) {
if (identifier.type !== data.type && data.type) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There's if (existingIdentifier) statement below, maybe it would be reasonable to have this as else if after that?

I'd also prefer to add a comment about what sort of case this is meant to deal with, but totally up to you folks

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. We still want the other statement to run, in fact the whole point of doing this here is to get line 357
    identifier = this._mergeRecordIdentifiers(keyOptions, identifier, existingIdentifier, data, newId as string); to perform the merge

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. Great point re: comment, adding that and merging

Copy link
Contributor

Choose a reason for hiding this comment

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

OMG makes total sense. Thank you

@krasnoukhov
Copy link
Contributor

Hey @snewcomer @igorT, is there anything I can do to help merge this?

@igorT igorT added the 🎯 beta PR should be backported to beta label Nov 30, 2020
@igorT igorT changed the title Igor/7325 [BUGFIX identifiers] Address issue with polymorphic findRecord Dec 1, 2020
@igorT igorT added Bug 🏷️ bug This PR primarily fixes a reported issue and removed Bug labels Dec 1, 2020
Add test for cache

Alternaive solution to 7325
@igorT igorT merged commit 08cc992 into master Dec 1, 2020
@delete-merged-branch delete-merged-branch bot deleted the igor/7325 branch December 1, 2020 01:05
igorT added a commit that referenced this pull request Dec 1, 2020
* [BUGFIX identifiers] Address issue with polymorphic findRecord

Fixes issue when encountering polymorphic records with a subtype on initial load. If the returned record did not share the asked for type, identifiers cache would get into an incoherent statet.

Co-authored-by: Dmitry Krasnoukhov <dmitry@krasnoukhov.com>
igorT added a commit that referenced this pull request Dec 1, 2020
* [BUGFIX identifiers] Address issue with polymorphic findRecord

Fixes issue when encountering polymorphic records with a subtype on initial load. If the returned record did not share the asked for type, identifiers cache would get into an incoherent statet.

Co-authored-by: Dmitry Krasnoukhov <dmitry@krasnoukhov.com>
@krasnoukhov
Copy link
Contributor

I see that you've merged this into master and into 3.23, but do you think this is something that can also go into 3.20 LTS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bug This PR primarily fixes a reported issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants