Skip to content

Update jobs_current_version_uuid_index and jobs_symlink_target_uuid_index to ignore NULL values#2186

Merged
collado-mike merged 1 commit into
mainfrom
fix/update_indices_for_nulls
Oct 13, 2022
Merged

Update jobs_current_version_uuid_index and jobs_symlink_target_uuid_index to ignore NULL values#2186
collado-mike merged 1 commit into
mainfrom
fix/update_indices_for_nulls

Conversation

@collado-mike

Copy link
Copy Markdown
Collaborator

Problem

Most jobs don't have a symlink target and jobs don't have a current version until they've had at least one successful run. The indices recently added will always write to the index, even when the indexed values are null.

Solution

Avoid writing to the indices when indexed values are null

Checklist

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've updated the CHANGELOG.md with details about your change under the "Unreleased" section (if relevant, depending on the change, this may not be necessary)
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

@collado-mike collado-mike requested a review from phixMe October 13, 2022 18:17
@boring-cyborg boring-cyborg Bot added the api API layer changes label Oct 13, 2022
…ndex to ignore NULL values

Signed-off-by: Michael Collado <collado.mike@gmail.com>
@collado-mike collado-mike force-pushed the fix/update_indices_for_nulls branch from ad1fafd to c581ebc Compare October 13, 2022 18:18

@phixMe phixMe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@codecov

codecov Bot commented Oct 13, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2186 (c581ebc) into main (a458374) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #2186   +/-   ##
=========================================
  Coverage     76.60%   76.60%           
  Complexity     1136     1136           
=========================================
  Files           219      219           
  Lines          5287     5287           
  Branches        420      420           
=========================================
  Hits           4050     4050           
  Misses          765      765           
  Partials        472      472           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@collado-mike collado-mike merged commit cf48c5d into main Oct 13, 2022
@collado-mike collado-mike deleted the fix/update_indices_for_nulls branch October 13, 2022 18:37
jonathanpmoraes referenced this pull request in nubank/NuMarquez Feb 6, 2025
…ndex to ignore NULL values (#2186)

Signed-off-by: Michael Collado <collado.mike@gmail.com>

Signed-off-by: Michael Collado <collado.mike@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants