diff --git a/.github/scripts/get_runner_classes.sh b/.github/scripts/get_runner_classes.sh index b722ba768786..f8b532447ac2 100755 --- a/.github/scripts/get_runner_classes.sh +++ b/.github/scripts/get_runner_classes.sh @@ -10,7 +10,7 @@ case "$GITHUB_REPOSITORY" in echo "compute-small=['self-hosted', 'linux', 'small']" >> "$GITHUB_OUTPUT" echo "compute-medium=['self-hosted', 'linux', 'medium']" >> "$GITHUB_OUTPUT" echo "compute-large=['self-hosted', 'linux', 'large']" >> "$GITHUB_OUTPUT" - # m5d.8xlarge is equivalent to our xl custom runner in OSS + # m5d.8xlarge is equivalent to our xl custom runner in CE echo "compute-xl=['self-hosted', 'ondemand', 'linux', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT" ;; *) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a86daf54cc07..e6b22c004e6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ on: env: PKG_NAME: consul + # TODO(spatel): CE refactor METADATA: oss jobs: diff --git a/.github/workflows/oss-merge-trigger.yml b/.github/workflows/ce-merge-trigger.yml similarity index 83% rename from .github/workflows/oss-merge-trigger.yml rename to .github/workflows/ce-merge-trigger.yml index 4d08442d90fb..3a62146631aa 100644 --- a/.github/workflows/oss-merge-trigger.yml +++ b/.github/workflows/ce-merge-trigger.yml @@ -1,4 +1,4 @@ -name: Trigger OSS to Enterprise Merge +name: Trigger Community Edition to Enterprise Merge on: pull_request_target: types: @@ -8,8 +8,8 @@ on: - 'release/*.*.x' jobs: - trigger-oss-merge: - # run this only on merge events in OSS repo + trigger-ce-merge: + # run this only on merge events in CE repo if: ${{ github.event.pull_request.merged && github.repository == 'hashicorp/consul' }} runs-on: ubuntu-latest steps: @@ -19,6 +19,7 @@ jobs: GIT_SHA: ${{ github.sha }} GH_PAT: ${{ secrets.ELEVATED_GITHUB_TOKEN }} GIT_ACTOR: ${{ github.actor }} + # TODO(spatel): CE refactor run: | curl -H "Authorization: token $GH_PAT" \ -H 'Accept: application/json' \ diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 5eab231c65a5..d8b260360462 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -79,7 +79,7 @@ jobs: matrix: partition: [1, 2, 3, 4] env: - EMBER_TEST_REPORT: test-results/report-oss.xml # outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml # outputs test report for CI test summary EMBER_TEST_PARALLEL: true # enables test parallelization with ember-exam CONSUL_NSPACES_ENABLED: ${{ endsWith(github.repository, '-enterprise') && 1 || 0 }} # NOTE: this should be 1 in ENT. JOBS: 2 # limit parallelism for broccoli-babel-transpiler diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 232d6a181447..a958fdb05a2b 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -169,7 +169,7 @@ jobs: elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} # dev-build-arm64: - # # only run on enterprise because GHA does not have arm64 runners in OSS + # # only run on enterprise because GHA does not have arm64 runners in CE # if: ${{ endsWith(github.repository, '-enterprise') }} # needs: # - setup @@ -183,7 +183,7 @@ jobs: # elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} # go-test-arm64: - # # only run on enterprise because GHA does not have arm64 runners in OSS + # # only run on enterprise because GHA does not have arm64 runners in CE # if: ${{ endsWith(github.repository, '-enterprise') }} # needs: # - setup @@ -201,9 +201,9 @@ jobs: # consul-license: ${{secrets.CONSUL_LICENSE}} # datadog-api-key: "${{ !endsWith(github.repository, '-enterprise') && secrets.DATADOG_API_KEY || '' }}" - go-test-oss: - needs: - - setup + go-test-ce: + needs: + - setup - dev-build uses: ./.github/workflows/reusable-unit-split.yml with: @@ -387,7 +387,7 @@ jobs: - lint-32bit # - go-test-arm64 - go-test-enterprise - - go-test-oss + - go-test-ce - go-test-race - go-test-api-1-19 - go-test-api-1-20 diff --git a/.github/workflows/nightly-test-1.11.x.yaml b/.github/workflows/nightly-test-1.11.x.yaml index 2065738328ca..e913dd0aaf59 100644 --- a/.github/workflows/nightly-test-1.11.x.yaml +++ b/.github/workflows/nightly-test-1.11.x.yaml @@ -39,7 +39,7 @@ jobs: working-directory: ./ui/packages/consul-ui run: make test-node - frontend-build-oss: + frontend-build-ce: runs-on: ubuntu-latest env: JOBS: 2 @@ -61,27 +61,27 @@ jobs: working-directory: ./ui run: make deps - - name: Ember Build OSS - id: build-oss + - name: Ember Build CE + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci - - name: Upload OSS Frontend + - name: Upload CE Frontend uses: actions/upload-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist if-no-files-found: error - frontend-test-oss: + frontend-test-ce: runs-on: ubuntu-latest - needs: [frontend-build-oss] + needs: [frontend-build-ce] strategy: matrix: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 0 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -100,13 +100,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist - - name: Ember Test OSS + - name: Ember Test CE id: cache working-directory: ./ui/packages/consul-ui run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit @@ -134,7 +134,7 @@ jobs: run: make deps - name: Ember Build ENT - id: build-oss + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci @@ -153,7 +153,7 @@ jobs: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 1 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -215,7 +215,7 @@ jobs: slack-failure-notification: runs-on: ubuntu-latest - needs: [frontend-test-oss, frontend-test-ent] + needs: [frontend-test-ce, frontend-test-ent] if: ${{ failure() }} steps: - name: Slack Notification diff --git a/.github/workflows/nightly-test-1.12.x.yaml b/.github/workflows/nightly-test-1.12.x.yaml index 78d35746d693..4d4fbde750ad 100644 --- a/.github/workflows/nightly-test-1.12.x.yaml +++ b/.github/workflows/nightly-test-1.12.x.yaml @@ -39,7 +39,7 @@ jobs: working-directory: ./ui/packages/consul-ui run: make test-node - frontend-build-oss: + frontend-build-ce: runs-on: ubuntu-latest env: JOBS: 2 @@ -61,27 +61,27 @@ jobs: working-directory: ./ui run: make deps - - name: Ember Build OSS - id: build-oss + - name: Ember Build CE + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci - - name: Upload OSS Frontend + - name: Upload CE Frontend uses: actions/upload-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist if-no-files-found: error - frontend-test-oss: + frontend-test-ce: runs-on: ubuntu-latest - needs: [frontend-build-oss] + needs: [frontend-build-ce] strategy: matrix: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 0 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -100,13 +100,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist - - name: Ember Test OSS + - name: Ember Test CE id: cache working-directory: ./ui/packages/consul-ui run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit @@ -134,7 +134,7 @@ jobs: run: make deps - name: Ember Build ENT - id: build-oss + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci @@ -153,7 +153,7 @@ jobs: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 1 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -215,7 +215,7 @@ jobs: slack-failure-notification: runs-on: ubuntu-latest - needs: [frontend-test-oss, frontend-test-ent] + needs: [frontend-test-ce, frontend-test-ent] if: ${{ failure() }} steps: - name: Slack Notification diff --git a/.github/workflows/nightly-test-1.13.x.yaml b/.github/workflows/nightly-test-1.13.x.yaml index 0cd2870c78f9..c1e9d035be05 100644 --- a/.github/workflows/nightly-test-1.13.x.yaml +++ b/.github/workflows/nightly-test-1.13.x.yaml @@ -39,7 +39,7 @@ jobs: working-directory: ./ui/packages/consul-ui run: make test-node - frontend-build-oss: + frontend-build-ce: runs-on: ubuntu-latest env: JOBS: 2 @@ -61,27 +61,27 @@ jobs: working-directory: ./ui run: make deps - - name: Ember Build OSS - id: build-oss + - name: Ember Build CE + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci - - name: Upload OSS Frontend + - name: Upload CE Frontend uses: actions/upload-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist if-no-files-found: error - frontend-test-oss: + frontend-test-ce: runs-on: ubuntu-latest - needs: [frontend-build-oss] + needs: [frontend-build-ce] strategy: matrix: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 0 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -100,13 +100,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist - - name: Ember Test OSS + - name: Ember Test CE id: cache working-directory: ./ui/packages/consul-ui run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit @@ -134,7 +134,7 @@ jobs: run: make deps - name: Ember Build ENT - id: build-oss + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci @@ -153,7 +153,7 @@ jobs: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 1 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -215,7 +215,7 @@ jobs: slack-failure-notification: runs-on: ubuntu-latest - needs: [frontend-test-oss, frontend-test-ent] + needs: [frontend-test-ce, frontend-test-ent] if: ${{ failure() }} steps: - name: Slack Notification diff --git a/.github/workflows/nightly-test-main.yaml b/.github/workflows/nightly-test-main.yaml index a645f8359c21..33b2a8b62216 100644 --- a/.github/workflows/nightly-test-main.yaml +++ b/.github/workflows/nightly-test-main.yaml @@ -39,7 +39,7 @@ jobs: working-directory: ./ui/packages/consul-ui run: make test-node - frontend-build-oss: + frontend-build-ce: runs-on: ubuntu-latest env: JOBS: 2 @@ -61,27 +61,27 @@ jobs: working-directory: ./ui run: make deps - - name: Ember Build OSS - id: build-oss + - name: Ember Build CE + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci - - name: Upload OSS Frontend + - name: Upload CE Frontend uses: actions/upload-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist if-no-files-found: error - frontend-test-oss: + frontend-test-ce: runs-on: ubuntu-latest - needs: [frontend-build-oss] + needs: [frontend-build-ce] strategy: matrix: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 0 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -100,13 +100,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@v3 with: - name: frontend-oss-${{ env.BRANCH_NAME }} + name: frontend-ce-${{ env.BRANCH_NAME }} path: ./ui/packages/consul-ui/dist - - name: Ember Test OSS + - name: Ember Test CE id: cache working-directory: ./ui/packages/consul-ui run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit @@ -134,7 +134,7 @@ jobs: run: make deps - name: Ember Build ENT - id: build-oss + id: build-ce working-directory: ./ui/packages/consul-ui run: make build-ci @@ -153,7 +153,7 @@ jobs: partition: [ 1, 2, 3, 4 ] env: CONSUL_NSPACES_ENABLED: 1 - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary + EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam steps: - uses: actions/checkout@v2 @@ -215,7 +215,7 @@ jobs: slack-failure-notification: runs-on: ubuntu-latest - needs: [frontend-test-oss, frontend-test-ent] + needs: [frontend-test-ce, frontend-test-ent] if: ${{ failure() }} steps: - name: Slack Notification diff --git a/.golangci.yml b/.golangci.yml index 3b4cd7fa91d4..0bfc46209405 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -63,11 +63,11 @@ issues: - linters: [unparam] text: '`(t|resp|req|entMeta)` is unused' - # Temp ignore everything in _oss(_test).go and _ent(_test).go. Many of these + # Temp ignore everything in _ce(_test).go and _ent(_test).go. Many of these # could use underscore to ignore the unused arguments, but the "always returns" - # issue will likely remain in oss, and will need to be excluded. + # issue will likely remain in CE, and will need to be excluded. - linters: [unparam] - path: '(_oss.go|_oss_test.go|_ent.go|_ent_test.go)' + path: "(_ce.go|_ce_test.go|_ent.go|_ent_test.go)" linters-settings: govet: diff --git a/.release/security-scan.hcl b/.release/security-scan.hcl index 490ddd274635..97124dd4eb32 100644 --- a/.release/security-scan.hcl +++ b/.release/security-scan.hcl @@ -8,6 +8,7 @@ binary { secrets = false go_modules = false osv = true + # TODO(spatel): CE refactor oss_index = true nvd = true } diff --git a/acl/acl_oss.go b/acl/acl_ce.go similarity index 95% rename from acl/acl_oss.go rename to acl/acl_ce.go index 48f671ac7ae2..264855035647 100644 --- a/acl/acl_oss.go +++ b/acl/acl_ce.go @@ -14,7 +14,7 @@ const ( const DefaultNamespaceName = "default" type EnterpriseConfig struct { - // no fields in OSS + // no fields in CE } func (_ *EnterpriseConfig) Close() { diff --git a/acl/authorizer_oss.go b/acl/authorizer_ce.go similarity index 100% rename from acl/authorizer_oss.go rename to acl/authorizer_ce.go diff --git a/acl/enterprisemeta_oss.go b/acl/enterprisemeta_ce.go similarity index 100% rename from acl/enterprisemeta_oss.go rename to acl/enterprisemeta_ce.go diff --git a/acl/errors_oss.go b/acl/errors_ce.go similarity index 100% rename from acl/errors_oss.go rename to acl/errors_ce.go diff --git a/acl/policy_authorizer_oss.go b/acl/policy_authorizer_ce.go similarity index 100% rename from acl/policy_authorizer_oss.go rename to acl/policy_authorizer_ce.go diff --git a/acl/policy_oss.go b/acl/policy_ce.go similarity index 100% rename from acl/policy_oss.go rename to acl/policy_ce.go diff --git a/acl/policy_merger_oss.go b/acl/policy_merger_ce.go similarity index 100% rename from acl/policy_merger_oss.go rename to acl/policy_merger_ce.go diff --git a/agent/acl_oss.go b/agent/acl_ce.go similarity index 100% rename from agent/acl_oss.go rename to agent/acl_ce.go diff --git a/agent/agent.go b/agent/agent.go index 599e754fb2e2..34536e017d48 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -3660,7 +3660,7 @@ func (a *Agent) loadServices(conf *config.RuntimeConfig, snap map[structs.CheckI } if acl.EqualPartitions("", p.Service.PartitionOrEmpty()) { - // NOTE: in case loading a service with empty partition (e.g., OSS -> ENT), + // NOTE: in case loading a service with empty partition (e.g., CE -> ENT), // we always default the service partition to the agent's partition. p.Service.OverridePartition(a.AgentEnterpriseMeta().PartitionOrDefault()) } else if !acl.EqualPartitions(a.AgentEnterpriseMeta().PartitionOrDefault(), p.Service.PartitionOrDefault()) { diff --git a/agent/agent_oss.go b/agent/agent_ce.go similarity index 100% rename from agent/agent_oss.go rename to agent/agent_ce.go diff --git a/agent/agent_oss_test.go b/agent/agent_ce_test.go similarity index 100% rename from agent/agent_oss_test.go rename to agent/agent_ce_test.go diff --git a/agent/agent_endpoint_oss.go b/agent/agent_endpoint_ce.go similarity index 100% rename from agent/agent_endpoint_oss.go rename to agent/agent_endpoint_ce.go diff --git a/agent/agent_endpoint_oss_test.go b/agent/agent_endpoint_ce_test.go similarity index 100% rename from agent/agent_endpoint_oss_test.go rename to agent/agent_endpoint_ce_test.go diff --git a/agent/auto-config/auto_config_oss.go b/agent/auto-config/auto_config_ce.go similarity index 85% rename from agent/auto-config/auto_config_oss.go rename to agent/auto-config/auto_config_ce.go index 95b38aa056ff..29f626568fdb 100644 --- a/agent/auto-config/auto_config_oss.go +++ b/agent/auto-config/auto_config_ce.go @@ -3,7 +3,7 @@ package autoconf -// AutoConfigEnterprise has no fields in OSS +// AutoConfigEnterprise has no fields in CE type AutoConfigEnterprise struct{} // newAutoConfigEnterprise initializes the enterprise AutoConfig struct diff --git a/agent/auto-config/auto_config_oss_test.go b/agent/auto-config/auto_config_ce_test.go similarity index 100% rename from agent/auto-config/auto_config_oss_test.go rename to agent/auto-config/auto_config_ce_test.go diff --git a/agent/auto-config/config_oss.go b/agent/auto-config/config_ce.go similarity index 88% rename from agent/auto-config/config_oss.go rename to agent/auto-config/config_ce.go index a8048954a183..dbd7d90eb3c2 100644 --- a/agent/auto-config/config_oss.go +++ b/agent/auto-config/config_ce.go @@ -6,7 +6,7 @@ package autoconf // EnterpriseConfig stub - only populated in Consul Enterprise type EnterpriseConfig struct{} -// finalize is a noop for OSS +// finalize is a noop for CE func (_ *EnterpriseConfig) validateAndFinalize() error { return nil } diff --git a/agent/auto-config/mock_oss_test.go b/agent/auto-config/mock_ce_test.go similarity index 85% rename from agent/auto-config/mock_oss_test.go rename to agent/auto-config/mock_ce_test.go index 0518753bbbee..1a7acaa48378 100644 --- a/agent/auto-config/mock_oss_test.go +++ b/agent/auto-config/mock_ce_test.go @@ -7,7 +7,7 @@ import ( "testing" ) -// mockedEnterpriseConfig is pretty much just a stub in OSS +// mockedEnterpriseConfig is pretty much just a stub in CE. // It does contain an enterprise config for compatibility // purposes but that in and of itself is just a stub. type mockedEnterpriseConfig struct { diff --git a/agent/cache-types/connect_ca_leaf_oss.go b/agent/cache-types/connect_ca_leaf_ce.go similarity index 100% rename from agent/cache-types/connect_ca_leaf_oss.go rename to agent/cache-types/connect_ca_leaf_ce.go diff --git a/agent/catalog_endpoint_oss.go b/agent/catalog_endpoint_ce.go similarity index 100% rename from agent/catalog_endpoint_oss.go rename to agent/catalog_endpoint_ce.go diff --git a/agent/config/builder_oss.go b/agent/config/builder_ce.go similarity index 97% rename from agent/config/builder_oss.go rename to agent/config/builder_ce.go index f0fcc30ae4ea..cfe05b5fd9d1 100644 --- a/agent/config/builder_oss.go +++ b/agent/config/builder_ce.go @@ -10,7 +10,7 @@ import ( // validateEnterpriseConfig is a function to validate the enterprise specific // configuration items after Parsing but before merging into the overall // configuration. The original intent is to use it to ensure that we warn -// for enterprise configurations used in OSS. +// for enterprise configurations used in CE. func validateEnterpriseConfigKeys(config *Config) []error { var result []error add := func(k string) { diff --git a/agent/config/builder_oss_test.go b/agent/config/builder_ce_test.go similarity index 100% rename from agent/config/builder_oss_test.go rename to agent/config/builder_ce_test.go diff --git a/agent/config/config_oss.go b/agent/config/config_ce.go similarity index 100% rename from agent/config/config_oss.go rename to agent/config/config_ce.go diff --git a/agent/config/default_oss.go b/agent/config/default_ce.go similarity index 100% rename from agent/config/default_oss.go rename to agent/config/default_ce.go diff --git a/agent/config/runtime_oss.go b/agent/config/runtime_ce.go similarity index 100% rename from agent/config/runtime_oss.go rename to agent/config/runtime_ce.go diff --git a/agent/config/runtime_oss_test.go b/agent/config/runtime_ce_test.go similarity index 97% rename from agent/config/runtime_oss_test.go rename to agent/config/runtime_ce_test.go index 1cffd38746fd..19a96328abb0 100644 --- a/agent/config/runtime_oss_test.go +++ b/agent/config/runtime_ce_test.go @@ -32,9 +32,9 @@ var enterpriseConfigKeyWarnings = []string{ enterpriseConfigKeyError{key: "reporting.license.enabled"}.Error(), } -// OSS-only equivalent of TestConfigFlagsAndEdgecases +// CE-only equivalent of TestConfigFlagsAndEdgecases // used for flags validated in ent-only code -func TestLoad_IntegrationWithFlags_OSS(t *testing.T) { +func TestLoad_IntegrationWithFlags_CE(t *testing.T) { dataDir := testutil.TempDir(t, "consul") defer os.RemoveAll(dataDir) diff --git a/agent/config/segment_oss.go b/agent/config/segment_ce.go similarity index 100% rename from agent/config/segment_oss.go rename to agent/config/segment_ce.go diff --git a/agent/config/segment_oss_test.go b/agent/config/segment_ce_test.go similarity index 95% rename from agent/config/segment_oss_test.go rename to agent/config/segment_ce_test.go index 52b4a0964cda..e31a9602b416 100644 --- a/agent/config/segment_oss_test.go +++ b/agent/config/segment_ce_test.go @@ -15,7 +15,7 @@ func TestSegments(t *testing.T) { tests := []testCase{ { - desc: "segment name not in OSS", + desc: "segment name not in CE", args: []string{ `-data-dir=` + dataDir, }, @@ -39,7 +39,7 @@ func TestSegments(t *testing.T) { }, }, { - desc: "segments not in OSS", + desc: "segments not in CE", args: []string{ `-data-dir=` + dataDir, }, diff --git a/agent/connect/sni.go b/agent/connect/sni.go index 17fce7e27c45..b78c9f92c81d 100644 --- a/agent/connect/sni.go +++ b/agent/connect/sni.go @@ -28,7 +28,7 @@ func UpstreamSNI(u *structs.Upstream, subset string, dc string, trustDomain stri func GatewaySNI(dc string, partition, trustDomain string) string { if partition == "" { - // TODO(partitions) Make default available in OSS as a constant for uses like this one + // TODO(partitions) Make default available in CE as a constant for uses like this one partition = "default" } @@ -45,7 +45,7 @@ func ServiceSNI(service string, subset string, namespace string, partition strin namespace = structs.IntentionDefaultNamespace } if partition == "" { - // TODO(partitions) Make default available in OSS as a constant for uses like this one + // TODO(partitions) Make default available in CE as a constant for uses like this one partition = "default" } @@ -73,7 +73,7 @@ func PeeredServiceSNI(service, namespace, partition, peerName, trustDomain strin namespace = structs.IntentionDefaultNamespace } if partition == "" { - // TODO(partitions) Make default available in OSS as a constant for uses like this one + // TODO(partitions) Make default available in CE as a constant for uses like this one partition = "default" } diff --git a/agent/connect/uri_agent_oss.go b/agent/connect/uri_agent_ce.go similarity index 86% rename from agent/connect/uri_agent_oss.go rename to agent/connect/uri_agent_ce.go index e24f9b560989..fdfb075a8d4b 100644 --- a/agent/connect/uri_agent_oss.go +++ b/agent/connect/uri_agent_ce.go @@ -10,7 +10,7 @@ import ( ) // GetEnterpriseMeta will synthesize an EnterpriseMeta struct from the SpiffeIDAgent. -// in OSS this just returns an empty (but never nil) struct pointer +// in CE this just returns an empty (but never nil) struct pointer func (id SpiffeIDAgent) GetEnterpriseMeta() *acl.EnterpriseMeta { return &acl.EnterpriseMeta{} } diff --git a/agent/connect/uri_agent_oss_test.go b/agent/connect/uri_agent_ce_test.go similarity index 100% rename from agent/connect/uri_agent_oss_test.go rename to agent/connect/uri_agent_ce_test.go diff --git a/agent/connect/uri_mesh_gateway_oss.go b/agent/connect/uri_mesh_gateway_ce.go similarity index 85% rename from agent/connect/uri_mesh_gateway_oss.go rename to agent/connect/uri_mesh_gateway_ce.go index 8865b97f94fa..a92d0fc7ffca 100644 --- a/agent/connect/uri_mesh_gateway_oss.go +++ b/agent/connect/uri_mesh_gateway_ce.go @@ -10,7 +10,7 @@ import ( ) // GetEnterpriseMeta will synthesize an EnterpriseMeta struct from the SpiffeIDAgent. -// in OSS this just returns an empty (but never nil) struct pointer +// in CE this just returns an empty (but never nil) struct pointer func (id SpiffeIDMeshGateway) GetEnterpriseMeta() *acl.EnterpriseMeta { return &acl.EnterpriseMeta{} } diff --git a/agent/connect/uri_mesh_gateway_oss_test.go b/agent/connect/uri_mesh_gateway_ce_test.go similarity index 100% rename from agent/connect/uri_mesh_gateway_oss_test.go rename to agent/connect/uri_mesh_gateway_ce_test.go diff --git a/agent/connect/uri_service.go b/agent/connect/uri_service.go index 685498b1afbd..e3ed1b28895a 100644 --- a/agent/connect/uri_service.go +++ b/agent/connect/uri_service.go @@ -40,10 +40,10 @@ func (id SpiffeIDService) uriPath() string { id.Service, ) - // Although OSS has no support for partitions, it still needs to be able to + // Although CE has no support for partitions, it still needs to be able to // handle exportedPartition from peered Consul Enterprise clusters in order // to generate the correct SpiffeID. - // We intentionally avoid using pbpartition.DefaultName here to be OSS friendly. + // We intentionally avoid using pbpartition.DefaultName here to be CE friendly. if ap := id.PartitionOrDefault(); ap != "" && ap != "default" { return "/ap/" + ap + path } diff --git a/agent/connect/uri_service_oss.go b/agent/connect/uri_service_ce.go similarity index 72% rename from agent/connect/uri_service_oss.go rename to agent/connect/uri_service_ce.go index 63a51bf7003b..7eedecade676 100644 --- a/agent/connect/uri_service_oss.go +++ b/agent/connect/uri_service_ce.go @@ -10,13 +10,13 @@ import ( ) // GetEnterpriseMeta will synthesize an EnterpriseMeta struct from the SpiffeIDService. -// in OSS this just returns an empty (but never nil) struct pointer +// in CE this just returns an empty (but never nil) struct pointer func (id SpiffeIDService) GetEnterpriseMeta() *acl.EnterpriseMeta { return &acl.EnterpriseMeta{} } -// PartitionOrDefault breaks from OSS's pattern of returning empty strings. -// Although OSS has no support for partitions, it still needs to be able to +// PartitionOrDefault breaks from CE's pattern of returning empty strings. +// Although CE has no support for partitions, it still needs to be able to // handle exportedPartition from peered Consul Enterprise clusters in order // to generate the correct SpiffeID. func (id SpiffeIDService) PartitionOrDefault() string { diff --git a/agent/connect/uri_service_oss_test.go b/agent/connect/uri_service_ce_test.go similarity index 100% rename from agent/connect/uri_service_oss_test.go rename to agent/connect/uri_service_ce_test.go diff --git a/agent/consul/acl_authmethod_oss.go b/agent/consul/acl_authmethod_ce.go similarity index 100% rename from agent/consul/acl_authmethod_oss.go rename to agent/consul/acl_authmethod_ce.go diff --git a/agent/consul/acl_oss.go b/agent/consul/acl_ce.go similarity index 95% rename from agent/consul/acl_oss.go rename to agent/consul/acl_ce.go index 1fe4fbbf817f..85555c57fc3e 100644 --- a/agent/consul/acl_oss.go +++ b/agent/consul/acl_ce.go @@ -33,13 +33,13 @@ func (r *ACLResolver) resolveEnterpriseDefaultsForIdentity(identity structs.ACLI // resolveEnterpriseIdentityAndRoles will resolve an enterprise identity to an additional set of roles func (_ *ACLResolver) resolveEnterpriseIdentityAndRoles(_ structs.ACLIdentity) (structs.ACLIdentity, structs.ACLRoles, error) { - // this function does nothing in OSS + // this function does nothing in CE return nil, nil, nil } // resolveEnterpriseIdentityAndPolicies will resolve an enterprise identity to an additional set of policies func (_ *ACLResolver) resolveEnterpriseIdentityAndPolicies(_ structs.ACLIdentity) (structs.ACLIdentity, structs.ACLPolicies, error) { - // this function does nothing in OSS + // this function does nothing in CE return nil, nil, nil } diff --git a/agent/consul/acl_oss_test.go b/agent/consul/acl_ce_test.go similarity index 100% rename from agent/consul/acl_oss_test.go rename to agent/consul/acl_ce_test.go diff --git a/agent/consul/acl_endpoint_oss.go b/agent/consul/acl_endpoint_ce.go similarity index 100% rename from agent/consul/acl_endpoint_oss.go rename to agent/consul/acl_endpoint_ce.go diff --git a/agent/consul/acl_server_oss.go b/agent/consul/acl_server_ce.go similarity index 100% rename from agent/consul/acl_server_oss.go rename to agent/consul/acl_server_ce.go diff --git a/agent/consul/auth/binder_oss.go b/agent/consul/auth/binder_ce.go similarity index 100% rename from agent/consul/auth/binder_oss.go rename to agent/consul/auth/binder_ce.go diff --git a/agent/consul/auth/token_writer_oss.go b/agent/consul/auth/token_writer_ce.go similarity index 100% rename from agent/consul/auth/token_writer_oss.go rename to agent/consul/auth/token_writer_ce.go diff --git a/agent/consul/authmethod/authmethods_oss.go b/agent/consul/authmethod/authmethods_ce.go similarity index 100% rename from agent/consul/authmethod/authmethods_oss.go rename to agent/consul/authmethod/authmethods_ce.go diff --git a/agent/consul/authmethod/kubeauth/k8s_oss.go b/agent/consul/authmethod/kubeauth/k8s_ce.go similarity index 100% rename from agent/consul/authmethod/kubeauth/k8s_oss.go rename to agent/consul/authmethod/kubeauth/k8s_ce.go diff --git a/agent/consul/authmethod/ssoauth/sso_oss.go b/agent/consul/authmethod/ssoauth/sso_ce.go similarity index 100% rename from agent/consul/authmethod/ssoauth/sso_oss.go rename to agent/consul/authmethod/ssoauth/sso_ce.go diff --git a/agent/consul/authmethod/testauth/testing_oss.go b/agent/consul/authmethod/testauth/testing_ce.go similarity index 100% rename from agent/consul/authmethod/testauth/testing_oss.go rename to agent/consul/authmethod/testauth/testing_ce.go diff --git a/agent/consul/autopilot_oss.go b/agent/consul/autopilot_ce.go similarity index 100% rename from agent/consul/autopilot_oss.go rename to agent/consul/autopilot_ce.go diff --git a/agent/consul/catalog_endpoint.go b/agent/consul/catalog_endpoint.go index 5d5dcb8b56d5..e2be8d9f45bf 100644 --- a/agent/consul/catalog_endpoint.go +++ b/agent/consul/catalog_endpoint.go @@ -447,7 +447,7 @@ func vetDeregisterWithACL( } // This order must match the code in applyDeregister() in - // fsm/commands_oss.go since it also evaluates things in this order, + // fsm/commands_ce.go since it also evaluates things in this order, // and will ignore fields based on this precedence. This lets us also // ignore them from an ACL perspective. if subj.ServiceID != "" { diff --git a/agent/consul/config_oss.go b/agent/consul/config_ce.go similarity index 100% rename from agent/consul/config_oss.go rename to agent/consul/config_ce.go diff --git a/agent/consul/discoverychain/compile_oss.go b/agent/consul/discoverychain/compile_ce.go similarity index 100% rename from agent/consul/discoverychain/compile_oss.go rename to agent/consul/discoverychain/compile_ce.go diff --git a/agent/consul/enterprise_client_oss.go b/agent/consul/enterprise_client_ce.go similarity index 100% rename from agent/consul/enterprise_client_oss.go rename to agent/consul/enterprise_client_ce.go diff --git a/agent/consul/enterprise_config_oss.go b/agent/consul/enterprise_config_ce.go similarity index 100% rename from agent/consul/enterprise_config_oss.go rename to agent/consul/enterprise_config_ce.go diff --git a/agent/consul/enterprise_server_oss.go b/agent/consul/enterprise_server_ce.go similarity index 98% rename from agent/consul/enterprise_server_oss.go rename to agent/consul/enterprise_server_ce.go index d6e07ddd8ce5..b0a8129ad5f3 100644 --- a/agent/consul/enterprise_server_oss.go +++ b/agent/consul/enterprise_server_ce.go @@ -74,7 +74,7 @@ func (s *Server) validateEnterpriseIntentionPartition(partition string) error { return nil } - // No special handling for wildcard partitions as they are pointless in OSS. + // No special handling for wildcard partitions as they are pointless in CE. return errors.New("Partitions is a Consul Enterprise feature") } @@ -86,7 +86,7 @@ func (s *Server) validateEnterpriseIntentionNamespace(ns string, _ bool) error { return nil } - // No special handling for wildcard namespaces as they are pointless in OSS. + // No special handling for wildcard namespaces as they are pointless in CE. return errors.New("Namespaces is a Consul Enterprise feature") } diff --git a/agent/consul/enterprise_server_oss_test.go b/agent/consul/enterprise_server_ce_test.go similarity index 100% rename from agent/consul/enterprise_server_oss_test.go rename to agent/consul/enterprise_server_ce_test.go diff --git a/agent/consul/fsm/commands_oss.go b/agent/consul/fsm/commands_ce.go similarity index 100% rename from agent/consul/fsm/commands_oss.go rename to agent/consul/fsm/commands_ce.go diff --git a/agent/consul/fsm/commands_oss_test.go b/agent/consul/fsm/commands_ce_test.go similarity index 100% rename from agent/consul/fsm/commands_oss_test.go rename to agent/consul/fsm/commands_ce_test.go diff --git a/agent/consul/fsm/fsm.go b/agent/consul/fsm/fsm.go index 46d7d7731020..641aee42e5ce 100644 --- a/agent/consul/fsm/fsm.go +++ b/agent/consul/fsm/fsm.go @@ -198,7 +198,7 @@ func (c *FSM) Restore(old io.ReadCloser) error { } default: if msg >= 64 { - return fmt.Errorf("msg type <%d> is a Consul Enterprise log entry. Consul OSS cannot restore it", msg) + return fmt.Errorf("msg type <%d> is a Consul Enterprise log entry. Consul CE cannot restore it", msg) } else { return fmt.Errorf("Unrecognized msg type %d", msg) } diff --git a/agent/consul/fsm/snapshot_oss.go b/agent/consul/fsm/snapshot_ce.go similarity index 99% rename from agent/consul/fsm/snapshot_oss.go rename to agent/consul/fsm/snapshot_ce.go index 7fa53381a7dc..9899440da39e 100644 --- a/agent/consul/fsm/snapshot_oss.go +++ b/agent/consul/fsm/snapshot_ce.go @@ -14,7 +14,7 @@ import ( ) func init() { - registerPersister(persistOSS) + registerPersister(persistCE) registerRestorer(structs.RegisterRequestType, restoreRegistration) registerRestorer(structs.KVSRequestType, restoreKV) @@ -45,7 +45,7 @@ func init() { registerRestorer(structs.PeeringSecretsWriteType, restorePeeringSecrets) } -func persistOSS(s *snapshot, sink raft.SnapshotSink, encoder *codec.Encoder) error { +func persistCE(s *snapshot, sink raft.SnapshotSink, encoder *codec.Encoder) error { if err := s.persistVirtualIPs(sink, encoder); err != nil { return err } diff --git a/agent/consul/fsm/snapshot_oss_test.go b/agent/consul/fsm/snapshot_ce_test.go similarity index 88% rename from agent/consul/fsm/snapshot_oss_test.go rename to agent/consul/fsm/snapshot_ce_test.go index 301db3c2aea7..13c5b1dcc402 100644 --- a/agent/consul/fsm/snapshot_oss_test.go +++ b/agent/consul/fsm/snapshot_ce_test.go @@ -19,7 +19,7 @@ func TestRestoreFromEnterprise(t *testing.T) { logger := testutil.Logger(t) fsm, err := New(nil, logger) require.NoError(t, err) - // To verify if a proper message is displayed when Consul OSS tries to + // To verify if a proper message is displayed when Consul CE tries to // unsuccessfully restore entries from a Consul Ent snapshot. buf := bytes.NewBuffer(nil) sink := &MockSink{buf, false} @@ -43,6 +43,6 @@ func TestRestoreFromEnterprise(t *testing.T) { sink.Write([]byte{byte(structs.MessageType(entMockEntry.ID))}) encoder.Encode(entMockEntry) - require.EqualError(t, fsm.Restore(sink), "msg type <65> is a Consul Enterprise log entry. Consul OSS cannot restore it") + require.EqualError(t, fsm.Restore(sink), "msg type <65> is a Consul Enterprise log entry. Consul CE cannot restore it") sink.Cancel() } diff --git a/agent/consul/fsm/snapshot_test.go b/agent/consul/fsm/snapshot_test.go index 26830ff9df18..2f62436bf75d 100644 --- a/agent/consul/fsm/snapshot_test.go +++ b/agent/consul/fsm/snapshot_test.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/consul/sdk/testutil" ) -func TestFSM_SnapshotRestore_OSS(t *testing.T) { +func TestFSM_SnapshotRestore_CE(t *testing.T) { t.Parallel() logger := testutil.Logger(t) @@ -901,7 +901,7 @@ func convertACLTokenToLegacy(tok *structs.ACLToken) (*LegacyACL, error) { return compat, nil } -func TestFSM_BadRestore_OSS(t *testing.T) { +func TestFSM_BadRestore_CE(t *testing.T) { t.Parallel() // Create an FSM with some state. logger := testutil.Logger(t) diff --git a/agent/consul/leader_oss_test.go b/agent/consul/leader_ce_test.go similarity index 100% rename from agent/consul/leader_oss_test.go rename to agent/consul/leader_ce_test.go diff --git a/agent/consul/leader_intentions_oss.go b/agent/consul/leader_intentions_ce.go similarity index 96% rename from agent/consul/leader_intentions_oss.go rename to agent/consul/leader_intentions_ce.go index db9c742bd1d4..6913b6a90a3d 100644 --- a/agent/consul/leader_intentions_oss.go +++ b/agent/consul/leader_intentions_ce.go @@ -10,7 +10,7 @@ import ( ) func migrateIntentionsToConfigEntries(ixns structs.Intentions) []*structs.ServiceIntentionsConfigEntry { - // Remove any intention in OSS that happened to have used a non-default + // Remove any intention in CE that happened to have used a non-default // namespace. // // The one exception is that if we find wildcards namespaces we "upgrade" @@ -53,7 +53,7 @@ func migrateIntentionsToConfigEntries(ixns structs.Intentions) []*structs.Servic } retained[name] = struct{}{} output = append(output, ixn) - continue // a-ok for OSS + continue // a-ok for CE } // If anything is wildcarded, attempt to reify it as "default". diff --git a/agent/consul/leader_intentions_oss_test.go b/agent/consul/leader_intentions_ce_test.go similarity index 100% rename from agent/consul/leader_intentions_oss_test.go rename to agent/consul/leader_intentions_ce_test.go diff --git a/agent/consul/merge_oss.go b/agent/consul/merge_ce.go similarity index 100% rename from agent/consul/merge_oss.go rename to agent/consul/merge_ce.go diff --git a/agent/consul/merge_oss_test.go b/agent/consul/merge_ce_test.go similarity index 97% rename from agent/consul/merge_oss_test.go rename to agent/consul/merge_ce_test.go index 99333c7dd842..f046300de672 100644 --- a/agent/consul/merge_oss_test.go +++ b/agent/consul/merge_ce_test.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/consul/types" ) -func TestMerge_OSS_LAN(t *testing.T) { +func TestMerge_CE_LAN(t *testing.T) { type testcase struct { segment string server bool diff --git a/agent/consul/options_oss.go b/agent/consul/options_ce.go similarity index 100% rename from agent/consul/options_oss.go rename to agent/consul/options_ce.go diff --git a/agent/consul/peering_backend_oss.go b/agent/consul/peering_backend_ce.go similarity index 100% rename from agent/consul/peering_backend_oss.go rename to agent/consul/peering_backend_ce.go diff --git a/agent/consul/peering_backend_oss_test.go b/agent/consul/peering_backend_ce_test.go similarity index 100% rename from agent/consul/peering_backend_oss_test.go rename to agent/consul/peering_backend_ce_test.go diff --git a/agent/consul/prepared_query/walk_oss_test.go b/agent/consul/prepared_query/walk_ce_test.go similarity index 100% rename from agent/consul/prepared_query/walk_oss_test.go rename to agent/consul/prepared_query/walk_ce_test.go diff --git a/agent/consul/reporting/reporting_oss.go b/agent/consul/reporting/reporting_ce.go similarity index 100% rename from agent/consul/reporting/reporting_oss.go rename to agent/consul/reporting/reporting_ce.go diff --git a/agent/consul/segment_oss.go b/agent/consul/segment_ce.go similarity index 88% rename from agent/consul/segment_oss.go rename to agent/consul/segment_ce.go index 034e79c54ef1..44b8a14b2e7e 100644 --- a/agent/consul/segment_oss.go +++ b/agent/consul/segment_ce.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/consul/agent/structs" ) -var SegmentOSSSummaries = []prometheus.SummaryDefinition{ +var SegmentCESummaries = []prometheus.SummaryDefinition{ { Name: []string{"leader", "reconcile"}, Help: "Measures the time spent updating the raft store from the serf member information.", @@ -23,7 +23,7 @@ func (s *Server) LANSegmentAddr(name string) string { return "" } -// setupSegmentRPC returns an error if any segments are defined since the OSS +// setupSegmentRPC returns an error if any segments are defined since the CE // version of Consul doesn't support them. func (s *Server) setupSegmentRPC() (map[string]net.Listener, error) { if len(s.config.Segments) > 0 { @@ -33,7 +33,7 @@ func (s *Server) setupSegmentRPC() (map[string]net.Listener, error) { return nil, nil } -// setupSegments returns an error if any segments are defined since the OSS +// setupSegments returns an error if any segments are defined since the CE // version of Consul doesn't support them. func (s *Server) setupSegments(config *Config, rpcListeners map[string]net.Listener) error { if len(config.Segments) > 0 { @@ -43,6 +43,6 @@ func (s *Server) setupSegments(config *Config, rpcListeners map[string]net.Liste return nil } -// floodSegments is a NOP in the OSS version of Consul. +// floodSegments is a NOP in the CE version of Consul. func (s *Server) floodSegments(config *Config) { } diff --git a/agent/consul/server_oss.go b/agent/consul/server_ce.go similarity index 98% rename from agent/consul/server_oss.go rename to agent/consul/server_ce.go index 5e285c96353e..63de1bfe852d 100644 --- a/agent/consul/server_oss.go +++ b/agent/consul/server_ce.go @@ -79,7 +79,7 @@ func (s *Server) removeFailedNode( } // lanPoolAllMembers only returns our own segment or partition's members, because -// OSS servers can't be in multiple segments or partitions. +// CE servers can't be in multiple segments or partitions. func (s *Server) lanPoolAllMembers() ([]serf.Member, error) { return s.LANMembersInAgentPartition(), nil } diff --git a/agent/consul/server_oss_test.go b/agent/consul/server_ce_test.go similarity index 100% rename from agent/consul/server_oss_test.go rename to agent/consul/server_ce_test.go diff --git a/agent/consul/state/acl_oss.go b/agent/consul/state/acl_ce.go similarity index 100% rename from agent/consul/state/acl_oss.go rename to agent/consul/state/acl_ce.go diff --git a/agent/consul/state/acl_oss_test.go b/agent/consul/state/acl_ce_test.go similarity index 100% rename from agent/consul/state/acl_oss_test.go rename to agent/consul/state/acl_ce_test.go diff --git a/agent/consul/state/catalog_oss.go b/agent/consul/state/catalog_ce.go similarity index 99% rename from agent/consul/state/catalog_oss.go rename to agent/consul/state/catalog_ce.go index fccbf6984ef0..ee599402d600 100644 --- a/agent/consul/state/catalog_oss.go +++ b/agent/consul/state/catalog_ce.go @@ -112,7 +112,7 @@ func catalogUpdateNodeExtinctionIndex(tx WriteTxn, idx uint64, _ *acl.Enterprise } func catalogInsertNode(tx WriteTxn, node *structs.Node) error { - // ensure that the Partition is always clear within the state store in OSS + // ensure that the Partition is always clear within the state store in CE node.Partition = "" // Insert the node and update the index. diff --git a/agent/consul/state/catalog_oss_test.go b/agent/consul/state/catalog_ce_test.go similarity index 100% rename from agent/consul/state/catalog_oss_test.go rename to agent/consul/state/catalog_ce_test.go diff --git a/agent/consul/state/catalog_events_oss.go b/agent/consul/state/catalog_events_ce.go similarity index 100% rename from agent/consul/state/catalog_events_oss.go rename to agent/consul/state/catalog_events_ce.go diff --git a/agent/consul/state/catalog_events_oss_test.go b/agent/consul/state/catalog_events_ce_test.go similarity index 92% rename from agent/consul/state/catalog_events_oss_test.go rename to agent/consul/state/catalog_events_ce_test.go index ace7cfe71202..8c29c692983b 100644 --- a/agent/consul/state/catalog_events_oss_test.go +++ b/agent/consul/state/catalog_events_ce_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/consul/agent/structs" ) -func TestEventPayloadCheckServiceNode_Subject_OSS(t *testing.T) { +func TestEventPayloadCheckServiceNode_Subject_CE(t *testing.T) { for desc, tc := range map[string]struct { evt EventPayloadCheckServiceNode sub string diff --git a/agent/consul/state/config_entry_oss.go b/agent/consul/state/config_entry_ce.go similarity index 95% rename from agent/consul/state/config_entry_oss.go rename to agent/consul/state/config_entry_ce.go index ac4d1d6cb05c..07e7167b3832 100644 --- a/agent/consul/state/config_entry_oss.go +++ b/agent/consul/state/config_entry_ce.go @@ -62,7 +62,7 @@ func configIntentionsConvertToList(iter memdb.ResultIterator, _ *acl.EnterpriseM } // getExportedServicesMatchServicesNames returns a list of service names that are considered matches when -// found in a list of exported-services config entries. For OSS, namespace is not considered, so a match is one of: +// found in a list of exported-services config entries. For CE, namespace is not considered, so a match is one of: // - the service name matches // - the service name is a wildcard // diff --git a/agent/consul/state/config_entry_oss_test.go b/agent/consul/state/config_entry_ce_test.go similarity index 100% rename from agent/consul/state/config_entry_oss_test.go rename to agent/consul/state/config_entry_ce_test.go diff --git a/agent/consul/state/config_entry_intention.go b/agent/consul/state/config_entry_intention.go index 17183e7ceece..76b5a487af0d 100644 --- a/agent/consul/state/config_entry_intention.go +++ b/agent/consul/state/config_entry_intention.go @@ -80,7 +80,7 @@ type ServiceIntentionSourceIndex struct { } // Compile-time assert that these interfaces hold to ensure that the -// methods correctly exist across the oss/ent split. +// methods correctly exist across the ce/ent split. var _ memdb.Indexer = (*ServiceIntentionSourceIndex)(nil) var _ memdb.MultiIndexer = (*ServiceIntentionSourceIndex)(nil) diff --git a/agent/consul/state/config_entry_intention_oss.go b/agent/consul/state/config_entry_intention_ce.go similarity index 100% rename from agent/consul/state/config_entry_intention_oss.go rename to agent/consul/state/config_entry_intention_ce.go diff --git a/agent/consul/state/coordinate_oss.go b/agent/consul/state/coordinate_ce.go similarity index 100% rename from agent/consul/state/coordinate_oss.go rename to agent/consul/state/coordinate_ce.go diff --git a/agent/consul/state/coordinate_oss_test.go b/agent/consul/state/coordinate_ce_test.go similarity index 100% rename from agent/consul/state/coordinate_oss_test.go rename to agent/consul/state/coordinate_ce_test.go diff --git a/agent/consul/state/delay_oss.go b/agent/consul/state/delay_ce.go similarity index 100% rename from agent/consul/state/delay_oss.go rename to agent/consul/state/delay_ce.go diff --git a/agent/consul/state/graveyard_oss.go b/agent/consul/state/graveyard_ce.go similarity index 100% rename from agent/consul/state/graveyard_oss.go rename to agent/consul/state/graveyard_ce.go diff --git a/agent/consul/state/intention_oss.go b/agent/consul/state/intention_ce.go similarity index 100% rename from agent/consul/state/intention_oss.go rename to agent/consul/state/intention_ce.go diff --git a/agent/consul/state/kvs_oss.go b/agent/consul/state/kvs_ce.go similarity index 100% rename from agent/consul/state/kvs_oss.go rename to agent/consul/state/kvs_ce.go diff --git a/agent/consul/state/kvs_oss_test.go b/agent/consul/state/kvs_ce_test.go similarity index 100% rename from agent/consul/state/kvs_oss_test.go rename to agent/consul/state/kvs_ce_test.go diff --git a/agent/consul/state/operations_oss.go b/agent/consul/state/operations_ce.go similarity index 100% rename from agent/consul/state/operations_oss.go rename to agent/consul/state/operations_ce.go diff --git a/agent/consul/state/peering.go b/agent/consul/state/peering.go index 375f0f282445..3ecd19994653 100644 --- a/agent/consul/state/peering.go +++ b/agent/consul/state/peering.go @@ -1428,7 +1428,7 @@ func peersForServiceTxn( ) // Ensure the metadata is defaulted since we make assertions against potentially empty values below. - // In OSS this is a no-op. + // In CE this is a no-op. if entMeta == nil { entMeta = acl.DefaultEnterpriseMeta() } diff --git a/agent/consul/state/peering_oss.go b/agent/consul/state/peering_ce.go similarity index 100% rename from agent/consul/state/peering_oss.go rename to agent/consul/state/peering_ce.go diff --git a/agent/consul/state/peering_oss_test.go b/agent/consul/state/peering_ce_test.go similarity index 100% rename from agent/consul/state/peering_oss_test.go rename to agent/consul/state/peering_ce_test.go diff --git a/agent/consul/state/query_oss.go b/agent/consul/state/query_ce.go similarity index 100% rename from agent/consul/state/query_oss.go rename to agent/consul/state/query_ce.go diff --git a/agent/consul/state/schema_oss.go b/agent/consul/state/schema_ce.go similarity index 100% rename from agent/consul/state/schema_oss.go rename to agent/consul/state/schema_ce.go diff --git a/agent/consul/state/schema_oss_test.go b/agent/consul/state/schema_ce_test.go similarity index 100% rename from agent/consul/state/schema_oss_test.go rename to agent/consul/state/schema_ce_test.go diff --git a/agent/consul/state/session_oss.go b/agent/consul/state/session_ce.go similarity index 100% rename from agent/consul/state/session_oss.go rename to agent/consul/state/session_ce.go diff --git a/agent/consul/state/state_store_oss_test.go b/agent/consul/state/state_store_ce_test.go similarity index 100% rename from agent/consul/state/state_store_oss_test.go rename to agent/consul/state/state_store_ce_test.go diff --git a/agent/consul/state/usage_oss.go b/agent/consul/state/usage_ce.go similarity index 100% rename from agent/consul/state/usage_oss.go rename to agent/consul/state/usage_ce.go diff --git a/agent/consul/usagemetrics/usagemetrics_oss.go b/agent/consul/usagemetrics/usagemetrics_ce.go similarity index 100% rename from agent/consul/usagemetrics/usagemetrics_oss.go rename to agent/consul/usagemetrics/usagemetrics_ce.go diff --git a/agent/consul/usagemetrics/usagemetrics_oss_test.go b/agent/consul/usagemetrics/usagemetrics_ce_test.go similarity index 99% rename from agent/consul/usagemetrics/usagemetrics_oss_test.go rename to agent/consul/usagemetrics/usagemetrics_ce_test.go index 4b7230da2025..667737ba404a 100644 --- a/agent/consul/usagemetrics/usagemetrics_oss_test.go +++ b/agent/consul/usagemetrics/usagemetrics_ce_test.go @@ -708,7 +708,7 @@ var baseCases = map[string]testCase{ }, } -func TestUsageReporter_emitNodeUsage_OSS(t *testing.T) { +func TestUsageReporter_emitNodeUsage_CE(t *testing.T) { cases := baseCases for name, tcase := range cases { @@ -747,7 +747,7 @@ func TestUsageReporter_emitNodeUsage_OSS(t *testing.T) { } } -func TestUsageReporter_emitPeeringUsage_OSS(t *testing.T) { +func TestUsageReporter_emitPeeringUsage_CE(t *testing.T) { cases := make(map[string]testCase) for k, v := range baseCases { eg := make(map[string]metrics.GaugeValue) @@ -851,7 +851,7 @@ func TestUsageReporter_emitPeeringUsage_OSS(t *testing.T) { } } -func TestUsageReporter_emitServiceUsage_OSS(t *testing.T) { +func TestUsageReporter_emitServiceUsage_CE(t *testing.T) { cases := make(map[string]testCase) for k, v := range baseCases { eg := make(map[string]metrics.GaugeValue) @@ -1091,7 +1091,7 @@ func TestUsageReporter_emitServiceUsage_OSS(t *testing.T) { } } -func TestUsageReporter_emitKVUsage_OSS(t *testing.T) { +func TestUsageReporter_emitKVUsage_CE(t *testing.T) { cases := make(map[string]testCase) for k, v := range baseCases { eg := make(map[string]metrics.GaugeValue) diff --git a/agent/dns_oss.go b/agent/dns_ce.go similarity index 100% rename from agent/dns_oss.go rename to agent/dns_ce.go diff --git a/agent/dns_oss_test.go b/agent/dns_ce_test.go similarity index 98% rename from agent/dns_oss_test.go rename to agent/dns_ce_test.go index a394aa8718ab..774fdf601999 100644 --- a/agent/dns_oss_test.go +++ b/agent/dns_ce_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestDNS_OSS_PeeredServices(t *testing.T) { +func TestDNS_CE_PeeredServices(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } diff --git a/agent/enterprise_delegate_oss.go b/agent/enterprise_delegate_ce.go similarity index 67% rename from agent/enterprise_delegate_oss.go rename to agent/enterprise_delegate_ce.go index 876c8837afea..399848982576 100644 --- a/agent/enterprise_delegate_oss.go +++ b/agent/enterprise_delegate_ce.go @@ -3,5 +3,5 @@ package agent -// enterpriseDelegate has no functions in OSS +// enterpriseDelegate has no functions in CE type enterpriseDelegate interface{} diff --git a/agent/http_oss.go b/agent/http_ce.go similarity index 99% rename from agent/http_oss.go rename to agent/http_ce.go index 94eb575c36e2..04c14b7f3204 100644 --- a/agent/http_oss.go +++ b/agent/http_ce.go @@ -36,7 +36,7 @@ func (s *HTTPHandlers) validateEnterpriseIntentionPartition(logName, partition s return nil } - // No special handling for wildcard namespaces as they are pointless in OSS. + // No special handling for wildcard namespaces as they are pointless in CE. return HTTPError{ StatusCode: http.StatusBadRequest, @@ -51,7 +51,7 @@ func (s *HTTPHandlers) validateEnterpriseIntentionNamespace(logName, ns string, return nil } - // No special handling for wildcard namespaces as they are pointless in OSS. + // No special handling for wildcard namespaces as they are pointless in CE. return HTTPError{ StatusCode: http.StatusBadRequest, diff --git a/agent/http_oss_test.go b/agent/http_ce_test.go similarity index 97% rename from agent/http_oss_test.go rename to agent/http_ce_test.go index f433b3b04a9b..34b2ad9cdf4c 100644 --- a/agent/http_oss_test.go +++ b/agent/http_ce_test.go @@ -59,7 +59,7 @@ func newHttpClient(timeout time.Duration) *http.Client { } } -func TestHTTPAPI_MethodNotAllowed_OSS(t *testing.T) { +func TestHTTPAPI_MethodNotAllowed_CE(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } @@ -127,7 +127,7 @@ func TestHTTPAPI_MethodNotAllowed_OSS(t *testing.T) { } } -func TestHTTPAPI_OptionMethod_OSS(t *testing.T) { +func TestHTTPAPI_OptionMethod_CE(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } @@ -168,7 +168,7 @@ func TestHTTPAPI_OptionMethod_OSS(t *testing.T) { } } -func TestHTTPAPI_AllowedNets_OSS(t *testing.T) { +func TestHTTPAPI_AllowedNets_CE(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } diff --git a/agent/intentions_endpoint_oss_test.go b/agent/intentions_endpoint_ce_test.go similarity index 95% rename from agent/intentions_endpoint_oss_test.go rename to agent/intentions_endpoint_ce_test.go index eb04d978bdee..74163f9fdddd 100644 --- a/agent/intentions_endpoint_oss_test.go +++ b/agent/intentions_endpoint_ce_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestOSS_IntentionsCreate_failure(t *testing.T) { +func TestCE_IntentionsCreate_failure(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } diff --git a/agent/operator_endpoint_oss.go b/agent/operator_endpoint_ce.go similarity index 97% rename from agent/operator_endpoint_oss.go rename to agent/operator_endpoint_ce.go index 9367cc367a6f..e31dacae4605 100644 --- a/agent/operator_endpoint_oss.go +++ b/agent/operator_endpoint_ce.go @@ -9,7 +9,7 @@ import ( ) func autopilotToAPIServerEnterprise(_ *autopilot.ServerState, _ *api.AutopilotServer) { - // noop in oss + // noop in ce } func autopilotToAPIStateEnterprise(state *autopilot.State, apiState *api.AutopilotState) { diff --git a/agent/peering_endpoint.go b/agent/peering_endpoint.go index f625e9c78ec3..42ae160e53f5 100644 --- a/agent/peering_endpoint.go +++ b/agent/peering_endpoint.go @@ -75,7 +75,7 @@ func (s *HTTPHandlers) peeringRead(resp http.ResponseWriter, req *http.Request, return result.Peering.ToAPI(), nil } -// PeeringList fetches all peerings in the datacenter in OSS or in a given partition in Consul Enterprise. +// PeeringList fetches all peerings in the datacenter in CE or in a given partition in Consul Enterprise. func (s *HTTPHandlers) PeeringList(resp http.ResponseWriter, req *http.Request) (interface{}, error) { var entMeta acl.EnterpriseMeta if err := s.parseEntMetaPartition(req, &entMeta); err != nil { diff --git a/agent/peering_endpoint_oss_test.go b/agent/peering_endpoint_ce_test.go similarity index 85% rename from agent/peering_endpoint_oss_test.go rename to agent/peering_endpoint_ce_test.go index 5e00b05767f0..2019791ed80c 100644 --- a/agent/peering_endpoint_oss_test.go +++ b/agent/peering_endpoint_ce_test.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/consul/testrpc" ) -func TestHTTP_Peering_GenerateToken_OSS_Failure(t *testing.T) { +func TestHTTP_Peering_GenerateToken_CE_Failure(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } @@ -27,7 +27,7 @@ func TestHTTP_Peering_GenerateToken_OSS_Failure(t *testing.T) { a := NewTestAgent(t, "") testrpc.WaitForTestAgent(t, a.RPC, "dc1") - t.Run("Doesn't allow partitions in OSS HTTP requests", func(t *testing.T) { + t.Run("Doesn't allow partitions in CE HTTP requests", func(t *testing.T) { reqBody := &pbpeering.GenerateTokenRequest{ PeerName: "peering-a", } @@ -44,7 +44,7 @@ func TestHTTP_Peering_GenerateToken_OSS_Failure(t *testing.T) { }) } -func TestHTTP_PeeringEndpoint_OSS_Failure(t *testing.T) { +func TestHTTP_PeeringEndpoint_CE_Failure(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } @@ -54,7 +54,7 @@ func TestHTTP_PeeringEndpoint_OSS_Failure(t *testing.T) { a := NewTestAgent(t, "") testrpc.WaitForTestAgent(t, a.RPC, "dc1") - t.Run("Doesn't allow partitions on PeeringEndpoint in OSS HTTP requests", func(t *testing.T) { + t.Run("Doesn't allow partitions on PeeringEndpoint in CE HTTP requests", func(t *testing.T) { req, err := http.NewRequest("GET", "/v1/peering/foo?partition=foo", nil) require.NoError(t, err) resp := httptest.NewRecorder() diff --git a/agent/proxycfg-glue/intentions_oss.go b/agent/proxycfg-glue/intentions_ce.go similarity index 100% rename from agent/proxycfg-glue/intentions_oss.go rename to agent/proxycfg-glue/intentions_ce.go diff --git a/agent/proxycfg/data_sources_oss.go b/agent/proxycfg/data_sources_ce.go similarity index 100% rename from agent/proxycfg/data_sources_oss.go rename to agent/proxycfg/data_sources_ce.go diff --git a/agent/proxycfg/mesh_gateway_oss.go b/agent/proxycfg/mesh_gateway_ce.go similarity index 100% rename from agent/proxycfg/mesh_gateway_oss.go rename to agent/proxycfg/mesh_gateway_ce.go diff --git a/agent/proxycfg/naming.go b/agent/proxycfg/naming.go index 0ab355160d3f..ec8a3d5992ac 100644 --- a/agent/proxycfg/naming.go +++ b/agent/proxycfg/naming.go @@ -150,7 +150,7 @@ func ParseUpstreamIDString(input string) (typ, dc, name string, meta *acl.Enterp // This should be used for any situation where we generate identifiers in Envoy // xDS structures for this upstream. // -// This will ensure that generated identifiers for the same thing in OSS and +// This will ensure that generated identifiers for the same thing in CE and // Enterprise render the same and omit default namespaces and partitions. func (u UpstreamID) EnvoyID() string { name := u.enterpriseIdentifierPrefix() + u.Name diff --git a/agent/proxycfg/naming_oss.go b/agent/proxycfg/naming_ce.go similarity index 100% rename from agent/proxycfg/naming_oss.go rename to agent/proxycfg/naming_ce.go diff --git a/agent/proxycfg/snapshot.go b/agent/proxycfg/snapshot.go index 5cf99b027fa6..f814583f42ec 100644 --- a/agent/proxycfg/snapshot.go +++ b/agent/proxycfg/snapshot.go @@ -62,7 +62,7 @@ type ConfigSnapshotUpstreams struct { // gateway endpoints. // // Note that the string form of GatewayKey is used as the key so empty - // fields can be normalized in OSS. + // fields can be normalized in CE. // GatewayKey.String() -> structs.CheckServiceNodes WatchedLocalGWEndpoints watch.Map[string, structs.CheckServiceNodes] diff --git a/agent/proxycfg/state_oss_test.go b/agent/proxycfg/state_ce_test.go similarity index 100% rename from agent/proxycfg/state_oss_test.go rename to agent/proxycfg/state_ce_test.go diff --git a/agent/proxycfg/state_test.go b/agent/proxycfg/state_test.go index f4998e1309da..19b50a6600f4 100644 --- a/agent/proxycfg/state_test.go +++ b/agent/proxycfg/state_test.go @@ -453,7 +453,7 @@ func TestState_WatchesAndUpdates(t *testing.T) { indexedRoots, issuedCert := TestCerts(t) peerTrustBundles := TestPeerTrustBundles(t) - // Used to account for differences in OSS/ent implementations of ServiceID.String() + // Used to account for differences in ce/ent implementations of ServiceID.String() var ( db = structs.NewServiceName("db", nil) billing = structs.NewServiceName("billing", nil) diff --git a/agent/proxycfg/testing_oss.go b/agent/proxycfg/testing_ce.go similarity index 100% rename from agent/proxycfg/testing_oss.go rename to agent/proxycfg/testing_ce.go diff --git a/agent/proxycfg/testing_ingress_gateway.go b/agent/proxycfg/testing_ingress_gateway.go index fbaa6485c702..c8218485e73c 100644 --- a/agent/proxycfg/testing_ingress_gateway.go +++ b/agent/proxycfg/testing_ingress_gateway.go @@ -1069,10 +1069,10 @@ func TestConfigSnapshotIngressGatewayWithChain( webUpstream := structs.Upstream{ DestinationName: "web", // We use empty not default here because of the way upstream identifiers - // vary between OSS and Enterprise currently causing test conflicts. In + // vary between CE and Enterprise currently causing test conflicts. In // real life `proxycfg` always sets ingress upstream namespaces to // `NamespaceOrDefault` which shouldn't matter because we should be - // consistent within a single binary it's just inconvenient if OSS and + // consistent within a single binary it's just inconvenient if CE and // enterprise tests generate different output. DestinationNamespace: webEntMeta.NamespaceOrEmpty(), DestinationPartition: webEntMeta.PartitionOrEmpty(), diff --git a/agent/rpc/peering/service.go b/agent/rpc/peering/service.go index 445bc6ef7386..c22fb27abbdb 100644 --- a/agent/rpc/peering/service.go +++ b/agent/rpc/peering/service.go @@ -271,7 +271,7 @@ func (s *Server) GenerateToken( Name: req.PeerName, Meta: req.Meta, - // PartitionOrEmpty is used to avoid writing "default" in OSS. + // PartitionOrEmpty is used to avoid writing "default" in CE. Partition: entMeta.PartitionOrEmpty(), } } else { @@ -445,7 +445,7 @@ func (s *Server) Establish( // while the original connection is still active. // State: pbpeering.PeeringState_ESTABLISHING, - // PartitionOrEmpty is used to avoid writing "default" in OSS. + // PartitionOrEmpty is used to avoid writing "default" in CE. Partition: entMeta.PartitionOrEmpty(), Remote: &pbpeering.RemoteInfo{ Partition: tok.Remote.Partition, @@ -932,7 +932,7 @@ func (s *Server) PeeringDelete(ctx context.Context, req *pbpeering.PeeringDelete PeerServerAddresses: existing.PeerServerAddresses, DeletedAt: structs.TimeToProto(time.Now().UTC()), - // PartitionOrEmpty is used to avoid writing "default" in OSS. + // PartitionOrEmpty is used to avoid writing "default" in CE. Partition: entMeta.PartitionOrEmpty(), }, } diff --git a/agent/rpc/peering/service_oss_test.go b/agent/rpc/peering/service_ce_test.go similarity index 100% rename from agent/rpc/peering/service_oss_test.go rename to agent/rpc/peering/service_ce_test.go diff --git a/agent/rpc/peering/testutil_oss_test.go b/agent/rpc/peering/testutil_ce_test.go similarity index 100% rename from agent/rpc/peering/testutil_oss_test.go rename to agent/rpc/peering/testutil_ce_test.go diff --git a/agent/rpcclient/health/view_test.go b/agent/rpcclient/health/view_test.go index f1d2cd0869d3..982e5dbf3fc7 100644 --- a/agent/rpcclient/health/view_test.go +++ b/agent/rpcclient/health/view_test.go @@ -718,7 +718,7 @@ func newNewSnapshotToFollowEvent() *pbsubscribe.Event { } // getNamespace returns a namespace if namespace support exists, otherwise -// returns the empty string. It allows the same tests to work in both oss and ent +// returns the empty string. It allows the same tests to work in both ce and ent // without duplicating the tests. func getNamespace(ns string) string { meta := structs.NewEnterpriseMetaInDefaultPartition(ns) diff --git a/agent/setup.go b/agent/setup.go index 6f0f2538a6d3..d0115b1b97fa 100644 --- a/agent/setup.go +++ b/agent/setup.go @@ -345,7 +345,7 @@ func getPrometheusDefs(cfg lib.TelemetryConfig, isServer bool) ([]prometheus.Gau consul.LeaderSummaries, consul.PreparedQuerySummaries, consul.RPCSummaries, - consul.SegmentOSSSummaries, + consul.SegmentCESummaries, consul.SessionSummaries, consul.SessionEndpointSummaries, consul.TxnSummaries, diff --git a/agent/setup_oss.go b/agent/setup_ce.go similarity index 100% rename from agent/setup_oss.go rename to agent/setup_ce.go diff --git a/agent/structs/acl_oss.go b/agent/structs/acl_ce.go similarity index 100% rename from agent/structs/acl_oss.go rename to agent/structs/acl_ce.go diff --git a/agent/structs/autopilot_oss.go b/agent/structs/autopilot_ce.go similarity index 100% rename from agent/structs/autopilot_oss.go rename to agent/structs/autopilot_ce.go diff --git a/agent/structs/catalog_oss.go b/agent/structs/catalog_ce.go similarity index 100% rename from agent/structs/catalog_oss.go rename to agent/structs/catalog_ce.go diff --git a/agent/structs/config_entry_oss.go b/agent/structs/config_entry_ce.go similarity index 100% rename from agent/structs/config_entry_oss.go rename to agent/structs/config_entry_ce.go diff --git a/agent/structs/config_entry_oss_test.go b/agent/structs/config_entry_ce_test.go similarity index 97% rename from agent/structs/config_entry_oss_test.go rename to agent/structs/config_entry_ce_test.go index fbf0a9ebd3d3..ed6fedc4e673 100644 --- a/agent/structs/config_entry_oss_test.go +++ b/agent/structs/config_entry_ce_test.go @@ -4,12 +4,13 @@ package structs import ( + "testing" + "github.com/hashicorp/hcl" "github.com/stretchr/testify/require" - "testing" ) -func TestDecodeConfigEntry_OSS(t *testing.T) { +func TestDecodeConfigEntry_CE(t *testing.T) { for _, tc := range []struct { name string diff --git a/agent/structs/config_entry_discoverychain_oss.go b/agent/structs/config_entry_discoverychain_ce.go similarity index 100% rename from agent/structs/config_entry_discoverychain_oss.go rename to agent/structs/config_entry_discoverychain_ce.go diff --git a/agent/structs/config_entry_discoverychain_oss_test.go b/agent/structs/config_entry_discoverychain_ce_test.go similarity index 90% rename from agent/structs/config_entry_discoverychain_oss_test.go rename to agent/structs/config_entry_discoverychain_ce_test.go index 9f962c8bd41b..c58448771589 100644 --- a/agent/structs/config_entry_discoverychain_oss_test.go +++ b/agent/structs/config_entry_discoverychain_ce_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestServiceResolverConfigEntry_OSS(t *testing.T) { +func TestServiceResolverConfigEntry_CE(t *testing.T) { type testcase struct { name string entry *ServiceResolverConfigEntry @@ -22,7 +22,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { cases := []testcase{ { - name: "failover with a namespace on OSS", + name: "failover with a namespace on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -36,7 +36,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Bad Failover["*"]: Setting Namespace requires Consul Enterprise`, }, { - name: "failover Targets cannot set Namespace on OSS", + name: "failover Targets cannot set Namespace on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -49,7 +49,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Bad Failover["*"].Targets[0]: Setting Namespace requires Consul Enterprise`, }, { - name: "failover Targets cannot set Partition on OSS", + name: "failover Targets cannot set Partition on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -62,7 +62,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Bad Failover["*"].Targets[0]: Setting Partition requires Consul Enterprise`, }, { - name: "setting failover Namespace on OSS", + name: "setting failover Namespace on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -73,7 +73,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Bad Failover["*"]: Setting Namespace requires Consul Enterprise`, }, { - name: "setting redirect Namespace on OSS", + name: "setting redirect Namespace on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -84,7 +84,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Redirect: Setting Namespace requires Consul Enterprise`, }, { - name: "setting redirect Partition on OSS", + name: "setting redirect Partition on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", diff --git a/agent/structs/config_entry_export_oss_test.go b/agent/structs/config_entry_exports_ce_test.go similarity index 92% rename from agent/structs/config_entry_export_oss_test.go rename to agent/structs/config_entry_exports_ce_test.go index 19ce3d05f696..6a66d2b31947 100644 --- a/agent/structs/config_entry_export_oss_test.go +++ b/agent/structs/config_entry_exports_ce_test.go @@ -7,9 +7,9 @@ import ( "testing" ) -func TestExportedServicesConfigEntry_OSS(t *testing.T) { +func TestExportedServicesConfigEntry_CE(t *testing.T) { cases := map[string]configEntryTestcase{ - "normalize: noop in oss": { + "normalize: noop in ce": { entry: &ExportedServicesConfigEntry{ Name: "default", Services: []ExportedService{ diff --git a/agent/structs/config_entry_gateways_test.go b/agent/structs/config_entry_gateways_test.go index c494979c29a7..e65d9167eba0 100644 --- a/agent/structs/config_entry_gateways_test.go +++ b/agent/structs/config_entry_gateways_test.go @@ -521,7 +521,7 @@ func TestIngressGatewayConfigEntry(t *testing.T) { }, }, // Match only the last part of the exected error because the service name - // differs between Ent and OSS default/default/web vs web + // differs between Ent and CE default/default/web vs web validateErr: "cannot be added multiple times (listener on port 1111)", }, "TLS.SDS kitchen sink": { @@ -865,7 +865,7 @@ func TestIngressGatewayConfigEntry(t *testing.T) { }, }, // Note we don't assert the last part `(service \"*\" on listener on port 1111)` - // since the service name is normalized differently on OSS and Ent + // since the service name is normalized differently on CE and Ent validateErr: "A service specifying TLS.SDS.CertResource must have at least one item in Hosts", }, "TLS.SDS at service level needs a cluster from somewhere": { @@ -892,7 +892,7 @@ func TestIngressGatewayConfigEntry(t *testing.T) { }, }, // Note we don't assert the last part `(service \"foo\" on listener on port 1111)` - // since the service name is normalized differently on OSS and Ent + // since the service name is normalized differently on CE and Ent validateErr: "TLS.SDS.ClusterName is required if CertResource is set", }, } diff --git a/agent/structs/config_entry_intentions_oss.go b/agent/structs/config_entry_intentions_ce.go similarity index 100% rename from agent/structs/config_entry_intentions_oss.go rename to agent/structs/config_entry_intentions_ce.go diff --git a/agent/structs/config_entry_mesh_oss.go b/agent/structs/config_entry_mesh_ce.go similarity index 100% rename from agent/structs/config_entry_mesh_oss.go rename to agent/structs/config_entry_mesh_ce.go diff --git a/agent/structs/config_entry_test.go b/agent/structs/config_entry_test.go index 88243f01e723..e70fd63069a0 100644 --- a/agent/structs/config_entry_test.go +++ b/agent/structs/config_entry_test.go @@ -3168,7 +3168,7 @@ func testConfigEntryNormalizeAndValidate(t *testing.T, cases map[string]configEn } if tc.expectUnchanged { - // EnterpriseMeta.Normalize behaves differently in Ent and OSS which + // EnterpriseMeta.Normalize behaves differently in Ent and CE which // causes an exact comparison to fail. It's still useful to assert that // nothing else changes though during Normalize. So we ignore // EnterpriseMeta Defaults. diff --git a/agent/structs/connect_oss.go b/agent/structs/connect_ce.go similarity index 100% rename from agent/structs/connect_oss.go rename to agent/structs/connect_ce.go diff --git a/agent/structs/connect_proxy_config_oss.go b/agent/structs/connect_proxy_config_ce.go similarity index 100% rename from agent/structs/connect_proxy_config_oss.go rename to agent/structs/connect_proxy_config_ce.go diff --git a/agent/structs/discovery_chain_oss.go b/agent/structs/discovery_chain_ce.go similarity index 100% rename from agent/structs/discovery_chain_oss.go rename to agent/structs/discovery_chain_ce.go diff --git a/agent/structs/intention_oss.go b/agent/structs/intention_ce.go similarity index 90% rename from agent/structs/intention_oss.go rename to agent/structs/intention_ce.go index e35b9b5b3d14..fbae3b409976 100644 --- a/agent/structs/intention_oss.go +++ b/agent/structs/intention_ce.go @@ -28,21 +28,21 @@ func (e *IntentionQueryExact) DestinationEnterpriseMeta() *acl.EnterpriseMeta { } // FillAuthzContext can fill in an acl.AuthorizerContext object to setup -// extra parameters for ACL enforcement. In OSS there is currently nothing +// extra parameters for ACL enforcement. In CE there is currently nothing // extra to be done. func (_ *Intention) FillAuthzContext(_ *acl.AuthorizerContext, _ bool) { // do nothing } // FillAuthzContext can fill in an acl.AuthorizerContext object to setup -// extra parameters for ACL enforcement. In OSS there is currently nothing +// extra parameters for ACL enforcement. In CE there is currently nothing // extra to be done. func (_ *IntentionMatchEntry) FillAuthzContext(_ *acl.AuthorizerContext) { // do nothing } // FillAuthzContext can fill in an acl.AuthorizerContext object to setup -// extra parameters for ACL enforcement. In OSS there is currently nothing +// extra parameters for ACL enforcement. In CE there is currently nothing // extra to be done. func (_ *IntentionQueryCheck) FillAuthzContext(_ *acl.AuthorizerContext) { // do nothing diff --git a/agent/structs/sanitize_oss.go b/agent/structs/sanitize_ce.go similarity index 100% rename from agent/structs/sanitize_oss.go rename to agent/structs/sanitize_ce.go diff --git a/agent/structs/structs_oss.go b/agent/structs/structs_ce.go similarity index 99% rename from agent/structs/structs_oss.go rename to agent/structs/structs_ce.go index 0dcd9d77b02a..dcb1641aa0a5 100644 --- a/agent/structs/structs_oss.go +++ b/agent/structs/structs_ce.go @@ -81,13 +81,13 @@ func (_ *RegisterRequest) GetEnterpriseMeta() *acl.EnterpriseMeta { return nil } -// OSS Stub +// CE Stub func (op *TxnNodeOp) FillAuthzContext(ctx *acl.AuthorizerContext) {} -// OSS Stub +// CE Stub func (_ *TxnServiceOp) FillAuthzContext(_ *acl.AuthorizerContext) {} -// OSS Stub +// CE Stub func (_ *TxnCheckOp) FillAuthzContext(_ *acl.AuthorizerContext) {} func NodeNameString(node string, _ *acl.EnterpriseMeta) string { diff --git a/agent/structs/structs_oss_test.go b/agent/structs/structs_ce_test.go similarity index 100% rename from agent/structs/structs_oss_test.go rename to agent/structs/structs_ce_test.go diff --git a/agent/token/store_oss.go b/agent/token/store_ce.go similarity index 91% rename from agent/token/store_oss.go rename to agent/token/store_ce.go index ef8b5336d2b3..5cc2b011765f 100644 --- a/agent/token/store_oss.go +++ b/agent/token/store_ce.go @@ -10,7 +10,7 @@ type EnterpriseConfig struct { type enterpriseTokens struct { } -// enterpriseAgentToken OSS stub +// enterpriseAgentToken CE stub func (t *Store) enterpriseAgentToken() string { return "" } diff --git a/agent/ui_endpoint_oss_test.go b/agent/ui_endpoint_ce_test.go similarity index 100% rename from agent/ui_endpoint_oss_test.go rename to agent/ui_endpoint_ce_test.go diff --git a/agent/ui_endpoint_test.go b/agent/ui_endpoint_test.go index 43e22a829293..5dd48bc42705 100644 --- a/agent/ui_endpoint_test.go +++ b/agent/ui_endpoint_test.go @@ -1112,7 +1112,7 @@ func TestUIGatewayServiceNodes_Ingress(t *testing.T) { require.Nil(t, err) assertIndex(t, resp) - // Construct expected addresses so that differences between OSS/Ent are + // Construct expected addresses so that differences between CE/Ent are // handled by code. We specifically don't include the trailing DNS . here as // we are constructing what we are expecting, not the actual value webDNS := serviceIngressDNSName("web", "dc1", "consul", structs.DefaultEnterpriseMetaInDefaultPartition()) diff --git a/agent/xds/listeners_ingress.go b/agent/xds/listeners_ingress.go index 2b9be1de1b8f..77741e396228 100644 --- a/agent/xds/listeners_ingress.go +++ b/agent/xds/listeners_ingress.go @@ -272,7 +272,7 @@ func routeNameForUpstream(l structs.IngressListener, s structs.IngressService) s // Return a specific route for this service as it needs a custom FilterChain // to serve its custom cert so we should attach its routes to a separate Route - // too. We need this to be consistent between OSS and Enterprise to avoid xDS + // too. We need this to be consistent between CE and Enterprise to avoid xDS // config golden files in tests conflicting so we can't use ServiceID.String() // which normalizes to included all identifiers in Enterprise. sn := s.ToServiceName() diff --git a/agent/xds/resources_oss_test.go b/agent/xds/resources_ce_test.go similarity index 100% rename from agent/xds/resources_oss_test.go rename to agent/xds/resources_ce_test.go diff --git a/agent/xds/server_oss.go b/agent/xds/server_ce.go similarity index 100% rename from agent/xds/server_oss.go rename to agent/xds/server_ce.go diff --git a/agent/xds/serverless_plugin_oss_test.go b/agent/xds/serverless_plugin_ce_test.go similarity index 100% rename from agent/xds/serverless_plugin_oss_test.go rename to agent/xds/serverless_plugin_ce_test.go diff --git a/agent/xds/xdscommon/xdscommon_oss_test.go b/agent/xds/xdscommon/xdscommon_ce_test.go similarity index 100% rename from agent/xds/xdscommon/xdscommon_oss_test.go rename to agent/xds/xdscommon/xdscommon_ce_test.go diff --git a/api/oss_test.go b/api/ce_test.go similarity index 79% rename from api/oss_test.go rename to api/ce_test.go index e4e266a38924..03ff93c99477 100644 --- a/api/oss_test.go +++ b/api/ce_test.go @@ -3,8 +3,8 @@ package api -// The following defaults return "default" in enterprise and "" in OSS. +// The following defaults return "default" in enterprise and "" in CE. // This constant is useful when a default value is needed for an -// operation that will reject non-empty values in OSS. +// operation that will reject non-empty values in CE. const defaultNamespace = "" const defaultPartition = "" diff --git a/api/config_entry_gateways_test.go b/api/config_entry_gateways_test.go index 0602be24fe51..113ddbd78a9d 100644 --- a/api/config_entry_gateways_test.go +++ b/api/config_entry_gateways_test.go @@ -165,7 +165,7 @@ func TestAPI_ConfigEntries_IngressGateway(t *testing.T) { require.Len(t, readIngress.Listeners, 1) require.Len(t, readIngress.Listeners[0].Services, 1) - // Set namespace and partition to blank so that OSS and ent can utilize the same tests + // Set namespace and partition to blank so that CE and ent can utilize the same tests readIngress.Listeners[0].Services[0].Namespace = "" readIngress.Listeners[0].Services[0].Partition = "" @@ -180,7 +180,7 @@ func TestAPI_ConfigEntries_IngressGateway(t *testing.T) { require.Equal(t, uint32(0), *readIngress.Defaults.MaxConcurrentRequests) require.Len(t, readIngress.Listeners, 1) require.Len(t, readIngress.Listeners[0].Services, 1) - // Set namespace and partition to blank so that OSS and ent can utilize the same tests + // Set namespace and partition to blank so that CE and ent can utilize the same tests readIngress.Listeners[0].Services[0].Namespace = "" readIngress.Listeners[0].Services[0].Partition = "" @@ -306,7 +306,7 @@ func TestAPI_ConfigEntries_TerminatingGateway(t *testing.T) { require.Equal(t, terminating1.Kind, readTerminating.Kind) require.Equal(t, terminating1.Name, readTerminating.Name) require.Len(t, readTerminating.Services, 1) - // Set namespace to blank so that OSS and ent can utilize the same tests + // Set namespace to blank so that CE and ent can utilize the same tests readTerminating.Services[0].Namespace = "" require.Equal(t, terminating1.Services, readTerminating.Services) @@ -316,7 +316,7 @@ func TestAPI_ConfigEntries_TerminatingGateway(t *testing.T) { require.Equal(t, terminating2.Kind, readTerminating.Kind) require.Equal(t, terminating2.Name, readTerminating.Name) require.Len(t, readTerminating.Services, 1) - // Set namespace to blank so that OSS and ent can utilize the same tests + // Set namespace to blank so that CE and ent can utilize the same tests readTerminating.Services[0].Namespace = "" require.Equal(t, terminating2.Services, readTerminating.Services) diff --git a/build-support/functions/00-vars.sh b/build-support/functions/00-vars.sh index a50aa3f23f43..9007057994f7 100644 --- a/build-support/functions/00-vars.sh +++ b/build-support/functions/00-vars.sh @@ -41,4 +41,5 @@ else SED_EXT="-r" fi +# TODO(spatel): CE refactor CONSUL_BINARY_TYPE=oss diff --git a/build-support/functions/10-util.sh b/build-support/functions/10-util.sh index 9b380dcbb1f8..678c5d18ba67 100644 --- a/build-support/functions/10-util.sh +++ b/build-support/functions/10-util.sh @@ -233,7 +233,7 @@ function get_version { local vers="$VERSION" if test -z "$vers" then - # parse the OSS version from version.go + # parse the CE version from version.go vers="$(parse_version ${1} ${2} ${3})" fi @@ -634,6 +634,7 @@ function ui_logo_type { then echo "enterprise" else + # TODO(spatel): CE refactor echo "oss" fi return 0 diff --git a/build-support/functions/20-build.sh b/build-support/functions/20-build.sh index dee61aea1620..fd0e46ffd609 100644 --- a/build-support/functions/20-build.sh +++ b/build-support/functions/20-build.sh @@ -89,6 +89,7 @@ function build_ui { commit_year=$(git show -s --format=%cd --date=format:%Y HEAD) fi + # TODO(spatel): CE refactor local logo_type="${CONSUL_BINARY_TYPE}" if test "$logo_type" != "oss" then diff --git a/command/acl/authmethod/create/authmethod_create_oss.go b/command/acl/authmethod/create/authmethod_create_ce.go similarity index 100% rename from command/acl/authmethod/create/authmethod_create_oss.go rename to command/acl/authmethod/create/authmethod_create_ce.go diff --git a/command/acl/authmethod/update/authmethod_update_oss.go b/command/acl/authmethod/update/authmethod_update_ce.go similarity index 100% rename from command/acl/authmethod/update/authmethod_update_oss.go rename to command/acl/authmethod/update/authmethod_update_ce.go diff --git a/command/acl/token/formatter_oss_test.go b/command/acl/token/formatter_ce_test.go similarity index 70% rename from command/acl/token/formatter_oss_test.go rename to command/acl/token/formatter_ce_test.go index d825a5ee350a..6e82c1bc2024 100644 --- a/command/acl/token/formatter_oss_test.go +++ b/command/acl/token/formatter_ce_test.go @@ -8,5 +8,5 @@ import ( ) func TestFormatTokenExpanded(t *testing.T) { - testFormatTokenExpanded(t, "FormatTokenExpanded/oss") + testFormatTokenExpanded(t, "FormatTokenExpanded/ce") } diff --git a/command/acl/token/testdata/FormatTokenExpanded/oss/basic.json.golden b/command/acl/token/testdata/FormatTokenExpanded/ce/basic.json.golden similarity index 100% rename from command/acl/token/testdata/FormatTokenExpanded/oss/basic.json.golden rename to command/acl/token/testdata/FormatTokenExpanded/ce/basic.json.golden diff --git a/command/acl/token/testdata/FormatTokenExpanded/oss/basic.pretty-meta.golden b/command/acl/token/testdata/FormatTokenExpanded/ce/basic.pretty-meta.golden similarity index 100% rename from command/acl/token/testdata/FormatTokenExpanded/oss/basic.pretty-meta.golden rename to command/acl/token/testdata/FormatTokenExpanded/ce/basic.pretty-meta.golden diff --git a/command/acl/token/testdata/FormatTokenExpanded/oss/basic.pretty.golden b/command/acl/token/testdata/FormatTokenExpanded/ce/basic.pretty.golden similarity index 100% rename from command/acl/token/testdata/FormatTokenExpanded/oss/basic.pretty.golden rename to command/acl/token/testdata/FormatTokenExpanded/ce/basic.pretty.golden diff --git a/command/acl/token/testdata/FormatTokenExpanded/oss/complex.json.golden b/command/acl/token/testdata/FormatTokenExpanded/ce/complex.json.golden similarity index 100% rename from command/acl/token/testdata/FormatTokenExpanded/oss/complex.json.golden rename to command/acl/token/testdata/FormatTokenExpanded/ce/complex.json.golden diff --git a/command/acl/token/testdata/FormatTokenExpanded/oss/complex.pretty-meta.golden b/command/acl/token/testdata/FormatTokenExpanded/ce/complex.pretty-meta.golden similarity index 100% rename from command/acl/token/testdata/FormatTokenExpanded/oss/complex.pretty-meta.golden rename to command/acl/token/testdata/FormatTokenExpanded/ce/complex.pretty-meta.golden diff --git a/command/acl/token/testdata/FormatTokenExpanded/oss/complex.pretty.golden b/command/acl/token/testdata/FormatTokenExpanded/ce/complex.pretty.golden similarity index 100% rename from command/acl/token/testdata/FormatTokenExpanded/oss/complex.pretty.golden rename to command/acl/token/testdata/FormatTokenExpanded/ce/complex.pretty.golden diff --git a/command/catalog/helpers_oss.go b/command/catalog/helpers_ce.go similarity index 100% rename from command/catalog/helpers_oss.go rename to command/catalog/helpers_ce.go diff --git a/command/connect/envoy/bootstrap_config_test.go b/command/connect/envoy/bootstrap_config_test.go index 9e8038ae0365..8c6bf3288edd 100644 --- a/command/connect/envoy/bootstrap_config_test.go +++ b/command/connect/envoy/bootstrap_config_test.go @@ -1431,7 +1431,7 @@ func TestConsulTagSpecifiers(t *testing.T) { }, }, { - name: "tcp listener no namespace or partition (OSS)", + name: "tcp listener no namespace or partition (CE)", stat: "tcp.upstream.db.dc1.downstream_cx_total", expect: map[string][]string{ "consul.upstream.datacenter": {"db.dc1.", "dc1"}, @@ -1441,7 +1441,7 @@ func TestConsulTagSpecifiers(t *testing.T) { }, }, { - name: "tcp peered listener no namespace or partition (OSS)", + name: "tcp peered listener no namespace or partition (CE)", stat: "tcp.upstream_peered.db.cloudpeer.downstream_cx_total", expect: map[string][]string{ "consul.upstream.peer": {"db.cloudpeer.", "cloudpeer"}, @@ -1469,7 +1469,7 @@ func TestConsulTagSpecifiers(t *testing.T) { }, }, { - name: "http listener no namespace or partition (OSS)", + name: "http listener no namespace or partition (CE)", stat: "http.upstream.web.dc1.downstream_cx_total", expect: map[string][]string{ "consul.upstream.datacenter": {"web.dc1.", "dc1"}, @@ -1479,7 +1479,7 @@ func TestConsulTagSpecifiers(t *testing.T) { }, }, { - name: "http peered listener no namespace or partition (OSS)", + name: "http peered listener no namespace or partition (CE)", stat: "http.upstream_peered.web.cloudpeer.downstream_cx_total", expect: map[string][]string{ "consul.upstream.peer": {"web.cloudpeer.", "cloudpeer"}, diff --git a/command/connect/envoy/envoy_oss_test.go b/command/connect/envoy/envoy_ce_test.go similarity index 100% rename from command/connect/envoy/envoy_oss_test.go rename to command/connect/envoy/envoy_ce_test.go diff --git a/command/login/login_oss.go b/command/login/login_ce.go similarity index 100% rename from command/login/login_oss.go rename to command/login/login_ce.go diff --git a/command/operator/autopilot/state/operator_autopilot_state_test.go b/command/operator/autopilot/state/operator_autopilot_state_test.go index 00484974d531..5a6662763650 100644 --- a/command/operator/autopilot/state/operator_autopilot_state_test.go +++ b/command/operator/autopilot/state/operator_autopilot_state_test.go @@ -104,7 +104,7 @@ func TestStateCommand_JSON(t *testing.T) { func TestStateCommand_Formatter(t *testing.T) { cases := []string{ - "oss", + "ce", "enterprise", } diff --git a/command/operator/autopilot/state/testdata/oss/json.golden b/command/operator/autopilot/state/testdata/ce/json.golden similarity index 100% rename from command/operator/autopilot/state/testdata/oss/json.golden rename to command/operator/autopilot/state/testdata/ce/json.golden diff --git a/command/operator/autopilot/state/testdata/oss/pretty.golden b/command/operator/autopilot/state/testdata/ce/pretty.golden similarity index 100% rename from command/operator/autopilot/state/testdata/oss/pretty.golden rename to command/operator/autopilot/state/testdata/ce/pretty.golden diff --git a/command/operator/autopilot/state/testdata/oss/state.json b/command/operator/autopilot/state/testdata/ce/state.json similarity index 100% rename from command/operator/autopilot/state/testdata/oss/state.json rename to command/operator/autopilot/state/testdata/ce/state.json diff --git a/command/registry_oss.go b/command/registry_ce.go similarity index 100% rename from command/registry_oss.go rename to command/registry_ce.go diff --git a/docs/config/checklist-adding-config-fields.md b/docs/config/checklist-adding-config-fields.md index 7a47eb84159f..f90fb448595f 100644 --- a/docs/config/checklist-adding-config-fields.md +++ b/docs/config/checklist-adding-config-fields.md @@ -11,7 +11,7 @@ through in your PR description**. Examples of special cases this doesn't cover are: - If the config needs special treatment like a different default in `-dev` mode - or differences between OSS and Enterprise. + or differences between CE and Enterprise. - If custom logic is needed to support backwards compatibility when changing syntax or semantics of anything diff --git a/docs/persistence/README.md b/docs/persistence/README.md index bb907d7d133d..a9388c714c94 100644 --- a/docs/persistence/README.md +++ b/docs/persistence/README.md @@ -58,11 +58,11 @@ There are two styles for defining table indexes. The original style uses generic implementations from [hashicorp/go-memdb] (ex: `StringFieldIndex`). These indexes use [reflect] to find values for an index. These generic indexers work well when the index value is a single value available directly from the struct field, and there are no -oss/enterprise differences. +ce/enterprise differences. The second style of indexers are custom indexers implemented using only functions and based on the types defined in [indexer.go]. This style of index works well when the index -value is a value derived from one or multiple fields, or when there are oss/enterprise +value is a value derived from one or multiple fields, or when there are ce/enterprise differences between the indexes. [reflect]: https://golang.org/pkg/reflect/ diff --git a/lib/useragent.go b/lib/useragent.go index 84e76d4dfb87..f083fe3f1903 100644 --- a/lib/useragent.go +++ b/lib/useragent.go @@ -16,7 +16,7 @@ var ( // versionFunc is the func that returns the current version. This is a // function to take into account the different build processes and distinguish - // between enterprise and oss builds. + // between enterprise and CE builds. versionFunc = func() string { return version.GetHumanVersion() } diff --git a/proto/pbautoconf/auto_config_oss.go b/proto/pbautoconf/auto_config_ce.go similarity index 100% rename from proto/pbautoconf/auto_config_oss.go rename to proto/pbautoconf/auto_config_ce.go diff --git a/proto/pbcommon/common_oss.go b/proto/pbcommon/common_ce.go similarity index 100% rename from proto/pbcommon/common_oss.go rename to proto/pbcommon/common_ce.go diff --git a/proto/pbpeering/peering_oss.go b/proto/pbpeering/peering_ce.go similarity index 100% rename from proto/pbpeering/peering_oss.go rename to proto/pbpeering/peering_ce.go diff --git a/proto/pbservice/convert_oss.go b/proto/pbservice/convert_ce.go similarity index 100% rename from proto/pbservice/convert_oss.go rename to proto/pbservice/convert_ce.go diff --git a/proto/pbservice/convert_oss_test.go b/proto/pbservice/convert_ce_test.go similarity index 100% rename from proto/pbservice/convert_oss_test.go rename to proto/pbservice/convert_ce_test.go diff --git a/sentinel/sentinel_oss.go b/sentinel/sentinel_ce.go similarity index 100% rename from sentinel/sentinel_oss.go rename to sentinel/sentinel_ce.go diff --git a/test/integration/connect/envoy/main_test.go b/test/integration/connect/envoy/main_test.go index 6b60efab5d6b..b4b473f01ce0 100644 --- a/test/integration/connect/envoy/main_test.go +++ b/test/integration/connect/envoy/main_test.go @@ -50,7 +50,7 @@ func runCmd(t *testing.T, c string, env ...string) { } } -// Discover the cases so we pick up both oss and ent copies. +// Discover the cases so we pick up both CE and ent copies. func discoverCases() ([]string, error) { cwd, err := os.Getwd() if err != nil { diff --git a/test/integration/consul-container/libs/utils/version.go b/test/integration/consul-container/libs/utils/version.go index e534f807e1e5..b2e14156e1c7 100644 --- a/test/integration/consul-container/libs/utils/version.go +++ b/test/integration/consul-container/libs/utils/version.go @@ -5,11 +5,11 @@ import ( ) var ( - TargetImage string - TargetVersion string + TargetImage string + TargetVersion string - LatestImage string - LatestVersion string + LatestImage string + LatestVersion string ) func init() { diff --git a/test/integration/consul-container/libs/utils/version_oss.go b/test/integration/consul-container/libs/utils/version_ce.go similarity index 82% rename from test/integration/consul-container/libs/utils/version_oss.go rename to test/integration/consul-container/libs/utils/version_ce.go index 75abf49920b7..37f4410c956b 100644 --- a/test/integration/consul-container/libs/utils/version_oss.go +++ b/test/integration/consul-container/libs/utils/version_ce.go @@ -4,7 +4,7 @@ package utils const ( - DefaultImageName = "consul" + DefaultImageName = "consul" ) func ImageName(image, version string) string { diff --git a/test/integration/consul-container/test/upgrade/README.md b/test/integration/consul-container/test/upgrade/README.md index f552ca1db217..2f1ba11de2e6 100644 --- a/test/integration/consul-container/test/upgrade/README.md +++ b/test/integration/consul-container/test/upgrade/README.md @@ -5,4 +5,4 @@ To specify targets and latest image pass `target-version` and `latest-version` to the tests. By default, it uses the `consul` docker image with respectively `local` and `latest` tags. -To use dev consul image, pass `target-image` and `target-version`, `-target-image hashicorppreview/consul -target-version 1.14-dev`. \ No newline at end of file +To use dev consul image, pass `target-image` and `target-version`, `-target-image hashicorppreview/consul -target-version 1.14-dev`. diff --git a/ui/README.md b/ui/README.md index dc3f8e64b656..850cff2ab45c 100644 --- a/ui/README.md +++ b/ui/README.md @@ -53,7 +53,7 @@ List of available project commands. `yarn run ` | Command | Description | |---------------------|------------------------------------| | doc:toc | Re-builds the ToC for this README. | -| compliance:licenses | Checks that all dependencies have OSS-compatible licenses. | +| compliance:licenses | Checks that all dependencies have CE-compatible licenses. | ## Contributing diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/token/fieldsets/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/token/fieldsets/index.hbs index b2a53bdd0606..ba1cf4ddda58 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/token/fieldsets/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/token/fieldsets/index.hbs @@ -19,7 +19,7 @@
  • Switch to the peer
    - Someone on your team should log into the Datacenter (OSS) or Admin Partition (Enterprise) that you want this one to connect with. + Someone on your team should log into the Datacenter (CE) or Admin Partition (Enterprise) that you want this one to connect with.
  • Initiate the peering
    diff --git a/ui/packages/consul-ui/GNUmakefile b/ui/packages/consul-ui/GNUmakefile index 0855de1dab0a..68ad9cc414d3 100644 --- a/ui/packages/consul-ui/GNUmakefile +++ b/ui/packages/consul-ui/GNUmakefile @@ -34,6 +34,7 @@ start-api: deps # things with 'view' will open your browser for you # otherwise its headless +# TODO(spatel): CE refactor # oss is currently with namespace support disabled test: deps test-node yarn run test diff --git a/ui/packages/consul-ui/app/services/client/http.js b/ui/packages/consul-ui/app/services/client/http.js index d36c70260ef0..49c095bb3699 100644 --- a/ui/packages/consul-ui/app/services/client/http.js +++ b/ui/packages/consul-ui/app/services/client/http.js @@ -252,7 +252,7 @@ export default class HttpService extends Service { // we can use them later for store reconciliation. Namespace // will look at the ns query parameter first, followed by the // Namespace property of the users token, defaulting back to - // 'default' which will mainly be used in OSS + // 'default' which will mainly be used in CE [CONSUL_DATACENTER]: params.data.dc, [CONSUL_NAMESPACE]: params.data.ns || token.Namespace || 'default', [CONSUL_PARTITION]: params.data.partition || token.Partition || 'default', diff --git a/ui/packages/consul-ui/app/utils/create-fingerprinter.js b/ui/packages/consul-ui/app/utils/create-fingerprinter.js index f1b91cfc0df4..f2f46576303e 100644 --- a/ui/packages/consul-ui/app/utils/create-fingerprinter.js +++ b/ui/packages/consul-ui/app/utils/create-fingerprinter.js @@ -30,7 +30,7 @@ export default function (foreignKey, nspaceKey, partitionKey, hash = JSON.string }) .compact(); // This ensures that all data objects have a Namespace and a Partition - // value set, even in OSS. + // value set, even in CE. if (typeof item[nspaceKey] === 'undefined') { if (nspaceValue === '*') { nspaceValue = 'default'; diff --git a/ui/packages/consul-ui/config/environment.js b/ui/packages/consul-ui/config/environment.js index 4913c4cc8232..1289a2ca3719 100644 --- a/ui/packages/consul-ui/config/environment.js +++ b/ui/packages/consul-ui/config/environment.js @@ -70,6 +70,7 @@ module.exports = function (environment, $ = process.env) { CONSUL_COPYRIGHT_YEAR: env('CONSUL_COPYRIGHT_YEAR', repositoryYear), CONSUL_GIT_SHA: env('CONSUL_GIT_SHA', repositorySHA), CONSUL_VERSION: env('CONSUL_VERSION', binaryVersion), + // TODO(spatel): CE refactor CONSUL_BINARY_TYPE: env('CONSUL_BINARY_TYPE', 'oss'), // These can be overwritten by the UI user at runtime by setting localStorage values diff --git a/ui/packages/consul-ui/docs/significant-patterns.mdx b/ui/packages/consul-ui/docs/significant-patterns.mdx index 0cd9d4365518..f60e2d287006 100644 --- a/ui/packages/consul-ui/docs/significant-patterns.mdx +++ b/ui/packages/consul-ui/docs/significant-patterns.mdx @@ -116,7 +116,7 @@ Please see our package.json file dependencies. ### Namespace support -Whilst Consul namespaces are a OSS feature of Consul, we almost always build +Whilst Consul namespaces are a CE feature of Consul, we almost always build things 'pretending' that namespaces are always enabled. Then there is code within the data layer of the application that removes any namespace related query parameters.