cockroachdb / cockroachdb/cockroach
deccl: move package out of ccl
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
## Background
The `pkg/ccl` tree existed to ensure a clean separation between
Cockroach Commuity License (CCL) code and Apache 2.0 code. Now, all
CockroachDB code is available under the Cockroach Software License and
we do not currently gate individual features on the presence of an
enterprise license. Making this code separation unnecessary.
## Goals
- Move as many pkg/ccl packages out of the ccl tree as possible.
- Remove now-unnecessary hook-based dependency injection.
- Remove functions that are no-ops in all user-accessible builds.
## Assumptions
- "Non-CCL" builds can no longer be produced.
- Any tests or code attempting to account for not having linked CCL code are exercising
test-only code paths and can be removed.
- The _current set_ of enterprise license checks are unnecessary. Any future enterprise
license checks would require a new mechanism and is still not dependent on CCL-vs-non-CCL.
## Risks
The main risk in these package movements is modifying the import tree in a way that results
in a required init function not being run and thus resulting in a feature being unavailable at runtime.
One would hope all such features have test coverage that would catch such an oversight.
## In Progress
- [ ] multitenantccl: 171031
- [ ] testutilsccl: #171091
## Todo
- [ ] pkg/ccl/multiregionccl/
- [ ] pkg/ccl/schemachangerccl/
- [ ] pkg/ccl/serverccl/
- [ ] pkg/ccl/testccl/
- [ ] pkg/ccl/changefeedccl/
- [ ] pkg/ccl
- [ ] Remove TestingEnableEnterprise.
## Completed
- [x] auditloggingccl: #164112
- [x] buildccl: #163939
- [x] importerccl: #163951
- [x] kvccl: #163808
- [x] storageccl: #164118
- [x] pgcryptoccl: #164119
- [x] cmdccl: #164122
- [x] cliccl: #164334
- [x] securityccl: #164459
- [x] benchccl: #164572
- [x] cloudccl: #164591
- [x] partitionccl: #164621
- [x] utilccl: #164815
- [x] jwtauthccl: #165269
- [x] ldapccl: #165269
- [x] oidcccl: #165269
- [x] telemetryccl: #164576
- [x] logictestccl: #168815
- [x] sqlitelogictestccl: #168815
- [x] gssapiccl: #169315
- [x] workloadccl: #169746
- [x] sqlproxyccl: #170263
- [x] spanconfigccl: #170249
## Related
- #164343
- #164253
- #164120
Jira issue: CRDB-60751
Contributor guide
Research direction
The remaining work is listed under pkg/ccl/multiregionccl, pkg/ccl/schemachangerccl, pkg/ccl/serverccl, pkg/ccl/testccl, pkg/ccl/changefeedccl, and pkg/ccl. Start by selecting one unchecked package and reading its related issue, then trace its imports, hooks, and tests. Done means the package is moved where appropriate, obsolete dependency injection and no-op paths are removed, and tests cover runtime initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, databases, distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100