Skip to content

fix: anchor MIG resource pattern matching#1807

Open
raglin wants to merge 2 commits into
NVIDIA:mainfrom
raglin:fix/mig-pattern-anchoring
Open

fix: anchor MIG resource pattern matching#1807
raglin wants to merge 2 commits into
NVIDIA:mainfrom
raglin:fix/mig-pattern-anchoring

Conversation

@raglin

@raglin raglin commented May 26, 2026

Copy link
Copy Markdown

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 2 times, most recently from cc35b3b to 5ea63b4 Compare June 22, 2026 13:14
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>
@raglin raglin force-pushed the fix/mig-pattern-anchoring branch from cd6c91b to 2942197 Compare June 22, 2026 13:18
@raglin

raglin commented Jun 22, 2026

Copy link
Copy Markdown
Author

Thanks for the feedback @tariq1890
Updated as requested.

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?

3 participants