Giter VIP home page Giter VIP logo

imodel-native's People

Contributors

6ar8nas avatar akshay05n avatar arturasdeltuvas avatar chuckkir avatar colinkerr avatar danrod1999 avatar dassaf4 avatar diegoalexdiaz avatar grigasp avatar imodeljs-admin avatar jiaruiz717 avatar kabentley avatar khanaffan avatar marcneely avatar martynasstrazdas avatar mattbjordan avatar medikornov avatar michaelbelousov avatar naveedkhan8067 avatar nick4598 avatar pmconne avatar rohitptnkr1996 avatar rschili avatar saeeedtorabi avatar saskliutas avatar simasjar avatar simasmikelionis avatar skirby1996 avatar soham-bentley avatar tcobbs-bentley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imodel-native's Issues

Presentation: Diagnostic errors logged when using `ContentModifier` without a `class` attribute

Repro:

  1. In itwinjs-core repo, in presentation\backend\assets\supplemental-presentation-rules\BisCore.PresentationRuleSet.json file, replace
     {
       "ruleType": "ContentModifier",
       "class": {
         "schemaName": "BisCore",
         "className": "Element"
       },
       "propertyCategories": [
         {
           "id": "source_information",
           "label": "Source Information",
           "parentId": {
             "type": "Root"
           },
           "autoExpand": true
         },
         {
           "id": "model_source",
           "label": "Model Source",
           "parentId": "source_information",
           "autoExpand": true
         },
         {
           "id": "secondary_sources",
           "label": "Secondary Sources",
           "parentId": "source_information",
           "autoExpand": true
         },
         {
           "id": "document_link",
           "label": "Document Link",
           "parentId": "source_information",
           "autoExpand": true
         }
       ]
     },
     {
       "ruleType": "ContentModifier",
       "class": {
         "schemaName": "BisCore",
         "className": "ElementAspect"
       },
       "propertyCategories": [
         {
           "id": "source_information",
           "label": "Source Information",
           "parentId": {
             "type": "Root"
           },
           "autoExpand": true
         }
       ]
     },
    with
     {
       "ruleType": "ContentModifier",
       "propertyCategories": [
         {
           "id": "source_information",
           "label": "Source Information",
           "parentId": {
             "type": "Root"
           },
           "autoExpand": true
         },
         {
           "id": "model_source",
           "label": "Model Source",
           "parentId": "source_information",
           "autoExpand": true
         },
         {
           "id": "secondary_sources",
           "label": "Secondary Sources",
           "parentId": "source_information",
           "autoExpand": true
         },
         {
           "id": "document_link",
           "label": "Document Link",
           "parentId": "source_information",
           "autoExpand": true
         }
       ]
     },
  2. rush build -t presentation-full-stack-tests
  3. run presentation-full-stack-tests
  4. notice diagnostics-related test failure

Flaky Test in `ECPresentation` on Linux x64 - `RulesDrivenECPresentationManagerRequestCancelationTests.CancelsFilteredNodesRequestWhenManagerIsTerminated`

Build Info

  • Repo: https://github.com/iTwin/imodel-native
  • Build Name: imodel-native
  • OS: Linux x64
  • Test Suite Name: RulesDrivenECPresentationManagerRequestCancelationTests
  • Test Name: CancelsFilteredNodesRequestWhenManagerIsTerminated

Error Detail

[----------] 39 tests from RulesDrivenECPresentationManagerRequestCancelationTests
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenManagerIsTerminated (4 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenConnectionIsClosed (5 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenRulesetIsDisposed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenRulesetIsDisposed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenManagerIsTerminated (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenConnectionIsClosed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenRulesetIsDisposed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenRulesetIsDisposed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenManagerIsTerminated (5 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenConnectionIsClosed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenManagerIsTerminated (4 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenConnectionIsClosed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenRulesetIsDisposed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenRulesetIsDisposed (5 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsFilteredNodesRequestWhenManagerIsTerminated
Segmentation fault

Links to failing builds

Notes

Only noticed it once. CNR on local Windows x64 debug build.

Presentation: `relatedInstances` in a specification affects other specifications in the same hierarchy level

Repro

  1. Open this hierarchy. Notice that root node has 2 children:
    Image

  2. Uncomment the relatedInstances specification in the second ChildNodes rule (link), notice the root node has no children anymore:
    Image

Expected result

None of the subjects have a related ElementUniqueAspect, so the second ChildNodes rule with enabled relatedInstances specification should return no results. The first one, on the other hand, should not be affected and return its results as if the second ChildNodes rule didn't exist (link):
Image

Presentation: Deadlock when using diagnostics

Reproduced when running load tests with the following config:

  • backend:
    set PROCESS_COUNT=16
    set SHARE_CACHES=1
  • tests:
    config:
      target: "http://localhost:3001/presentation-test-app/v1.0/mode/1/context/00000000-0000-0000-0000-000000000000/imodel/00000000-0000-0000-0000-000000000000/changeset/0"
    
      http:
        maxSockets: 1000
        timeout: 120
        extendedMetrics: false
    
      phases:
        # 100 users start the scenario one after another in 1 second intervals
        - name: "100 users"
          duration: 100
          arrivalRate: 1
    
      payload:
        path: "./datasets.csv"
        fields:
          - "iModelPath"
        order: sequence
        loadAll: true
    
      variables:
        operationGetNodes:
          - "PresentationRpcInterface-4.0.0-getPagedNodes"
    
      processor: "../lib/index.js"
    
    scenarios:
      - name: Full Models Tree
        beforeScenario: "createClientId"
        flow:
          - loop:
              - post:
                  ifTrue: "iModelPath"
                  url: "/{{ operationGetNodes }}"
                  beforeRequest: "createModelsTreeRequestParams"
                  afterResponse: "extractNodeKeysFromNodesResponse"
              - think: 0.1
            whileTrue: "hasParentNodeKeys"
  • dataset: BayTownProcessPlant.bim

Looks like we're still adding items to diagnostics scope when it already being serialized to JSON.

Image

Avoid joining relationship if navigation property is available

https://github.com/iTwin/presentation-performance-tests/issues/70#issuecomment-1512671801 shows that getting properties for specific elements may be expensive because of the way we join relationships and target classes.

E.g. the query that is slow:

SELECT
  *
FROM ONLY [orddgndyn].[Corridor__x005C__Final] [this]
LEFT JOIN [generic].[GraphicalModel3d] [rel_generic_GraphicalModel3d_0] ON [rel_generic_GraphicalModel3d_0].[ECInstanceId] = [this].[Model].[Id]
LEFT JOIN (
  SELECT
    [rel_bis_GraphicalElement3dRepresentsElement_0].*
  FROM
    [bis].[GraphicalElement3dRepresentsElement] [rel_bis_GraphicalElement3dRepresentsElement_0]
    INNER JOIN [rrphys].[Corridor] [rel_rrphys_Corridor_0] ON [rel_rrphys_Corridor_0].[ECInstanceId] = [rel_bis_GraphicalElement3dRepresentsElement_0].[TargetECInstanceId]
) [rel_bis_GraphicalElement3dRepresentsElement_0] ON [this].[ECInstanceId] = [rel_bis_GraphicalElement3dRepresentsElement_0].[SourceECInstanceId]
LEFT JOIN [rrphys].[Corridor] [rel_rrphys_Corridor_0] ON [rel_rrphys_Corridor_0].[ECInstanceId] = [rel_bis_GraphicalElement3dRepresentsElement_0].[TargetECInstanceId]
LEFT JOIN (
  SELECT
    [nav_bis_GeometricElement3dIsInCategory_1].*
  FROM
    [bis].[GeometricElement3dIsInCategory] [nav_bis_GeometricElement3dIsInCategory_1]
    INNER JOIN [bis].[SpatialCategory] [nav_bis_SpatialCategory_1] ON [nav_bis_SpatialCategory_1].[ECInstanceId] = [nav_bis_GeometricElement3dIsInCategory_1].[TargetECInstanceId]
) [nav_bis_GeometricElement3dIsInCategory_1] ON [rel_bis_GraphicalElement3dRepresentsElement_0].[TargetECInstanceId] = [nav_bis_GeometricElement3dIsInCategory_1].[SourceECInstanceId]
LEFT JOIN [bis].[SpatialCategory] [nav_bis_SpatialCategory_1] ON [nav_bis_SpatialCategory_1].[ECInstanceId] = [nav_bis_GeometricElement3dIsInCategory_1].[TargetECInstanceId]
LEFT JOIN (
  SELECT
    [nav_bis_PhysicalElementIsOfPhysicalMaterial_0].*
  FROM
    [bis].[PhysicalElementIsOfPhysicalMaterial] [nav_bis_PhysicalElementIsOfPhysicalMaterial_0]
    INNER JOIN [bis].[PhysicalMaterial] [nav_bis_PhysicalMaterial_0] ON [nav_bis_PhysicalMaterial_0].[ECInstanceId] = [nav_bis_PhysicalElementIsOfPhysicalMaterial_0].[TargetECInstanceId]
) [nav_bis_PhysicalElementIsOfPhysicalMaterial_0] ON [rel_bis_GraphicalElement3dRepresentsElement_0].[TargetECInstanceId] = [nav_bis_PhysicalElementIsOfPhysicalMaterial_0].[SourceECInstanceId]
LEFT JOIN [bis].[PhysicalMaterial] [nav_bis_PhysicalMaterial_0] ON [nav_bis_PhysicalMaterial_0].[ECInstanceId] = [nav_bis_PhysicalElementIsOfPhysicalMaterial_0].[TargetECInstanceId]
WHERE
  [this].[ECInstanceId] = ?

The expensive part is joining nav_bis_GeometricElement3dIsInCategory_1 and nav_bis_PhysicalElementIsOfPhysicalMaterial_0. Instead, we could have this query, which returns the same result:

SELECT
  *
FROM ONLY [orddgndyn].[Corridor__x005C__Final] [this]
LEFT JOIN [generic].[GraphicalModel3d] [rel_generic_GraphicalModel3d_0] ON [rel_generic_GraphicalModel3d_0].[ECInstanceId] = [this].[Model].[Id]
LEFT JOIN (
  SELECT
    [rel_bis_GraphicalElement3dRepresentsElement_0].*
  FROM
    [bis].[GraphicalElement3dRepresentsElement] [rel_bis_GraphicalElement3dRepresentsElement_0]
    INNER JOIN [rrphys].[Corridor] [rel_rrphys_Corridor_0] ON [rel_rrphys_Corridor_0].[ECInstanceId] = [rel_bis_GraphicalElement3dRepresentsElement_0].[TargetECInstanceId]
) [rel_bis_GraphicalElement3dRepresentsElement_0] ON [this].[ECInstanceId] = [rel_bis_GraphicalElement3dRepresentsElement_0].[SourceECInstanceId]
LEFT JOIN [rrphys].[Corridor] [rel_rrphys_Corridor_0] ON [rel_rrphys_Corridor_0].[ECInstanceId] = [rel_bis_GraphicalElement3dRepresentsElement_0].[TargetECInstanceId]
LEFT JOIN [bis].[SpatialCategory] [nav_bis_SpatialCategory_1] ON [nav_bis_SpatialCategory_1].[ECInstanceId] = [rel_rrphys_Corridor_0].[Category].[Id]
LEFT JOIN [bis].[PhysicalMaterial] [nav_bis_PhysicalMaterial_0] ON [nav_bis_PhysicalMaterial_0].[ECInstanceId] = [rel_rrphys_Corridor_0].[PhysicalMaterial].[Id]
WHERE
  [this].[ECInstanceId] = ?

Flaky Test in `ECPresentation` on Linux x64 - `TaskDiagnosticTests.BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel`

Build Info

  • Repo: https://github.com/iTwin/imodel-native
  • Build Name: imodel-native
  • OS: Linux x64
  • Test Suite Name: TaskDiagnosticTests
  • Test Name: BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel

Error Detail

[----------] 1 test from TaskDiagnosticTests
[ RUN      ] TaskDiagnosticTests.BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel
/home/platform-bld/vsts_agent_work/7/s/imodel-native/iModelCore/ECPresentation/Tests/NonPublished/Integration/TaskDiagnosticsTests.cpp:191: Failure
Expected equality of these values:
  diagnosticScopes[i]->BuildJson()
    Which is: 96-byte object <04-00 00-00 10-00 00-00 98-D1 3B-F0 A7-7F 03-00 10-FD 3F-F1 A7-7F 00-00 10-FD 3F-F1 A7-7F 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-04 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>
  requestDiagnostics[i].value()
    Which is: 96-byte object <04-00 00-00 10-00 00-00 88-B9 00-D0 A7-7F 03-00 70-0A 00-D0 A7-7F 00-00 70-0A 00-D0 A7-7F 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-04 00-00 00-00 00-00 00-00 00-00 A7-7F 00-00 00-00 00-00 00-00 00-00>
Diagnostic scope content after task completion doesn't match what we had in `then` callback
  After task completion:
{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Get task connection"},{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks queue: add task `d8ce878a-4d04-4913-878f-fb53bf86f4fc`"},{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: pop task"},{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: schedule task `d8ce878a-4d04-4913-878f-fb53bf86f4fc`"},{"logs":[{"scopeCreateTimestamp":1674166730247,"duration":22,"scope":"Get task connection"},{"logs":[{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"Ruleset created: 'test'"}],"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"Find ruleset"},{"logs":[{"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"Open hierarchy cache"}],"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"NodesCacheManager: Get cache"}],"scopeCreateTimestamp":1674166730269,"duration":30,"scope":"Create content provider context"},{"scopeCreateTimestamp":1674166730299,"duration":0,"scope":"Convert content rule node keys to instance keys"}],"scopeCreateTimestamp":1674166730269,"duration":31,"scope":"Get content provider"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Get relationship paths"},{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Appending class properties"},{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Get relationship paths"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Appending related properties"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Append content for `BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel:A`"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Create content descriptor for ContentInstancesOfSpecificClasses: "}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Handle Content"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Create content descriptor"}],"scopeCreateTimestamp":1674166730269,"duration":31,"scope":"Get content descriptor"}],"scopeCreateTimestamp":1674166730247,"duration":53,"scope":"Task `d8ce878a-4d04-4913-878f-fb53bf86f4fc` executing"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Task `d8ce878a-4d04-4913-878f-fb53bf86f4fc` completing"}],"scopeCreateTimestamp":1674166730246,"duration":54,"attributes":{"rules":["Content"]},"scope":"Get content descriptor"},{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: add task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391`"},{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: pop task"},{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: schedule task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391`"},{"logs":[{"scopeCreateTimestamp":1674166730301,"duration":29,"scope":"Get task connection"},{"logs":[{"scopeCreateTimestamp":1674166730330,"duration":1,"scope":"Get content provider"},{"logs":[{"logs":[{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Create query for class `BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel:A`"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Create queries for ContentInstancesOfSpecificClasses"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Handle Content"},{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Apply descriptor overrides"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Applying query adjustments: descriptor filtering, sorting, paging"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Create content set size queries"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Prepare statement"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Get statement"},{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"First step: `SELECT COUNT(DISTINCT ([/ECInstanceKeys/])) AS [RowsCount] FROM (SELECT 1 AS [/ContractId/], GetInstanceKey(IFNULL([this].[ECClassId],0),[this].[ECInstanceId]) AS [/ECInstanceKeys/], CAST(null AS TEXT) AS [/InputECInstanceKeys/] FROM ONLY [alias_BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel].[A] [this])`"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"QueryExecutor: Read next"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Execute count query"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Initialize content set size"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Query count"}],"scopeCreateTimestamp":1674166730330,"duration":1,"scope":"Get content set size"}],"scopeCreateTimestamp":1674166730301,"duration":30,"scope":"Task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391` executing"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391` completing"}],"scopeCreateTimestamp":1674166730300,"duration":32,"attributes":{"rules":["Content"]},"scope":"Get content set size"}],"scopeCreateTimestamp":1674166730246,"duration":54,"scope":"size"}
  In `then` callback:
{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Get task connection"},{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks queue: add task `d8ce878a-4d04-4913-878f-fb53bf86f4fc`"},{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: pop task"},{"logs":[{"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730246,"duration":0,"scope":"Tasks scheduler: schedule task `d8ce878a-4d04-4913-878f-fb53bf86f4fc`"},{"logs":[{"scopeCreateTimestamp":1674166730247,"duration":22,"scope":"Get task connection"},{"logs":[{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"Ruleset created: 'test'"}],"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"Find ruleset"},{"logs":[{"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"Open hierarchy cache"}],"scopeCreateTimestamp":1674166730269,"duration":0,"scope":"NodesCacheManager: Get cache"}],"scopeCreateTimestamp":1674166730269,"duration":30,"scope":"Create content provider context"},{"scopeCreateTimestamp":1674166730299,"duration":0,"scope":"Convert content rule node keys to instance keys"}],"scopeCreateTimestamp":1674166730269,"duration":31,"scope":"Get content provider"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Get relationship paths"},{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Appending class properties"},{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Get relationship paths"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Appending related properties"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Append content for `BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel:A`"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Create content descriptor for ContentInstancesOfSpecificClasses: "}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Handle Content"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Create content descriptor"}],"scopeCreateTimestamp":1674166730269,"duration":31,"scope":"Get content descriptor"}],"scopeCreateTimestamp":1674166730247,"duration":53,"scope":"Task `d8ce878a-4d04-4913-878f-fb53bf86f4fc` executing"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Task `d8ce878a-4d04-4913-878f-fb53bf86f4fc` completing"}],"scopeCreateTimestamp":1674166730246,"duration":54,"attributes":{"rules":["Content"]},"scope":"Get content descriptor"},{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: add task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391`"},{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: pop task"},{"logs":[{"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730300,"duration":0,"scope":"Tasks scheduler: schedule task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391`"},{"logs":[{"scopeCreateTimestamp":1674166730301,"duration":29,"scope":"Get task connection"},{"logs":[{"scopeCreateTimestamp":1674166730330,"duration":1,"scope":"Get content provider"},{"logs":[{"logs":[{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Create query for class `BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel:A`"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Create queries for ContentInstancesOfSpecificClasses"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Handle Content"},{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Apply descriptor overrides"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Applying query adjustments: descriptor filtering, sorting, paging"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Create content set size queries"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Prepare statement"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Get statement"},{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"First step: `SELECT COUNT(DISTINCT ([/ECInstanceKeys/])) AS [RowsCount] FROM (SELECT 1 AS [/ContractId/], GetInstanceKey(IFNULL([this].[ECClassId],0),[this].[ECInstanceId]) AS [/ECInstanceKeys/], CAST(null AS TEXT) AS [/InputECInstanceKeys/] FROM ONLY [alias_BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel].[A] [this])`"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"QueryExecutor: Read next"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Execute count query"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Initialize content set size"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Query count"}],"scopeCreateTimestamp":1674166730330,"duration":1,"scope":"Get content set size"}],"scopeCreateTimestamp":1674166730301,"duration":30,"scope":"Task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391` executing"},{"logs":[{"logs":[{"logs":[{"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Tasks queue: pop task"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Tasks scheduler: pop task"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Tasks scheduler: check tasks"}],"scopeCreateTimestamp":1674166730331,"duration":0,"scope":"Task `44e6fc02-e20f-41e1-bedf-6b6cf7a0f391` completing"}],"scopeCreateTimestamp":1674166730300,"duration":31,"attributes":{"rules":["Content"]},"scope":"Get content set size"}],"scopeCreateTimestamp":1674166730246,"duration":54,"scope":"size"}

[  FAILED  ] TaskDiagnosticTests.BuildsCorrectTaskDiagnosticsWithMultipleChainedTasksExecutedInParallel (381 ms)
[----------] 1 test from TaskDiagnosticTests (383 ms total)

Links to failing builds

Notes

Failed once, succeeded on second run.

Presentation: Failure to produce content when query contains classes with names from SQLite reserved keywords

Based on these test failures.

SEQ shows the tests fail because of invalid query. And example of the query:

SELECT
  MAX(([T].[TargetsCount])) AS [PossibleTargetsCount]
FROM
  (
    SELECT
      [this].[ECInstanceId] AS [/SourceECInstanceId/],
      [this].[ECClassId] AS [/TargetECClassId/],
      COUNT(1) AS [TargetsCount]
    FROM
      [some_schema].[some_class] [this]
      LEFT JOIN (
        SELECT
          [rel_bis_ElementGroupsMembers_0].*
        FROM
          [bis].[ElementGroupsMembers] [rel_bis_ElementGroupsMembers_0]
          INNER JOIN ONLY [generic].[Group] [rel_generic_Group_0] ON [rel_generic_Group_0].[ECInstanceId] = [rel_bis_ElementGroupsMembers_0].[SourceECInstanceId]
      ) [rel_bis_ElementGroupsMembers_0] ON [this].[ECInstanceId] = [rel_bis_ElementGroupsMembers_0].[TargetECInstanceId]
      LEFT JOIN ONLY [generic].[Group] [rel_generic_Group_0] ON [rel_generic_Group_0].[ECInstanceId] = [rel_bis_ElementGroupsMembers_0].[SourceECInstanceId]
    WHERE
      (
        [rel_generic_Group_0].[ECClassId] IS (ONLY Generic:Group)
      )
      AND ([this].[ECInstanceId] IN (?))
    GROUP BY
      [this].[ECInstanceId],
      [rel_generic_Group_0].[ECClassId]
  ) [T]

Note: [some_schema].[some_class] is a placeholder for a real class used in the specific iModel.

The problem seems to be the [rel_generic_Group_0].[ECClassId] IS (ONLY Generic:Group) part - group is a reserved SQLite's keyword.

Simplified example:

  • Fails: select count(1) from bis.element where ecclassid is (generic:group)
  • Succeeds: select count(1) from bis.element where ecclassid is ([generic]:[group])

We should make sure that class names are added to square brackets when using the ECClassId IS (schema_name:class_name) construct.

Wrap import error of native addon on windows with suggestion to install MSVC runtime

Occasionally on windows desktops people seem to run into an issue where node (or electron) throws an error when loading the native addon, with the windows error message The specified module could not be found.

image

this._nativeLib = require(`./${NativeLibrary.archName}/${NativeLibrary.nodeAddonName}`) as typeof IModelJsNative; // eslint-disable-line @typescript-eslint/no-var-requires

This happens because when node.js/electron requires the native addon, windows fails to load the addon DLL due to a missing dependency of the DLL, frequently this is just the Microsoft Visual C++ Runtime not being installed on the system. I have not identified any other required DLLs dependencies that windows 10/11 shouldn't already have installed.

The require occurs here

Could it be wrapped in a clearer platform-specific warning? like so:

try {
  this._nativeLib = require(`./${NativeLibrary.archName}/${NativeLibrary.nodeAddonName}`) as typeof IModelJsNative;
} catch (err) {
  if (/The specified module could not be found/.test(err.message) && process.platform === 'win32')
    err.message += "\niTwin.js requires that Microsoft Visual C++ Runtime be installed."
      + "\nThe latest version is available at Microsoft's website."
      + "\nhttps://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist";
  throw err;
}

StandardValues custom attribute converter fails when definition is in a deeply nested schema reference

We have a standard value custom attribute on a property in SchemaC::ClassC which inherits from SchemaB::ClassB which inherits from SchemaA::ClassA. When the converter tries to set the type for ClassC in SchemaC, it fails because the enumeration is defined in SchemaA and SchemaC only references SchemaB.

There is this test:
TEST_F(StandardValueToEnumConversionTest, TestRootClassInSeparateSchema)

But unfortunately that is only one deep. I copied that and stuck another schema in the middle:

TEST_F(StandardValueToEnumConversionTest, TestRootClassInGrandparentSchema)
    {
    Utf8CP baseSchemaXml = R"xml(<?xml version='1.0' encoding='UTF-8'?>
        <ECSchema schemaName='baseTest' version='1.0' nameSpacePrefix='ts' xmlns='http://www.bentley.com/schemas/Bentley.ECXML.2.0'>
            <ECSchemaReference name='EditorCustomAttributes' version='01.00' prefix='beca' />
            <ECClass typeName='TestClass' isDomainClass='True'>
                <ECProperty propertyName='testProp' typeName='int'/>
            </ECClass>
        </ECSchema>)xml";
    Utf8CP middleSchemaXml = R"xml(<?xml version='1.0' encoding='UTF-8'?>
        <ECSchema schemaName='Middle' version='1.0' nameSpacePrefix='mid' xmlns='http://www.bentley.com/schemas/Bentley.ECXML.2.0'>
            <ECSchemaReference name='EditorCustomAttributes' version='01.00' prefix='beca' />
            <ECSchemaReference name='baseTest' version='01.00' prefix='base'/>
            <ECClass typeName='TestClass' isDomainClass='True'>
                <BaseClass>base:TestClass</BaseClass>
                <ECProperty propertyName='testProp' typeName='int'/>
            </ECClass>
        </ECSchema>)xml";
    Utf8CP schemaXml = R"xml(<?xml version='1.0' encoding='UTF-8'?>
        <ECSchema schemaName='test' version='1.0' nameSpacePrefix='ts' xmlns='http://www.bentley.com/schemas/Bentley.ECXML.2.0'>
            <ECSchemaReference name='EditorCustomAttributes' version='01.00' prefix='beca' />
            <ECSchemaReference name='Middle' version='01.00' prefix='mid'/>
            <ECClass typeName='TestClass' isDomainClass='True'>
                <BaseClass>mid:TestClass</BaseClass>
                <ECProperty propertyName='testProp' typeName='int'>
                    <ECCustomAttributes>
                        <StandardValues xmlns='EditorCustomAttributes.01.00'>
                            <ValueMap>
                                <ValueMap>
                                    <Value>0</Value>
                                    <DisplayString>value0</DisplayString>
                                </ValueMap>
                                <ValueMap>
                                    <Value>1</Value>
                                    <DisplayString>value1</DisplayString>
                                </ValueMap>
                                <ValueMap>
                                    <Value>2</Value>
                                    <DisplayString>value2</DisplayString>
                                </ValueMap>
                            </ValueMap>
                        </StandardValues>
                    </ECCustomAttributes>
                </ECProperty>
            </ECClass>
        </ECSchema>)xml";
 
    ECSchemaPtr baseSchema;
    ECSchemaPtr middleSchema;
    ECSchemaPtr schema;
    ECSchemaReadContextPtr context = ECSchemaReadContext::CreateContext();
    ASSERT_EQ(SchemaReadStatus::Success, ECSchema::ReadFromXmlString(baseSchema, baseSchemaXml, *context));
    ASSERT_TRUE(baseSchema.IsValid());
    ASSERT_EQ(SchemaReadStatus::Success, ECSchema::ReadFromXmlString(middleSchema, middleSchemaXml, *context));
    ASSERT_TRUE(middleSchema.IsValid());
    ASSERT_EQ(SchemaReadStatus::Success, ECSchema::ReadFromXmlString(schema, schemaXml, *context));
    ASSERT_TRUE(schema.IsValid());
 
    EXPECT_TRUE(ECSchemaConverter::Convert(*schema.get(), *context.get())) << "Schema conversion failed";
 
    ASSERT_EQ(0, schema->GetEnumerationCount()) << "The number of enumerations created is not as expected.";
    ASSERT_EQ(1, baseSchema->GetEnumerationCount()) << "The number of enumerations created is not as expected.";
 
    CheckTypeName("base:TestClass_testProp", *schema, "testProp", {"TestClass"});
    CheckTypeName("TestClass_testProp", *baseSchema, "testProp", {"TestClass"});
    }

This test fails:

ERROR    ECObjectsNative      Failed to convert StandardValues to ECEnumeration on property TestClass.testProp.
ERROR    ECObjectsNative      Failed [EditorCustomAttributes:StandardValues Converter][Container ECProperty:test:TestClass.testProp].
d:\bsw\imodel02\src\imodel02\iModelCore\ecobjects\test\NonPublished\CustomAttributeConversionsTest.cpp(2197): error: Value of: ECSchemaConverter::Convert(*schema.get(), *context.get())
  Actual: false
Expected: true
Schema conversion failed
d:\bsw\imodel02\src\imodel02\iModelCore\ecobjects\test\NonPublished\CustomAttributeConversionsTest.cpp(280): error: Expected equality of these values:
  typeName
    Which is: "base:TestClass_testProp"
  prop->GetTypeName().c_str()
    Which is: "int"
Property Type for property TestClass.testProp should have been base:TestClass_testProp
d:\bsw\imodel02\src\imodel02\iModelCore\ecobjects\test\NonPublished\CustomAttributeConversionsTest.cpp(280): error: Expected equality of these values:
  typeName
    Which is: "TestClass_testProp"
  prop->GetTypeName().c_str()
    Which is: "int"
Property Type for property TestClass.testProp should have been TestClass_testProp

Add ClipPlaneSet method to clip a generic CurveVector

For imodel02 (connectors).

Tasks

Clip of linear sweep of parity region produces no facets

Bug #1279805

Clip the geometry below with ClipPlaneSet::ClipPlaneSetSectionPolyface

{"linearSweep":{"contour":{"parityRegion":[{"loop":[{"lineString":[[-3.2977383001558134,6.235758360584979,-0.10000000000000053],[-6.46664378235049,3.856966271116766,-0.10000000000000053],[-6.46664378235049,3.856966271116766,8.418576],[-3.2977383001558134,6.235758360584979,8.418576],[-3.2977383001558134,6.235758360584979,-0.10000000000000053]]}]},{"loop":[{"arc":{"center":[-5.06501251137976,4.909124310689251,1.0667999999999997],"vectorX":[0.8531668605908739,0.6404440240875956,0],"vectorY":[0,0,1.0668000000000002],"sweepStartEnd":[179.99999999999983,539.9999999999998]}}]}]},"capped":true,"vector":[0.5489520206465107,-0.7312858805064635,0]}}

Solid in question is on the left. The clipper appears to have a single relevant plane, horizontal at top, but actually the problematic plane is at bottom, through the circular cutout. User expects facets on the clip planes, like the solid on the right.

Image

OpenSSL@3 support

OpenSSL 1.1.1 support reached EOL Sept 2023. Node has decided due to the EOL to move forward their Node16 EOL to coincide with that.

We should update the native addon to drop [email protected] and use OpenSSL@3.

This should be released in both 4.0 and as a 3.7.x patch.

Related property values not loaded for derived related classes

Schema:

Classes: 
- A
  - Properties: PropA
- B
  - Properties: PropB
- C
  - Derives from B
  - Properties: PropC

Relationships: 
- AB between A -> B

Data:

Instances:
- a of class A, PropA = "aaa"
- b of class B, PropB = "bbb"
- c of class C, PropB = "ccc", PropC = "ccc"
- ab of relationship AB, between instances a and b
- ac of relationship AB, between instances a and c

Rules:

{
  "id": "rules",
  "rules": [{
    "ruleType": "Content",
    "specifications": [{
      "specType": "ContentInstancesOfSpecificClasses",
      "classes": { "schemaName": "MySchema", "classNames": ["A"] },
      "relatedProperties": [{
        "propertiesSource": {
          "relationship": { "schemaName": "MySchema", "className": "AB" },
          "direction": "Forward"
        },
        "handleTargetClassPolymorphically": true
      }]
    }]
  }]
}

Expected result:

PropA: "aaa"
B:
  PropB: "bbb"
C:
  PropB: "ccc"
  PropC: "ccc"

Actual result:

PropA: "aaa"
B:
  PropB: "bbb"
C:
  PropB: "ccc"
  PropC: null

Investigate possibility to avoid determining children of all nodes in `Same label grouping nodes post-processor`

https://github.com/iTwin/presentation-performance-tests/issues/70#issuecomment-1511303070 shows that Models Tree initial load takes a long time on specific iModels because we have to determine children for a very large number of Subject nodes. Generally that's avoided by going it just for the requested page, but in that situation Models Tree uses same label grouping at post-processing step, which requires getting the whole hierarchy level.

Need to investigate ways to improve this. Would it be possible to get the whole hierarchy level without determining children for the nodes? We could merge them without having done that and determine children for a page of merged nodes afterwards.

Replace the way Geographic Coordinate Reference System are stored in an iModel.

Currently the definition of a Geographic Coordinate Reference System is stored in an iModel using a semi-opaque binary structure. It should be instead stored as a JSON fragment for two reasons:
A - The JSON fragment is open and easily (so to speak) understandable by a human
B - The JSON fragments support definition details that are not supported by the binary structure (such as additional transforms) meaning people can create an iModel and try to set a GCRS that cannot be stored in the iModel.

Of course, support of the binary for reading is essential for older iModels.

Android builds sometimes fail with apparent OOM

Execution failed for task ':app:mergeReleaseNativeDebugMetadata'.

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeDebugMetadataTask$MergeNativeDebugMetadataWorkAction
Java heap space

Presentation: `suppressSimilarAncestorsCheck` attribute doesn't work for `CustomNode` specifications

Repro

Open this hierarchy, notice that the hierarchy breaks at the second "Custom" node:
Image

Expected result

The iModel has a fairly large Subjects' hierarchy:
Image

The hierarchy we build should look similar, except the "Custom" node should get in-between each Subject hierarchy level.

Additional details

Most likely the problem happens because of infinite hierarchy prevention, but suppressing it for CustomNode specification doesn't seem to work.

Support Binary/BeGuid type properties in content

At the moment presentation library doesn't support binary properties, because we wouldn't know how to render them. However, the ones with extendedTypeName="BeGuid" could be an exception, because rendering guid type of properties seems easily achievable.

Support Apple Silicon architecture for iOS Simulator

Add support for the Apple Silicon iOS Simulator as an architecture.

Note: in order to not slow down CI builds even further, we need to modify how CI builds work to only build one architecture. Probably the Apple Silicon iOS Simulator architecture is the "correct" one to build for CI builds in order to allow them to also run unit tests on the simulator once that is working. Release pipeline builds would need to build all architectures (arm64, arm64-simulator, x64-simulator).

CC: @tm-zub, @aruniverse, @toddsouthenbentley, @swbsi, @chuckkir

Presentation: Crash when serializing response

https://bentley-systems-inc.sentry.io/issues/4157958779

OS Version: Linux 5.4.0 (-1104-azure #110~18.04.1-Ubuntu SMP Sat Feb 11 17:41:21 UTC 2023 x86_64)
Report Version: 104

Crashed Thread: 8

Application Specific Information:
Fatal Error: SIGABRT / SI_TKILL / 0x0

Thread 8 Crashed:
0   libc.so.6                       0x7f0d5bf067bb      gsignal
1   libc.so.6                       0x7f0d5bef1534      abort
2   libstdc++.so.6                  0x7f0d5c2d9983      <unknown>
3   libstdc++.so.6                  0x7f0d5c2df8c5      std::rethrow_exception
4   libstdc++.so.6                  0x7f0d5c2df900      std::terminate
5   libstdc++.so.6                  0x7f0d5c2dfb33      __cxa_throw
6   libimodeljs-addon.so            0x7f0d361f4730      Napi::String::New
7   libimodeljs-addon.so            0x7f0d361f4368      [inlined] Napi::details::vf_utf8_charp::From (napi-inl.h:1181)
8   libimodeljs-addon.so            0x7f0d361f4368      [inlined] Napi::String::From<T> (napi-inl.h:1257)
9   libimodeljs-addon.so            0x7f0d361f4368      [inlined] Napi::Value::From<T> (napi-inl.h:1234)
10  libimodeljs-addon.so            0x7f0d361f4368      BentleyM0200::NapiMemberRef::operator= (napi.h:241)
11  libimodeljs-addon.so            0x7f0d3625c279      [inlined] BentleyM0200::BeJsValue::operator= (BeJsValue.h:514)
12  libimodeljs-addon.so            0x7f0d3625c279      [inlined] BentleyM0200::BeJsValue::operator= (BeJsValue.h:520)
13  libimodeljs-addon.so            0x7f0d3625c279      IModelJsNative::NativeECPresentationManager::CreateReturnValue (IModelJsNative.cpp:5002)
14  libimodeljs-addon.so            0x7f0d3625ffe6      [inlined] IModelJsNative::NativeECPresentationManager::CreateReturnValue (IModelJsNative.cpp:5057)
15  libimodeljs-addon.so            0x7f0d3625ffe6      [inlined] IModelJsNative::NativeECPresentationManager::ResolvePromise::lambda::operator() (IModelJsNative.cpp:5065)
16  libimodeljs-addon.so            0x7f0d3625ffe6      std::_Function_handler<T>::_M_invoke (functional:1731)
17  libimodeljs-addon.so            0x7f0d3625b1b1      [inlined] std::function<T>::operator() (functional:2127)
18  libimodeljs-addon.so            0x7f0d3625b1b1      Napi::ThreadSafeFunction::CallJS (napi-inl.h:5576)
19  node                            0xad08b1            <unknown>
20  node                            0x15655e6           <unknown>
21  node                            0x1577d14           <unknown>
22  node                            0x1565f38           <unknown>
23  node                            0xa43dd5            <unknown>
24  node                            0xb4ca06            <unknown>
25  node                            0xace5a2            <unknown>
26  node                            0x4a496c0           <unknown>
27  node                            0xace566            <unknown>
28  libc.so.6                       0x7f0d5c080100      __libc_freeres
29  node                            0x3000000           <unknown>
30  node                            0x4a36820           <unknown>
31  node                            0xa40653            <unknown>
32  node                            0x1ec5010           <unknown>
33  libc.so.6                       0x7f0d5bef309a      __libc_start_main
34  node                            0xa4067c            <unknown>

Consider using persistence units for formatting values

At the moment, when looking for property value format based on requested unit system, we use this order:

  1. The first property’s KoQ presentation format that uses the requested unit system.
  2. The format from defaultFormats map specified on the backend, matching phenomenon of the property’s KoQ and requested unit system.
  3. Default presentation format of property’s KoQ. That generally matches the first presentation format in KoQ.
  4. No format at all.

Before choosing the default presentation format (#⁠3), we could check if the persistence unit is of the requested unit system and use that, if true.

allow non-unicode trimming element insertion path for transformer case

#180 made it impossible for the transformer to preserve code values in the iModels that already have non-unicode spaces (e.g.non-breaking space, &nbsp;) persisted in a code value. We have to add an API for use by the transformer to preserve the old behavior during element insert, to prevent people forking an iModel, getting some code values from master using raw ECSQL (without wrapping them in a Code instance which would fix that) and trying to find them in a branch which had its code values "fixed" by this change.

Technically we could also say "use the Code class" but that sounds like it will lead to confusing bugs during ECSQL usage on some models. We can close this issue if the consensus is "use Code"

Presentation: Not all properties available for filtering

Repro:

  1. Open this link
  2. Notice there's a content modifier rule that force displays the Origin property that's by default hidden.
  3. Select some geometric element (e.g. a Stud Bolt) and ensure the Origin property is available:
    Image
  4. Click the filtering button on the class grouping node:
    Image
  5. Try to use the Origin property and notice it's not available:
    Image

Expected result: All properties available in the property grid are also available for filtering in the filtering dialog.

Update baseline Linux version (i.e. libc version)

Our current baseline glibc version is 2.24 (need to verify, assumption based off of Debian 91).

The Node Addon is currently built using Debian 9 which has exited LTS June 2022. Meaning we need to move off of it as soon as we responsibly can.

Debian 9 is in ELTS now and will only get support for packages that are used by paying to support the ELTS efforts: https://wiki.debian.org/LTS/Extended.

On Linux, the CRT that a binary requires is whatever the build machine’s OS correlates to (i.e. OS and CRT are tightly coupled). Current mantra is we use the oldest possible build machine OS in order to use the oldest possible CRT to be able to cast as broad a net as possible. This means to move up the Debian version we build with, we will also need to update our minimum libc version.

When we do move up to a newer Debian version, we will need to keep around at least 1-2 agents in order to support the older libc version until support is fully dropped.


Footnotes

  1. https://en.wikipedia.org/wiki/Glibc

Investigate Memory Leaks issues using UMDH

It contains following sub-tasks:

  • Understanding of memory leak logs
  • Investigate that either the reported issues exist or are fixable
  • Fix the those issues which are found to be original leaks from our code

Support c++20

Currently only support c++17 as that is the highest version we can compile with on our Linux machines, due to them being on Debian 9.

There is a BUILD_WITH_C20 environment variable that can be set to compile with it locally to fix all of the current issues.

The tasks to accomplish to support c++20;

  • Verify if there is any way to build c++20 on Debian 9 without updating our minimum glibc version. Otherwise, we're stuck until a new major version. The glibc is being tracked in a separate issue, #376
  • Upgrade all build machines to Clang 11 on all machines as that is the minimum needed for c++20 support
  • Figure out a way to ensure compatibility between c++17 and c++20 so we can easily switch between the two once we're ready

Testing with c++20 today

If you set BUILD_WITH_C20 in the environment you can tell it to try to build with C++20. I think it will take some effort before we can move.

Content sources request doesn't detect `ElementUniqueAspects`

ContentSpecificationsHandler only appends classes is we used at least one of their properties. ContentClassesLocater doesn't look for actual derived classes, so we get ElementUniqueAspect whose all properties are marked hidden. Because of that the class is completely omitted from the content sources result.

Looks like ContentSourcesLocater should omit the check for appended properties and just always append the class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.