Skip to content

Conversation

@gregns1
Copy link
Contributor

@gregns1 gregns1 commented Jul 9, 2025

CBG-4704

  • Merge from anemone into main

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Dependencies (if applicable)

  • Link upstream PRs
  • Update Go module dependencies when merged

Integration Tests

gregns1 and others added 30 commits January 29, 2025 18:13
…import (#7326)

* CBG-4487: dealock in revision cache between Get and On demand import

* remove commented out code

* suppress lint

* add import test skip

* err check stuff

* updated on comments + extra tests

* test refactor issue

* add dev mode assert

* updates to make goroutines exit upon test finish
…7328)

* CBG-4495 do not put documents into rev cache when they are being loaded

* have all on demand imports skip rev cache

* skip test which requires import

* remove redundant argument
…us reload (#7333)

* CBG-4310 switch database to offline if there is an error on synchronous reload
* CBG-4499: fix leaking goroutines

* updates to address review
* CBG-4453: retry indefinetly for created indexes

* change index wait to wait 10 minutes, max loop wait 30 seconds
* Remove dead code

* force import sorting
…necting replicator (#7355)

* Move StatsReporter goroutine lifecycle up into Replicator start instead of replicator connect

* Address PR feedback - pass context explicitly into StatusReporter
* CBG-4390: provide cluster UUID at top level endpoint

* update to fix for non persistent config

* fix for rosmar

* remove pre paramatised test

* nit

* move mgtrequest into common function

* updates

* remove unused code

* fix failing test

* update to create separate struct of info for runtime only info
…7358)

* CBG-4391: bubble up errors from startup db process to db summaries

* lint error and comments need removing + fix uint test mishap

* address review

* updates to have gloabl map

* remove iota

* Update rest/database_error.go

Co-authored-by: Ben Brooks <[email protected]>

---------

Co-authored-by: Ben Brooks <[email protected]>
…es out (#7361)

* Put the replicator into an error and stopped state when a reconnect loop times out

* Conditionally set reconnectLoop error state based on context error

* Rewrite error handling to have early returns

* Defer unlock inside retry func

* add comment for setState instead of setError

* Simplify reconnectLoop error handling for logging - rely on retry loop error message which is now wrapping context err
* CBG-4511: observability errors for online process

* spelling errors

* more spelling
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.25.0 to 0.26.0.
- [Commits](golang/oauth2@v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.32.0 to 0.33.0.
- [Commits](golang/crypto@v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Shorten the time it takes to run tests

- Create test buckets in the background instead of before the tests.
  This shortens time in the case of no running tests, all tests are
  skipped, or a test only requires a single bucket.
- Do not wait for buckets to be torn down for test exit, since they will
  be deleted in the next test run.
- Only create 3 collections when we need to, otherwise create two.
- Put bucket into readyBucketPool directly instead of
  addToBucketReadierQueue after creation. Dropping the immediate flush
  saves about 6 secs per bucket for the buckets to become ready.
- Running the bucket creation in parallel is faster when Flush buckets
  are used, but slower when GSI is used, so running parallel init is
  off by default.
* CBG-3838 make sure document gets fully imported before next step
Copilot AI review requested due to automatic review settings July 9, 2025 14:45
@github-actions
Copy link

github-actions bot commented Jul 9, 2025

Redocly previews

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR merges the “anemone” branch into main, bringing in new version-vector (HLV/CV) support, extensive test updates, and bulk API enhancements.

  • Replace legacy RevID usage with RevTreeID and integrate CurrentVersion (CV) in change feeds and BLIP tests.
  • Extend /bulk_docs and /_all_docs endpoints to include cv fields controlled by a show_cv query parameter.
  • Consolidate change-entry assertions via assertChangeEntryMatches and add a new TLS/no-certs test.

Reviewed Changes

Copilot reviewed 98 out of 131 changed files in this pull request and generated no comments.

File Description
rest/config_test.go Added TestTLSWithoutCerts to validate import feeds over TLS without certs.
rest/changestest/changes_api_test.go Swapped RevID references to RevTreeID and introduced assertChangeEntryMatches.
rest/bulk_api.go Added CV field and show_cv support to bulk handlers.
rest/blip_legacy_revid_test.go New long-running BLIP tests for legacy rev-tree behavior.
Comments suppressed due to low confidence (4)

rest/bulk_api.go:76

  • [nitpick] The flag names includeCVs and showCV are inconsistent for the same concept. Consider unifying them (e.g., includeCV or showCV) for clarity.
	includeCVs := h.getBoolQuery("show_cv")

rest/blip_legacy_revid_test.go:11

  • [nitpick] This file is over 1000 lines long, which can be difficult to navigate. Consider splitting it into smaller, feature-focused test files to improve readability and maintainability.
package rest

rest/config_test.go:3140

  • This test uses time.Second and time.Millisecond but the time package may not be imported. Ensure import "time" is present to avoid build errors.
func TestTLSWithoutCerts(t *testing.T) {

rest/blip_api_attachment_test.go:48

  • [nitpick] Older tests use SkipVersionVectorInitialization whereas this uses SkipSubtest. Consider standardizing on one skip mechanism to reduce confusion.
	btcRunner.SkipSubtest[VersionVectorSubtestName] = true // Doesn't require HLV - attachment v2 protocol test

@torcolvin torcolvin self-assigned this Jul 9, 2025
@torcolvin torcolvin changed the base branch from main to release/anemone July 9, 2025 17:40
@torcolvin
Copy link
Collaborator

This PR was never intended to be merged, it was for analysis. The state of main before the branch is now in https://github.com/couchbase/sync_gateway/tree/main-backup-2025-07-10 and main was pushed with the merge in place.

@torcolvin torcolvin closed this Jul 10, 2025
@torcolvin torcolvin deleted the anemone-merge branch July 10, 2025 15:00
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.

5 participants