ocean
ocean copied to clipboard
[Integration][Bitbucket server] Improve resync performance for large deployments
User description
Description
What
- Added configurable performance optimizations (page size, concurrent requests, rate limiting, project filtering) to the Bitbucket Server integration.
Why
- Bitbucket Server Integration takes a long time before completing resync
How
- Implemented semaphore-controlled parallel PR fetching, configurable pagination, flexible rate limits, and regex/suffix project filtering.
Type of change
- [x] New feature (non-breaking change which adds functionality)
All tests should be run against the port production environment(using a testing org).
Core testing checklist
- [ ] Integration able to create all default resources from scratch
- [ ] Resync finishes successfully
- [ ] Resync able to create entities
- [ ] Resync able to update entities
- [ ] Resync able to detect and delete entities
- [ ] Scheduled resync able to abort existing resync and start a new one
- [ ] Tested with at least 2 integrations from scratch
- [ ] Tested with Kafka and Polling event listeners
- [ ] Tested deletion of entities that don't pass the selector
Integration testing checklist
- [ ] Integration able to create all default resources from scratch
- [ ] Completed a full resync from a freshly installed integration and it completed successfully
- [ ] Resync able to create entities
- [ ] Resync able to update entities
- [ ] Resync able to detect and delete entities
- [ ] Resync finishes successfully
- [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the
examplesfolder in the integration directory. - [ ] If resource kind is updated, run the integration with the example data and check if the expected result is achieved
- [ ] If new resource kind is added or updated, validate that live-events for that resource are working as expected
- [ ] Docs PR link here
Preflight checklist
- [ ] Handled rate limiting
- [ ] Handled pagination
- [ ] Implemented the code in async
- [ ] Support Multi account
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.
PR Type
Enhancement
Description
-
Add 6 configurable performance optimization parameters to Bitbucket Server integration
-
Implement parallel PR fetching with semaphore-controlled concurrency
-
Add project filtering by regex patterns and suffix matching
-
Make pagination page size and rate limiting configurable
Diagram Walkthrough
flowchart LR
Config["Configuration Parameters"]
Config -->|rate_limit, rate_limit_window| RateLimiter["AsyncLimiter"]
Config -->|page_size| Pagination["Paginated Requests"]
Config -->|max_concurrent_requests| Semaphore["BoundedSemaphore"]
Config -->|projects_filter_regex, suffix| ProjectFilter["Project Filtering"]
Semaphore -->|controls| PRFetching["Parallel PR Fetching"]
ProjectFilter -->|filters| Projects["Project Batches"]
Pagination -->|fetches| Resources["API Resources"]
RateLimiter -->|throttles| Resources
File Walkthrough
| Relevant files | |||||||
|---|---|---|---|---|---|---|---|
| Enhancement |
| ||||||
| Tests |
| ||||||
| Configuration changes |
| ||||||
| Documentation |
|