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

Refactor: Move Properties to pkg as Public API #5402

Conversation

gajananan
Copy link
Contributor

@gajananan gajananan commented Feb 4, 2025

Summary

Properties are leveraged by many pieces of Minder, including providers, and should be considered a public API instead of being in our internal package. The idea is to move properties to pkg.
However, the underlying service package will remain internal, as it is a minder-server implementation detail.

This commit fixes the affected functions to refer to the public API to access properties

Ref: #4699

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.

Properties are leveraged by many pieces of Minder, including providers, and should be considered a public API instead of being in our internal package.
The idea is to move properties to `pkg`.
However, the underlying service package will remain internal, as it is a minder-server implementation detail.

This commit fixes the affected functions to refer to the public API to access properties

Signed-off-by: Kugamoorthy Gajananan <[email protected]>
@gajananan gajananan requested a review from a team as a code owner February 4, 2025 08:23
@gajananan
Copy link
Contributor Author

@JAORMX , I locally tested via make test which passed. Please let me know if any other tests I should consider. Thank you.

@JAORMX
Copy link
Contributor

JAORMX commented Feb 4, 2025

@gajananan you might need to run make gen or go mod tidy

Properties are leveraged by many pieces of Minder, including providers, and should be considered a public API instead of being in our internal package.
The idea is to move properties to `pkg`.
However, the underlying service package will remain internal, as it is a minder-server implementation detail.

This commit includes uncommitted changes found in the previous commit.  The was done aftering run 'make gen'.

Signed-off-by: Kugamoorthy Gajananan <[email protected]>
@gajananan
Copy link
Contributor Author

@gajananan you might need to run make gen or go mod tidy

Sure, I did that and pushed the code.

@coveralls
Copy link

coveralls commented Feb 4, 2025

Coverage Status

coverage: 57.478%. remained the same
when pulling 0ab6255 on gajananan:move_internal_entities_properties_to_pkg
into fdc94f0 on mindersec:main.

Properties are leveraged by many pieces of Minder, including providers, and should be considered a public API instead of being in our internal package.
The idea is to move properties to `pkg`.
However, the underlying service package will remain internal, as it is a minder-server implementation detail.

This commit includes changes after running
1.  `make bootstrap` again to resolve conflicts in the following files
- internal/proto/internal.pb.go
- pkg/api/protobuf/go/minder/v1/minder.pb.go

2. `make gen`
Signed-off-by: Kugamoorthy Gajananan <[email protected]>
Copy link
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

Makes sense to me -- properties should be part of the API that's available for downstream consumers.

@evankanderson evankanderson merged commit 15f65ba into mindersec:main Feb 4, 2025
26 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