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

Serialiser_Engine: fix for MessageForDeleted to be picked up for properties of types that have multiple matching types #3371

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

pawelbaran
Copy link
Member

Issues addressed by this PR

Closes #3370

Test files

Changelog

Additional comments

@pawelbaran pawelbaran added the type:bug Error or unexpected behaviour label Jul 10, 2024
@pawelbaran pawelbaran self-assigned this Jul 10, 2024
@pawelbaran
Copy link
Member Author

@BHoMBot check serialisation
@BHoMBot check versioning

Copy link

bhombot-ci bot commented Jul 10, 2024

@pawelbaran to confirm, the following actions are now queued:

  • check serialisation
  • check versioning

@pawelbaran
Copy link
Member Author

@BHoMBot check required

Copy link

bhombot-ci bot commented Jul 10, 2024

@pawelbaran to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

Copy link

bhombot-ci bot commented Jul 10, 2024

The check serialisation has already been run previously and recorded as a successful check. This check has not been run again at this time.

Copy link

bhombot-ci bot commented Jul 10, 2024

The check versioning has already been run previously and recorded as a successful check. This check has not been run again at this time.

Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

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

Thanks @pawelbaran ,

The change makes sense. As discussed, I would just add a warning message for the case where multiple matching types where found to still provide good traceability:
image

@pawelbaran pawelbaran requested a review from al-fisher as a code owner July 11, 2024 11:39
@pawelbaran pawelbaran requested a review from adecler July 11, 2024 11:39
@pawelbaran
Copy link
Member Author

Thanks @adecler for the review, I have now addressed the comment 👍

@pawelbaran
Copy link
Member Author

@BHoMBot check required

Copy link

bhombot-ci bot commented Jul 11, 2024

@pawelbaran to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

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

The corrections are matching the request change so happy to approve.

As a side note, the if-else sequence is a bit weird here. After ruling out count == 1, there is still a check for count > 1 but only when takeFirstIfMultiple is true. The final case, will just assume there is more than one type. This is correct since the access to the BHoMTypeDictionary would have returned false if not types were found. So no bug or error and it was like that before this PR, just a little confusing. So still happy to approve.

@pawelbaran
Copy link
Member Author

@BHoMBot check code-compliance
@BHoMBot check copyright-compliance
@BHoMBot check dataset-compliance
@BHoMBot check unit-tests
@BHoMBot check ready-to-merge

Copy link

bhombot-ci bot commented Jul 11, 2024

@pawelbaran to confirm, the following actions are now queued:

  • check code-compliance
  • check copyright-compliance
  • check dataset-compliance
  • check unit-tests
  • check ready-to-merge

@pawelbaran
Copy link
Member Author

As a side note, the if-else sequence is a bit weird here.

Yeah I noticed that too and it tempted me a lot to refactor. I forced myself not to, mainly to avoid scope creep and extra review/testing resource to close out this PR.

@pawelbaran
Copy link
Member Author

@BHoMBot check unit-tests

Copy link

bhombot-ci bot commented Jul 11, 2024

@pawelbaran to confirm, the following actions are now queued:

  • check unit-tests

There are 1 requests in the queue ahead of you.

Copy link

bhombot-ci bot commented Jul 11, 2024

FAO: @FraserGreenroyd
@pawelbaran is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate.

The check they wish to have dispensation on is unit-tests.

If you are providing dispensation on this occasion, please reply with:

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 27324447978

@pawelbaran
Copy link
Member Author

I will dispensate the failing unit test check on the basis of the fact that it has been failing consistently for a longer period of time, as can be seen here or here - each time the failure message is exactly the same.

@pawelbaran
Copy link
Member Author

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 27324447978

Copy link

bhombot-ci bot commented Jul 11, 2024

@pawelbaran I have now provided a passing check on reference 27324447978 as requested.

@pawelbaran pawelbaran merged commit 9e26f6f into develop Jul 11, 2024
12 checks passed
@pawelbaran pawelbaran deleted the BHoM_Engine-#3370-MultipleMatchingTypeBugVol2 branch July 11, 2024 14:34
@BHoMBot BHoMBot mentioned this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
2 participants