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

properties service: Don't fail if multiple entries are found #4642

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Oct 4, 2024

Summary

the matchEntityWithHint attempts to look for an entity using
identifying properties. For PRs, the upstream ID is not sufficient since
it's an integer that will clash with other PRs. In this case, we should
instead continue the search and search by name which is more unique.

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.

@JAORMX JAORMX force-pushed the properties-dont-fail-multiple branch from ec6e915 to 571bbcc Compare October 4, 2024 07:49
@jhrozek
Copy link
Contributor

jhrozek commented Oct 4, 2024

I think the intent is good and returning that multiple entries matched to the caller is not needed. I wrote a test and adjusted the existing tests, is it OK to just force-push to your branch @JAORMX ?

JAORMX and others added 2 commits October 4, 2024 11:08
the `matchEntityWithHint` attempts to look for an entity using
identifying properties. For PRs, the upstream ID is not sufficient since
it's an integer that will clash with other PRs. In this case, we should
instead continue the search and search by name which is more unique.

Signed-off-by: Juan Antonio Osorio <[email protected]>
@jhrozek jhrozek force-pushed the properties-dont-fail-multiple branch from 571bbcc to 2cd3c64 Compare October 4, 2024 09:08
@coveralls
Copy link

Coverage Status

coverage: 53.304% (+0.009%) from 53.295%
when pulling 2cd3c64 on properties-dont-fail-multiple
into 7a6cdc0 on main.

@JAORMX JAORMX merged commit 9361c73 into main Oct 4, 2024
19 of 20 checks passed
@JAORMX JAORMX deleted the properties-dont-fail-multiple branch October 4, 2024 10:56
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