Skip to content

feat: support exclude_file_patterns option#25

Merged
imeoer merged 3 commits intomodelpack:mainfrom
imeoer:model-fetch
Mar 11, 2026
Merged

feat: support exclude_file_patterns option#25
imeoer merged 3 commits intomodelpack:mainfrom
imeoer:model-fetch

Conversation

@imeoer
Copy link
Collaborator

@imeoer imeoer commented Jan 23, 2026

This pull request introduces significant improvements to the code coverage workflow, updates dependencies for better compatibility and security, and adds new unit tests for the client package. The coverage workflow is now split to support posting coverage comments on PRs from forks, and includes stricter threshold enforcement for overall and changed-line coverage. Dependency versions in go.mod have been updated to their latest releases. Additionally, new tests have been added to the client package to improve reliability.

CI/CD and Coverage Workflow Enhancements:

  • Added .github/workflows/coverage-comment.yml to post coverage reports as PR comments after the coverage workflow completes, allowing coverage comments on PRs from forks by running in the base branch context.
  • Refactored .github/workflows/coverage.yml to enforce total and diff coverage thresholds, generate detailed markdown reports, upload artifacts for comment workflow, and use a CI-friendly coverage command. [1] [2] [3] [4]

Dependency Updates:

  • Updated multiple dependencies in go.mod to their latest versions, including modelpack/modctl, prometheus/client_golang, go-git/go-git/v5, grpc-gateway, go.opentelemetry.io/otel, and others for improved stability and compatibility. [1] [2] [3] [4]

Testing Improvements:

  • Added new unit tests in pkg/client/client_test.go to cover client creation, error handling, and payload dumping, increasing test reliability and coverage.
  • Introduced a new test-coverage-ci target in Makefile for CI-friendly coverage runs, excluding pkg/server and using -coverpkg for accurate cross-package coverage. [1] [2]

@gemini-code-assist
Copy link

Summary of Changes

Hello @imeoer, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing the model fetching mechanism and improving progress reporting within the system. It includes a significant update of Go module dependencies to leverage newer features and maintain security. Key functional changes involve modifying model artifact handling to provide total layer counts, which is then utilized by an improved progress reporting system. Additionally, it introduces support for a Dragonfly endpoint, enabling more efficient and distributed model fetching.

Highlights

  • Dependency Updates: Updated Go module dependencies, including modctl, prometheus/client_golang, go.opentelemetry.io/otel, and google.golang.org/grpc, for improved security, compatibility, and features.
  • Model Artifact Handling: Enhanced ModelArtifact.getLayers to return both filtered layers and the total count of artifact layers, providing complete file count information. ModelArtifact.GetPatterns was also modified to return this total layer count.
  • Progress Reporting Improvements: Improved the Hook struct and associated logic to accurately track and report the total number of files/layers during operations, utilizing a new total field and SetTotal method.
  • Dragonfly Endpoint Support: Integrated DragonflyEndpoint support into the model fetch configuration within the puller, enabling distributed model fetching capabilities.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for a Dragonfly endpoint for model fetching and significantly refactors the model artifact handling and progress reporting logic. The dependency updates in go.mod and go.sum bring in newer versions of many packages, which is good for security and compatibility. The changes to pkg/service/model.go, pkg/service/puller.go, and pkg/status/hook.go aim to provide more accurate progress tracking. My review focuses on ensuring the new progress reporting logic is robust. I've identified a few areas for improvement to correctly handle progress totals for filtered downloads and to account for potential duplicate layers in model artifacts, which could affect the accuracy of the progress display.

@imeoer imeoer changed the title feat: support dragonfly endpoint for model fetch feat: support exclude_file_patterns option Mar 4, 2026
@imeoer imeoer marked this pull request as ready for review March 4, 2026 10:04
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

imeoer added 2 commits March 5, 2026 09:15
Signed-off-by: imeoer <yansong.ys@antgroup.com>
Reference: modelpack#17

Signed-off-by: imeoer <yansong.ys@antgroup.com>
@imeoer imeoer force-pushed the model-fetch branch 2 times, most recently from 50de3e6 to 897e414 Compare March 5, 2026 09:24
And add coverage threshold check

Signed-off-by: imeoer <yansong.ys@antgroup.com>
Copy link
Member

@bergwolf bergwolf left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@imeoer imeoer merged commit 9712173 into modelpack:main Mar 11, 2026
9 of 10 checks passed
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.

4 participants