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

datasource :Fix panic in transaction subsystem #5114

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Dec 2, 2024

Summary

This commit fixes a panic in the data source transaction subsystem when options are nil.

Fixes: #5113

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

This pr modifies the beginTx() in the transaction logic of the data sources to initialize an options set if none is passed. We also make sure that the read-only methods (list/get) retrieve initialize their transactions as read only.

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.

This commit fixes a panic in the data source transaction subsystem
when options are nil.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@puerco puerco requested a review from a team as a code owner December 2, 2024 23:43
@coveralls
Copy link

Coverage Status

coverage: 55.222% (-0.009%) from 55.231%
when pulling 41792ca on puerco:fix-datasources-panic
into 5dfc7d0 on mindersec:main.

@JAORMX JAORMX merged commit b9b7284 into mindersec:main Dec 3, 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.

Panic when invoking datasources list/get
3 participants