-
Notifications
You must be signed in to change notification settings - Fork 63
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
[Integration][Gitlab] Bug | Gitlab integration doesnt perform Glob queries properly #1309
base: main
Are you sure you want to change the base?
[Integration][Gitlab] Bug | Gitlab integration doesnt perform Glob queries properly #1309
Conversation
…tching Removes custom pattern matching in search_files_in_project in favor of GitLab's native path: search capability. This change: - Removes redundant pattern filtering using does_pattern_apply - Uses GitLab's search API path parameter directly - Updates tests to reflect GitLab's actual search behavior
…1280-Bug-Gitlab-integration-doesnt-perform-Glob-queries-properly
- Replace custom pattern matching implementation with glob2.fnmatch
Refactored GitLab file search to: - Add braceexpand pattern conversion - Update search function to use converted patterns - Consolidate search tests into parameterized test - Remove redundant test cases
…1280-Bug-Gitlab-integration-doesnt-perform-Glob-queries-properly
…1280-Bug-Gitlab-integration-doesnt-perform-Glob-queries-properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments
async for files in AsyncFetcher.fetch_batch( | ||
project.search, | ||
scope="blobs", | ||
search=f"filename:{file_pattern}", | ||
search=f"path:{pattern}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filename is being deprecated in the gitlab search api, see
https://docs.gitlab.com/ee/api/search.html#scope-blobs-2
integrations/gitlab/tests/gitlab_integration/test_gitlab_service.py
Outdated
Show resolved
Hide resolved
- Moved pattern processing to a new method for cleaner code. - Improved logging to show more useful information. - Updated tests to simplify and organize file search scenarios.
…1280-Bug-Gitlab-integration-doesnt-perform-Glob-queries-properly
Co-authored-by: Matan <51418643+matan84@users.noreply.github.com>
…ueries-properly' of https://github.com/port-labs/ocean into PORT-11280-Bug-Gitlab-integration-doesnt-perform-Glob-queries-properly
Description
What
Why
How
_match
function to handle"**"
more effectively, allowing for emptystring_parts
.Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
Include screenshots from your environment showing how the resources of the integration will look.
API Documentation
Provide links to the API documentation used for this integration.