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

Pass context with ingestion to data sources #5093

Merged
merged 3 commits into from
Nov 29, 2024

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Nov 29, 2024

Summary

This PR builds on #5091 and modifies the data source Call() signature to receive a context in the function call.

We also modify the data sources init to pass the ingestion results which are now available to all data sources drivers.

Provide a brief overview of the changes and the issue being addressed.
Explain the rationale and any background necessary for understanding the changes.
List dependencies required by this change, if any.

This PR breaks the work in the last three commits (ignore the rest, they will be gone after rebasing):

  1. fc096ea modifies the data source Call() function to take a context
  2. 2663d00 regenerates the mocks and updates the tests
  3. f138147 initializes the data sources context and passes the ingestion results in it to the data source Call method

Fixes #5089

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.

@puerco puerco requested a review from a team as a code owner November 29, 2024 03:45
@coveralls
Copy link

coveralls commented Nov 29, 2024

Coverage Status

coverage: 55.153% (+0.01%) from 55.142%
when pulling 9e2d63c on puerco:datasource-context
into 93c054a on mindersec:main.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
This commit passes the ingest result through the context to
the datasource function call.

It introduces a new datasources context type to bundle the
ingest result and other data we may want to pass through in
the future.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@puerco puerco force-pushed the datasource-context branch from f138147 to 9e2d63c Compare November 29, 2024 14:54
@puerco puerco merged commit 9523a8e into mindersec:main Nov 29, 2024
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.

data sources: Expose the git filesystem to DS functions
3 participants