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

Remove versioner in favor of adding the function to the providers #3345

Merged
merged 1 commit into from
May 20, 2024

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented May 16, 2024

Summary

This removes the versioner from the artifact ingester. Instead of
having this logic be part of the ingester, this simplifies things by
moving the details to the relevant providers.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@JAORMX JAORMX requested a review from a team as a code owner May 16, 2024 11:02
Copy link
Contributor

@stacklokbot stacklokbot left a comment

Choose a reason for hiding this comment

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

✅ No Invisible Unicode Characters Detected.

@JAORMX JAORMX marked this pull request as draft May 16, 2024 11:02
Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

just comments since the lint needs to be fixed anyway. Looking good though!


GetCredential() GitHubCredential
GetRepository(context.Context, string, string) (*github.Repository, error)
GetBranchProtection(context.Context, string, string, string) (*github.Protection, error)
UpdateBranchProtection(context.Context, string, string, string, *github.ProtectionRequest) error
ListPackagesByRepository(context.Context, string, string, int64, int, int) ([]*github.Package, error)
GetPackageByName(context.Context, string, string, string) (*github.Package, error)
GetPackageVersions(context.Context, string, string, string) ([]*github.PackageVersion, error)
GetPackageVersionByTag(context.Context, string, string, string, string) (*github.PackageVersion, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

love this

internal/engine/ingester/artifact/artifact.go Show resolved Hide resolved
Copy link
Contributor

@stacklokbot stacklokbot left a comment

Choose a reason for hiding this comment

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

✅ No Invisible Unicode Characters Detected.

Copy link
Contributor

@stacklokbot stacklokbot left a comment

Choose a reason for hiding this comment

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

✅ No Mixed Scripts Detected.

Copy link
Contributor

@stacklokbot stacklokbot left a comment

Choose a reason for hiding this comment

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

✅ No Invisible Unicode Characters Detected.

Copy link
Contributor

@stacklokbot stacklokbot left a comment

Choose a reason for hiding this comment

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

✅ No Mixed Scripts Detected.

Copy link
Contributor

@stacklokbot stacklokbot left a comment

Choose a reason for hiding this comment

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

✅ No Invisible Unicode Characters Detected.

Copy link
Contributor

@stacklokbot stacklokbot left a comment

Choose a reason for hiding this comment

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

✅ No Mixed Scripts Detected.

This removes the `versioner` from the artifact ingester. Instead of
having this logic be part of the ingester, this simplifies things by
moving the details to the relevant providers.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX marked this pull request as ready for review May 20, 2024 10:09
@JAORMX JAORMX requested a review from dmjb May 20, 2024 10:09
@coveralls
Copy link

Coverage Status

coverage: 50.059% (-0.3%) from 50.336%
when pulling cf7811d on no-versioner
into 1ccdb36 on main.

Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

LGTM and manual tests with ghcr and the github attestation work went fine. Just be mindful of prod freeze and the upcoming prod deployment when merging.

Copy link
Contributor

@dmjb dmjb left a comment

Choose a reason for hiding this comment

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

I love how this change ended up, great work!

@JAORMX JAORMX merged commit 12c5e04 into main May 20, 2024
20 checks passed
@JAORMX JAORMX deleted the no-versioner branch May 20, 2024 12:55
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.

5 participants