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

[Feature] Standardize uv Package Fetcher, Extend Latest Version Finder, and Enable Cooldown Filtering via Feature Flag #11804

Merged
merged 6 commits into from
Mar 13, 2025

Conversation

kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Mar 12, 2025

What are you trying to accomplish?

This PR enhances the uv ecosystem by:

  • Standardizing the package fetcher to support the generic package_release_details format, ensuring compatibility with cooldown filtering.
  • Extending the latest version finder to inherit from the generic latest version finder, aligning the update strategy with other ecosystems.
  • Introducing a feature flag (enable_cooldown_for_uv) to:
    • Enable fetching from the JSON API for structured package metadata.
    • Enable cooldown filtering, allowing Dependabot to delay dependency updates based on cooldown settings.

Completed Tasks:

[Task] Standardize uv Package Fetcher to Support Generic Package Release Details
[Task] Extend uv Ecosystem Latest Version Finder to Use Generic Latest Version Finder
[Task] Use enable_cooldown_for_uv to enable fetching from JSON API
[Task] Use enable_cooldown_for_uv to Enable Cooldown Filtering

These changes improve dependency resolution for uv, ensure consistent package data retrieval, and allow for cooldown-based filtering using structured release details.

What issues does this affect or fix?

  • The uv package fetcher now returns structured package release details, including release dates, which are required for cooldown filtering.
  • The latest version finder extends the generic latest version finder, ensuring standardized version selection.
  • Feature flag enable_cooldown_for_uv allows incremental activation of:
    • Fetching structured metadata from the JSON API.
    • Applying cooldown-based filtering to delay updates for recently released versions.

Anything you want to highlight for special attention from reviewers?

  • The package fetcher has been updated to fetch structured release details, including release dates.
  • The latest version finder now extends the generic latest version finder, applying cooldown-based filtering.
  • Feature flag enable_cooldown_for_uv has been added to:
    • Conditionally enable fetching from the JSON API.
    • Enable cooldown filtering when activated.
  • Please ensure that the feature flag toggle works correctly and does not impact existing functionality when disabled.

How will you know you've accomplished your goal?

  • The uv package fetcher correctly retrieves structured package release details, including release dates.
  • The uv latest version finder inherits from the generic latest version finder and applies cooldown filtering.
  • Feature flag enable_cooldown_for_uv correctly controls:
    • Whether JSON API fetching is enabled.
    • Whether cooldown filtering is applied in version selection.
  • Tests confirm that dependency updates behave as expected.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

implement generic latest version finder
pass cooldown parameter
extend T::Sig

require_relative "index_finder"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review: Uses generic Dependabot::Package::PackageLatestVersionFinder similar to as how python is using.

end
end
end
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review: Fetcher is duplication from python ecosystem. Except package manager being uveverything is same aspip` ecosystem. We do use same api to get releases for dependencies.

@raise_on_ignored = raise_on_ignored
@security_advisories = security_advisories
end

def latest_resolvable_version
latest_version_finder.latest_version(python_version: language_version_manager.python_version)
latest_version_finder.latest_version(language_version: language_version_manager.python_version)
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review Tip: In generic method instead of python we accept language_version since that is used across ecosystem.

dependency: dependency,
dependency_files: dependency_files,
credentials: credentials
).fetch
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review Tip: We are fetching files in standard format and returning that to generic latest version finder so it can use the standard format filter out version properly.

@kbukum1 kbukum1 marked this pull request as ready for review March 12, 2025 21:58
@kbukum1 kbukum1 requested a review from a team as a code owner March 12, 2025 21:58
Copy link
Contributor

@markhallen markhallen left a comment

Choose a reason for hiding this comment

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

Looks good @kbukum1

@kbukum1 kbukum1 merged commit 88b9902 into main Mar 13, 2025
83 checks passed
@kbukum1 kbukum1 deleted the kamil/add_cooldown_filters_for_uv branch March 13, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants