Skip to content

Conversation

@scbedd
Copy link
Member

@scbedd scbedd commented Feb 10, 2025

This PR enhances the Group-ByObjectKey function to coalesce boolean-like values to their true boolean representation before getting a hashcode for them.

We use this grouping function to group a list of packages by which matrix config they belong to. The issue is that due to devops shenanigans, these matrix configs are getting their booleans a bit changed. The "default" matrix that is fed into Create-PrJobMatrix is a result of a devops json conversion of the static yaml parameter. Due to this, the booleans are getting messed up.

MatrixConfigs:
      - Name: NET_ci_test_base
        Path: eng/pipelines/templates/stages/platform-matrix.json
        Selection: sparse
        GenerateVMJobs: true

But devops converts this to:

{
  "Name": "NET_ci_test_base",
  "Path": "eng/pipelines/templates/stages/platform-matrix.json",
  "Selection": "sparse",
  "GenerateVMJobs": "True"
}

Notice that GenerateVMJobs value is different and not really a boolean anymore? This was causing matrix coalesce to treat these as different matrices when they were NOT intended to be. This PR addresses this possible issue.

@scbedd scbedd self-assigned this Feb 10, 2025
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@scbedd scbedd marked this pull request as ready for review February 10, 2025 21:28
@scbedd scbedd requested a review from a team as a code owner February 10, 2025 21:28
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Copy link
Contributor

@JimSuplizio JimSuplizio left a comment

Choose a reason for hiding this comment

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

I'm approving this. For everyone else's benefit, these changes were tested in an existing test PR. What was going on is that the test runs weren't getting collated correctly, for example azure-core and azure-identity have the same test matrix but because this was converting values they were being computed as separate matrices which, because they're effectively the same run, were causing the duplicate runs to get dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants