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

Extend the db-to-pb profile code to include selectors #3854

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Jul 11, 2024

Summary

Extends the MergeDatabaseGetIntoProfiles and MergeDatabaseListIntoProfiles
functions to include selectors. These will be useful later when we extend the
profile handlers.

  • Extend the ProfileRow interface for selectors
  • Add selectors to profile in MergeDatabaseListIntoProfiles
  • MergeDatabaseGetIntoProfiles includes selectors

Related: #3723

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

as part of a larger branch. We'll be able to add tests when we extend the Profile service
and extend the handlers.

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.

The ProfileRow interface is used to abstract DB rows list with or
without labels that are subsequently passed to
`MergeDatabaseListIntoProfiles`. Let's extend the interface with a
method to get selectors so we can use them in
`MergeDatabaseListIntoProfiles`.

Fixes: mindersec#3723
`MergeDatabaseListIntoProfiles` creates a protobuf representation of a
profile from a database list. Extend the function with the profile
selectors from the database list.

Related: mindersec#3723
This will be used in selector handlers.

Related: mindersec#3723
@jhrozek jhrozek requested a review from a team as a code owner July 11, 2024 07:46
@coveralls
Copy link

Coverage Status

coverage: 53.095% (-0.001%) from 53.096%
when pulling b43d38b on jhrozek:selectors_handlers
into 9a2ccaa on stacklok:main.

@jhrozek jhrozek merged commit ab3d603 into mindersec:main Jul 11, 2024
22 checks passed
dmjb pushed a commit that referenced this pull request Jul 12, 2024
* Extend the ProfileRow interface for selectors

The ProfileRow interface is used to abstract DB rows list with or
without labels that are subsequently passed to
`MergeDatabaseListIntoProfiles`. Let's extend the interface with a
method to get selectors so we can use them in
`MergeDatabaseListIntoProfiles`.

Fixes: #3723

* Add selectors to profile in `MergeDatabaseListIntoProfiles`

`MergeDatabaseListIntoProfiles` creates a protobuf representation of a
profile from a database list. Extend the function with the profile
selectors from the database list.

Related: #3723

* `MergeDatabaseGetIntoProfiles` includes selectors

This will be used in selector handlers.

Related: #3723
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.

3 participants