Skip to content

Conversation

@fredcarle
Copy link
Collaborator

@fredcarle fredcarle commented Apr 24, 2025

Relevant issue(s)

Resolves #3642

Description

This PR fixes a bug where the http handler for GetIndexes would call GetAllIndexes instead of collection specific indexes.

Note that the first commit documents the bug.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

make test

Specify the platform(s) on which this was tested:

  • MacOS

@fredcarle fredcarle added bug Something isn't working area/api Related to the external API component labels Apr 24, 2025
@fredcarle fredcarle added this to the DefraDB v0.18 milestone Apr 24, 2025
@fredcarle fredcarle requested a review from a team April 24, 2025 17:29
@fredcarle fredcarle self-assigned this Apr 24, 2025
@codecov
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.28%. Comparing base (5b7d990) to head (ebbec09).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
http/handler_collection.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3643      +/-   ##
===========================================
- Coverage    78.41%   78.28%   -0.13%     
===========================================
  Files          408      408              
  Lines        37112    37113       +1     
===========================================
- Hits         29101    29052      -49     
- Misses        6268     6316      +48     
- Partials      1743     1745       +2     
Flag Coverage Δ
all-tests 78.28% <50.00%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
http/handler_collection.go 71.84% <50.00%> (-0.89%) ⬇️

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b7d990...ebbec09. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Fred

@fredcarle fredcarle merged commit 8d82899 into sourcenetwork:develop Apr 24, 2025
44 of 45 checks passed
@fredcarle fredcarle deleted the fredcarle/fix/3642-get-indexes-for-collection branch April 24, 2025 19:36
ChrisBQu pushed a commit to ChrisBQu/defradb that referenced this pull request Jun 16, 2025
## Relevant issue(s)

Resolves sourcenetwork#3642 

## Description

This PR fixes a bug where the http handler for `GetIndexes` would call
`GetAllIndexes` instead of collection specific indexes.

Note that the first commit documents the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Related to the external API component bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All indexes are returned when asking for those of a specific collection.

2 participants