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

DYN-7392 Forge Units reference #15512

Merged
merged 5 commits into from
Nov 6, 2024
Merged

DYN-7392 Forge Units reference #15512

merged 5 commits into from
Nov 6, 2024

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Sep 26, 2024

Purpose

Per https://jira.autodesk.com/browse/DYN-7392, update dependency originally brought in as part of #12126

Updates ForgeUnits to 5.3.2 as REvit
Updates Forge.Schema to 1.0.4 (latest on public nuget), but it still does not match the latest Revit
Updates Analtics to 4.2.1.6685 which brings in the same version of ADP that Revit uses

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Update Forge Units reference

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

@QilongTang QilongTang added this to the 3.4 milestone Sep 26, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7392

Copy link

github-actions bot commented Sep 26, 2024

UI Smoke Tests

Test: success. 11 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests

@pinzart90 pinzart90 marked this pull request as ready for review November 4, 2024 13:30
<!--Skip copying the runtime dlls because we only need one (ForgeUnitsManaged.dll) which we copy in a task bellow.-->
<ExcludeAssets>runtime;build</ExcludeAssets>
</PackageReference>
<PackageReference Include="ForgeUnits.Schemas" Version="1.0.1" GeneratePathProperty="true" />
<PackageReference Include="ForgeUnits.Schemas" Version="1.0.4" GeneratePathProperty="true" />
Copy link
Member

Choose a reason for hiding this comment

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

so does this work in Revit?

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -199,7 +199,7 @@ public void ForgeUnitDropdownsLoadWithMalformedData()
//we've changed both index and name, so a new item is selected.
Assert.AreNotEqual(DynamoUnits.Quantity.ByTypeID("autodesk.unit.quantity:force-1.0.2"), node3.CachedValue.Data);
Assert.AreEqual(DynamoUnits.Symbol.ByTypeID("autodesk.unit.symbol:mm-1.0.1"), node4.CachedValue.Data);
Assert.AreEqual(DynamoUnits.Unit.ByTypeID("autodesk.unit.unit:millimeters-1.0.1"), node5.CachedValue.Data);
Assert.AreEqual(DynamoUnits.Unit.ByTypeID("autodesk.unit.unit:microarcseconds-1.0.1"), node5.CachedValue.Data);
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

It seems to me this test is trying to assert exactly what you saying is NOT happening.
IE when new schema data is introduced the nodes should not just return new values... that will break graphs.

Copy link
Member

Choose a reason for hiding this comment

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

@QilongTang @saintentropy do I have that right? I kind of remember this is a general problem with dropdowns on the Revit side, though I thought we had semi fixed it with string matching as well as index matching at some point?
I am remembering incorrectly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, to me it looks like opening a legacy graph the node is returning a different value, if the old value is still there from the list, then this could be a bug worth fixing. I would suggest checking the serialized index and node value and compare with the new graph opening

Copy link
Contributor

@pinzart90 pinzart90 Nov 5, 2024

Choose a reason for hiding this comment

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

The node in question

      "SelectedIndex": 221,
      "SelectedString": "Millimeters AAA",
      "NodeType": "ExtensionNode",
      "Id": "2cc49d25d3b447b281a81efd6173c6cf",
      ```
It has an intentional malformed selection "Millimeters AAA" - that does not exist.
So in turn it defaults to the selected index (221) which now is different (points to microarcsecond), because of the changes that went in

Copy link
Member

@mjkkirschner mjkkirschner Nov 5, 2024

Choose a reason for hiding this comment

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

I don't want to hold this up further, but I am trying to understand the following:

  1. Is this failure an existing issue with all dropdowns or just these unit nodes?
  2. What was this test intending to test? Does it still test that? Is it valuable?

Copy link
Contributor

@pinzart90 pinzart90 Nov 6, 2024

Choose a reason for hiding this comment

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

  1. I think this scenario could affect all dropdowns
  2. It looks to me like this test wants to cover the stability of unit drop downs. When the serialized unit selection exists at runtime and when it does not exist anymore. I think there is still value in it
    If a unit value is renamed, the selectedIndex could still point to the new (renamed) unit.
    This test is prone to failures if new units are added or removed.

@mjkkirschner
Copy link
Member

why the test changes?

@pinzart90
Copy link
Contributor

why the test changes?

new units were introduced so some of the hardcoded values in the tests changed

@pinzart90 pinzart90 merged commit 3052dca into master Nov 6, 2024
24 checks passed
@pinzart90 pinzart90 deleted the ForgeUnits branch November 6, 2024 14:02
pinzart90 added a commit that referenced this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants