Skip to content

fix: anchor MIG resource pattern matching - #1807

Merged
tariq1890 merged 1 commit into
NVIDIA:mainfrom
raglin:fix/mig-pattern-anchoring
Aug 19, 2026
Merged

tariq1890 merged 1 commit into
NVIDIA:mainfrom
raglin:fix/mig-pattern-anchoring

Conversation

@raglin

@raglin raglin commented May 26, 2026

Copy link
Copy Markdown
Contributor

The wildCardToRegexp function did not anchor patterns with ^ and $, causing patterns like '1g.24gb' to match '1g.24gb-me' via substring. This prevented the mixed MIG strategy from distinguishing profiles with suffixes (-me, +me.all, +gfx) as separate Kubernetes resources

Fixes #1462

@copy-pr-bot

copy-pr-bot Bot commented May 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@raglin
raglin force-pushed the fix/mig-pattern-anchoring branch from 72430be to 723d36e Compare May 26, 2026 11:50
@tulipaws

tulipaws commented Jun 1, 2026

Copy link
Copy Markdown

@tariq1890 / @cdesiniotis will you be able to review this ?

@tariq1890

Copy link
Copy Markdown
Contributor

Thank you @raglin for your patience. Let's address the following:

  • The commit message is too long. The first sentence should suffice as the commit message. The rest can be part of the commit description
  • Please ensure that your commits are signed
  • Please add unit tests for the func (p ResourcePattern) Matches(s string) bool method.

@raglin raglin changed the title fix: anchor MIG resource pattern matching to prevent substring matche… fix: anchor MIG resource pattern matching Jun 22, 2026
@raglin
raglin force-pushed the fix/mig-pattern-anchoring branch 3 times, most recently from cd6c91b to 2942197 Compare June 22, 2026 13:18
@raglin

raglin commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback @tariq1890
Updated as requested.

@list-mist

Copy link
Copy Markdown

Hi @tariq1890 / @cdesiniotis
Just following up on this PR. Could you please let us know when we can expect this to be reviewed and merged?

@tariq1890

Copy link
Copy Markdown
Contributor

/ok to test 80d5937

@tariq1890
tariq1890 enabled auto-merge (squash) August 19, 2026 13:50
@tariq1890
tariq1890 disabled auto-merge August 19, 2026 14:18
The wildCardToRegexp function did not anchor patterns with ^ and $, causing patterns like '1g.24gb' to match '1g.24gb-me' via substring. This prevented the mixed MIG strategy from distinguishing profiles with suffixes (-me, +me.all, +gfx) as separate Kubernetes resources.

Signed-off-by: Raglin Anthony <raglinanthony@gmail.com>
@tariq1890
tariq1890 force-pushed the fix/mig-pattern-anchoring branch from 80d5937 to e515bd1 Compare August 19, 2026 14:26
@tariq1890

Copy link
Copy Markdown
Contributor

/ok to test e515bd1

@tariq1890
tariq1890 enabled auto-merge (squash) August 19, 2026 14:27
@tariq1890
tariq1890 merged commit 0dfdfb9 into NVIDIA:main Aug 19, 2026
13 checks passed
@tariq1890

Copy link
Copy Markdown
Contributor

Thank you very much for your contribution @raglin !

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.

How can we distinguish between regular slices and ME slices during pod scheduling?

4 participants