Skip to content

Conversation

@jfrancoa
Copy link
Contributor

@jfrancoa jfrancoa commented Sep 2, 2025

It is quite useful to know if an alias is present on the system or not. Also,
it is consistent with other classes which always contain an exists method.

Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@jfrancoa jfrancoa force-pushed the jose/add_alias_exists branch from f0f73b5 to 92feb90 Compare September 2, 2025 06:31
@jfrancoa jfrancoa requested a review from dirkkul September 2, 2025 06:32
try:
self.get(alias_name=alias_name)
return True
except Exception:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should not catch all exceptions, for example when the client cannot connect or is unauthenticated this can be a footgun (which Daniel found out a couple of weeks ago: #1799)

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2025

Codecov Report

❌ Patch coverage is 17.39130% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.80%. Comparing base (c7b8c75) to head (bdc6481).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
integration/test_alias.py 16.66% 15 Missing ⚠️
weaviate/aliases/executor.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1813      +/-   ##
==========================================
- Coverage   87.27%   86.80%   -0.48%     
==========================================
  Files         269      273       +4     
  Lines       18778    19059     +281     
==========================================
+ Hits        16389    16544     +155     
- Misses       2389     2515     +126     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jfrancoa jfrancoa force-pushed the jose/add_alias_exists branch 3 times, most recently from d4fd5f0 to b3dabec Compare September 4, 2025 07:21
It is quite useful to know if an alias
is present on the system or not. Also,
it is consistent with other classes which
always contain an exists method.
@jfrancoa jfrancoa force-pushed the jose/add_alias_exists branch from b3dabec to bdc6481 Compare September 4, 2025 13:55
@jfrancoa
Copy link
Contributor Author

jfrancoa commented Sep 4, 2025

I've tested the changes by using the branch on the sim envs as well as the e2e tests and it's working like a charm.

@jfrancoa jfrancoa merged commit f749700 into main Sep 4, 2025
119 checks passed
@jfrancoa jfrancoa deleted the jose/add_alias_exists branch September 4, 2025 14:10
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.

4 participants