diff --git a/.github/scripts/get_runner_classes.sh b/.github/scripts/get_runner_classes.sh index e78aa78f127b..abd3f1bce2d0 100755 --- a/.github/scripts/get_runner_classes.sh +++ b/.github/scripts/get_runner_classes.sh @@ -13,7 +13,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/scripts/get_runner_classes_windows.sh b/.github/scripts/get_runner_classes_windows.sh index 6b26c6d86c58..d9f46488798f 100755 --- a/.github/scripts/get_runner_classes_windows.sh +++ b/.github/scripts/get_runner_classes_windows.sh @@ -13,7 +13,7 @@ case "$GITHUB_REPOSITORY" in echo "compute-small=['self-hosted', 'windows', 'small']" >> "$GITHUB_OUTPUT" echo "compute-medium=['self-hosted', 'windows', 'medium']" >> "$GITHUB_OUTPUT" echo "compute-large=['self-hosted', 'windows', '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', 'windows', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT" ;; *) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index 9e09bcecc662..2977a73b6eb0 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -80,7 +80,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0 - # NOTE: conditional specific logic as we store secrets in Vault in ENT and use GHA secrets in OSS. + # NOTE: conditional specific logic as we store secrets in Vault in ENT and use GHA secrets in CE. - name: Login to Docker Hub uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a63609a3da12..8af561716a21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,7 @@ on: env: PKG_NAME: consul + # TODO(spatel): CE refactor METADATA: oss GOPRIVATE: github.com/hashicorp # Required for enterprise deps diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 1fc107844b81..63d02962fb01 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 561c7e1e3dbd..2136f43185e2 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -199,7 +199,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 @@ -213,7 +213,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 @@ -231,7 +231,7 @@ jobs: # consul-license: ${{secrets.CONSUL_LICENSE}} # datadog-api-key: "${{ !endsWith(github.repository, '-enterprise') && secrets.DATADOG_API_KEY || '' }}" - go-test-oss: + go-test-ce: needs: - setup - dev-build @@ -476,7 +476,7 @@ jobs: - lint-32bit # - go-test-arm64 - go-test-enterprise - - go-test-oss + - go-test-ce - go-test-race - go-test-envoyextensions - go-test-troubleshoot diff --git a/.github/workflows/nightly-test-1.13.x.yaml b/.github/workflows/nightly-test-1.13.x.yaml index 3e95095b5e09..70a30232bfcd 100644 --- a/.github/workflows/nightly-test-1.13.x.yaml +++ b/.github/workflows/nightly-test-1.13.x.yaml @@ -43,7 +43,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 @@ -65,27 +65,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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -104,13 +104,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 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 @@ -138,7 +138,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 @@ -157,7 +157,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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -219,7 +219,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.14.x.yaml b/.github/workflows/nightly-test-1.14.x.yaml index dcbbb51f51e9..002bf73a0d37 100644 --- a/.github/workflows/nightly-test-1.14.x.yaml +++ b/.github/workflows/nightly-test-1.14.x.yaml @@ -43,7 +43,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 @@ -65,27 +65,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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -104,13 +104,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 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 @@ -138,7 +138,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 @@ -157,7 +157,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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -219,7 +219,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.15.x.yaml b/.github/workflows/nightly-test-1.15.x.yaml index 0a44186387ce..9a3b91329ee0 100644 --- a/.github/workflows/nightly-test-1.15.x.yaml +++ b/.github/workflows/nightly-test-1.15.x.yaml @@ -43,7 +43,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 @@ -65,27 +65,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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -104,13 +104,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 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 @@ -138,7 +138,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 @@ -157,7 +157,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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -219,7 +219,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.16.x.yaml b/.github/workflows/nightly-test-1.16.x.yaml index 8cbcad21a46d..b6b14f87c325 100644 --- a/.github/workflows/nightly-test-1.16.x.yaml +++ b/.github/workflows/nightly-test-1.16.x.yaml @@ -43,7 +43,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 @@ -65,27 +65,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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -104,13 +104,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 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 @@ -138,7 +138,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 @@ -157,7 +157,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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -219,7 +219,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 b5a0ae691a2c..eb9a68893dc9 100644 --- a/.github/workflows/nightly-test-main.yaml +++ b/.github/workflows/nightly-test-main.yaml @@ -43,7 +43,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 @@ -65,27 +65,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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -104,13 +104,13 @@ jobs: working-directory: ./ui run: make deps - - name: Download OSS Frontend + - name: Download CE Frontend uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 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 @@ -138,7 +138,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 @@ -157,7 +157,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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -219,7 +219,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 bb7c03550918..b0730c957708 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -51,11 +51,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/acl/acl_ce.go b/acl/acl_ce.go index 7c92275ec83a..76e77f3b8f46 100644 --- a/acl/acl_ce.go +++ b/acl/acl_ce.go @@ -17,7 +17,7 @@ const ( const DefaultNamespaceName = "default" type EnterpriseConfig struct { - // no fields in OSS + // no fields in CE } func (_ *EnterpriseConfig) Close() { diff --git a/agent/agent.go b/agent/agent.go index dc98aafbf50c..229ec5b8fd3d 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -3755,7 +3755,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/auto-config/auto_config_ce.go b/agent/auto-config/auto_config_ce.go index ed3d85123350..5e5d79963463 100644 --- a/agent/auto-config/auto_config_ce.go +++ b/agent/auto-config/auto_config_ce.go @@ -6,7 +6,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/config_ce.go b/agent/auto-config/config_ce.go index 946051d04375..6e7e470f298f 100644 --- a/agent/auto-config/config_ce.go +++ b/agent/auto-config/config_ce.go @@ -9,7 +9,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_ce_test.go b/agent/auto-config/mock_ce_test.go index a0d2ff785978..cb741b6d4754 100644 --- a/agent/auto-config/mock_ce_test.go +++ b/agent/auto-config/mock_ce_test.go @@ -10,7 +10,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/config/builder_ce.go b/agent/config/builder_ce.go index 7f94a06093b6..ab7e1ece5a87 100644 --- a/agent/config/builder_ce.go +++ b/agent/config/builder_ce.go @@ -13,7 +13,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/runtime_ce_test.go b/agent/config/runtime_ce_test.go index f52aee3b3830..f059a5907367 100644 --- a/agent/config/runtime_ce_test.go +++ b/agent/config/runtime_ce_test.go @@ -35,7 +35,7 @@ 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) { dataDir := testutil.TempDir(t, "consul") diff --git a/agent/config/segment_ce_test.go b/agent/config/segment_ce_test.go index 7fde44100c85..20e656477825 100644 --- a/agent/config/segment_ce_test.go +++ b/agent/config/segment_ce_test.go @@ -18,7 +18,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, }, @@ -42,7 +42,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 534eeaa0e2b2..f7d14800a922 100644 --- a/agent/connect/sni.go +++ b/agent/connect/sni.go @@ -31,7 +31,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" } @@ -48,7 +48,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" } @@ -109,7 +109,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_ce.go b/agent/connect/uri_agent_ce.go index 89418ca39528..5cfad14a7d97 100644 --- a/agent/connect/uri_agent_ce.go +++ b/agent/connect/uri_agent_ce.go @@ -13,7 +13,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_mesh_gateway_ce.go b/agent/connect/uri_mesh_gateway_ce.go index ea5cad20920e..a0c0cdba0541 100644 --- a/agent/connect/uri_mesh_gateway_ce.go +++ b/agent/connect/uri_mesh_gateway_ce.go @@ -13,7 +13,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_service.go b/agent/connect/uri_service.go index 04eff0d72d21..3be7cf4797a3 100644 --- a/agent/connect/uri_service.go +++ b/agent/connect/uri_service.go @@ -43,10 +43,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_ce.go b/agent/connect/uri_service_ce.go index 59761239ea15..a1e1dd43c3f2 100644 --- a/agent/connect/uri_service_ce.go +++ b/agent/connect/uri_service_ce.go @@ -13,13 +13,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/consul/acl_ce.go b/agent/consul/acl_ce.go index e99085250fad..7e55a90ca950 100644 --- a/agent/consul/acl_ce.go +++ b/agent/consul/acl_ce.go @@ -36,13 +36,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/enterprise_server_ce.go b/agent/consul/enterprise_server_ce.go index 9432172a181a..1b9431e89c28 100644 --- a/agent/consul/enterprise_server_ce.go +++ b/agent/consul/enterprise_server_ce.go @@ -77,7 +77,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") } diff --git a/agent/consul/fsm/fsm.go b/agent/consul/fsm/fsm.go index 55e66b773809..92a3931b5b33 100644 --- a/agent/consul/fsm/fsm.go +++ b/agent/consul/fsm/fsm.go @@ -264,7 +264,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_ce_test.go b/agent/consul/fsm/snapshot_ce_test.go index 4229941177ff..5bc389dffa4a 100644 --- a/agent/consul/fsm/snapshot_ce_test.go +++ b/agent/consul/fsm/snapshot_ce_test.go @@ -34,7 +34,7 @@ func TestRestoreFromEnterprise(t *testing.T) { StorageBackend: storageBackend, }) - // 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} @@ -58,6 +58,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/leader_intentions_ce.go b/agent/consul/leader_intentions_ce.go index c22e6a194044..98acecf918fd 100644 --- a/agent/consul/leader_intentions_ce.go +++ b/agent/consul/leader_intentions_ce.go @@ -13,7 +13,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" @@ -56,7 +56,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/segment_ce.go b/agent/consul/segment_ce.go index 310835a23462..21137f26684f 100644 --- a/agent/consul/segment_ce.go +++ b/agent/consul/segment_ce.go @@ -26,7 +26,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 { @@ -36,7 +36,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 { @@ -46,6 +46,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_ce.go b/agent/consul/server_ce.go index 4c3dd838e07b..ab586a0292c0 100644 --- a/agent/consul/server_ce.go +++ b/agent/consul/server_ce.go @@ -87,7 +87,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/state/catalog_ce.go b/agent/consul/state/catalog_ce.go index 4107f5dbcd65..1c8062567d74 100644 --- a/agent/consul/state/catalog_ce.go +++ b/agent/consul/state/catalog_ce.go @@ -115,7 +115,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/config_entry_ce.go b/agent/consul/state/config_entry_ce.go index cbf194e16d24..091a5be15768 100644 --- a/agent/consul/state/config_entry_ce.go +++ b/agent/consul/state/config_entry_ce.go @@ -65,7 +65,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_intention.go b/agent/consul/state/config_entry_intention.go index 1999c5d6116c..459d8c4276e6 100644 --- a/agent/consul/state/config_entry_intention.go +++ b/agent/consul/state/config_entry_intention.go @@ -83,7 +83,7 @@ type SamenessGroupMemberIndex 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 = (*SamenessGroupMemberIndex)(nil) var _ memdb.MultiIndexer = (*SamenessGroupMemberIndex)(nil) @@ -135,7 +135,7 @@ type ServiceIntentionSourceSamenessGroupIndex 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 = (*ServiceIntentionSourceSamenessGroupIndex)(nil) var _ memdb.MultiIndexer = (*ServiceIntentionSourceSamenessGroupIndex)(nil) @@ -199,7 +199,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_sameness_group_ce.go b/agent/consul/state/config_entry_sameness_group_ce.go index 5eb39760b0c9..76c285b5e33e 100644 --- a/agent/consul/state/config_entry_sameness_group_ce.go +++ b/agent/consul/state/config_entry_sameness_group_ce.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-memdb" ) -// SamenessGroupDefaultIndex is a placeholder for OSS. Sameness-groups are enterprise only. +// SamenessGroupDefaultIndex is a placeholder for CE. Sameness-groups are enterprise only. type SamenessGroupDefaultIndex struct{} var _ memdb.Indexer = (*SamenessGroupDefaultIndex)(nil) diff --git a/agent/consul/state/peering.go b/agent/consul/state/peering.go index 56f279051c5a..1763777cff83 100644 --- a/agent/consul/state/peering.go +++ b/agent/consul/state/peering.go @@ -1427,7 +1427,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/dns_ce.go b/agent/dns_ce.go index b80900966506..f82d1a31d274 100644 --- a/agent/dns_ce.go +++ b/agent/dns_ce.go @@ -59,7 +59,7 @@ func (d *DNSServer) parseLocality(labels []string, cfg *dnsConfig) (queryLocalit type querySameness struct{} -// parseSamenessGroupLocality wraps parseLocality in OSS +// parseSamenessGroupLocality wraps parseLocality in CE func (d *DNSServer) parseSamenessGroupLocality(cfg *dnsConfig, labels []string, errfnc func() error) ([]queryLocality, error) { locality, ok := d.parseLocality(labels, cfg) if !ok { diff --git a/agent/enterprise_delegate_ce.go b/agent/enterprise_delegate_ce.go index 5c455e243745..81d41ea8fa41 100644 --- a/agent/enterprise_delegate_ce.go +++ b/agent/enterprise_delegate_ce.go @@ -6,5 +6,5 @@ package agent -// enterpriseDelegate has no functions in OSS +// enterpriseDelegate has no functions in CE type enterpriseDelegate interface{} diff --git a/agent/grpc-external/services/resource/read.go b/agent/grpc-external/services/resource/read.go index 4f247a72ac2d..febfcb69f0fa 100644 --- a/agent/grpc-external/services/resource/read.go +++ b/agent/grpc-external/services/resource/read.go @@ -27,7 +27,7 @@ func (s *Server) Read(ctx context.Context, req *pbresource.ReadRequest) (*pbreso // pbresource.Tenacy follows rules for V2 resources and the Resource service. // Example: // - // An OSS namespace scoped resource: + // A CE namespace scoped resource: // V1: EnterpriseMeta{} // V2: Tenancy {Partition: "default", Namespace: "default"} // diff --git a/agent/http_ce.go b/agent/http_ce.go index 8f6d81ca9841..09a03c706246 100644 --- a/agent/http_ce.go +++ b/agent/http_ce.go @@ -39,7 +39,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, @@ -54,7 +54,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/operator_endpoint_ce.go b/agent/operator_endpoint_ce.go index 51c382627a74..d97e6422616f 100644 --- a/agent/operator_endpoint_ce.go +++ b/agent/operator_endpoint_ce.go @@ -12,7 +12,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 7527dc47966a..2d5cab92be2e 100644 --- a/agent/peering_endpoint.go +++ b/agent/peering_endpoint.go @@ -78,7 +78,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_ce_test.go b/agent/peering_endpoint_ce_test.go index c74cccf200b2..67dc63426c6a 100644 --- a/agent/peering_endpoint_ce_test.go +++ b/agent/peering_endpoint_ce_test.go @@ -30,7 +30,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", } @@ -47,7 +47,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") } @@ -57,7 +57,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/naming.go b/agent/proxycfg/naming.go index 3339cb8a5a06..a9bd5fd8c0ca 100644 --- a/agent/proxycfg/naming.go +++ b/agent/proxycfg/naming.go @@ -153,7 +153,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/snapshot.go b/agent/proxycfg/snapshot.go index 974ba82fa7f1..e9304ec63122 100644 --- a/agent/proxycfg/snapshot.go +++ b/agent/proxycfg/snapshot.go @@ -67,7 +67,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_test.go b/agent/proxycfg/state_test.go index dad4465f13ce..2a6792aa22e9 100644 --- a/agent/proxycfg/state_test.go +++ b/agent/proxycfg/state_test.go @@ -465,7 +465,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_ingress_gateway.go b/agent/proxycfg/testing_ingress_gateway.go index 3967b5703654..96918a261bd0 100644 --- a/agent/proxycfg/testing_ingress_gateway.go +++ b/agent/proxycfg/testing_ingress_gateway.go @@ -1123,10 +1123,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 50e75a428fad..d57e0378f98c 100644 --- a/agent/rpc/peering/service.go +++ b/agent/rpc/peering/service.go @@ -277,7 +277,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 { @@ -452,7 +452,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, @@ -943,7 +943,7 @@ func (s *Server) PeeringDelete(ctx context.Context, req *pbpeering.PeeringDelete PeerServerAddresses: existing.PeerServerAddresses, DeletedAt: timestamppb.New(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/rpcclient/health/view_test.go b/agent/rpcclient/health/view_test.go index ce2af7cdac60..83eba5ab41a0 100644 --- a/agent/rpcclient/health/view_test.go +++ b/agent/rpcclient/health/view_test.go @@ -721,7 +721,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/structs/config_entry_discoverychain_ce_test.go b/agent/structs/config_entry_discoverychain_ce_test.go index 40ac59f865da..a65cbb68ac0a 100644 --- a/agent/structs/config_entry_discoverychain_ce_test.go +++ b/agent/structs/config_entry_discoverychain_ce_test.go @@ -25,7 +25,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { cases := []testcase{ { - name: "failover with a sameness group on OSS", + name: "failover with a sameness group on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -38,7 +38,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Bad Failover["*"]: Setting SamenessGroup requires Consul Enterprise`, }, { - name: "failover with a namespace on OSS", + name: "failover with a namespace on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -52,7 +52,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", @@ -65,7 +65,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", @@ -78,7 +78,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", @@ -89,7 +89,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Bad Failover["*"]: Setting Namespace requires Consul Enterprise`, }, { - name: "setting failover Namespace on OSS", + name: "setting failover Namespace on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -100,7 +100,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Bad Failover["*"]: Setting failover policies requires Consul Enterprise`, }, { - name: "setting redirect SamenessGroup on OSS", + name: "setting redirect SamenessGroup on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -111,7 +111,7 @@ func TestServiceResolverConfigEntry_OSS(t *testing.T) { validateErr: `Redirect: Setting SamenessGroup requires Consul Enterprise`, }, { - name: "setting redirect Namespace on OSS", + name: "setting redirect Namespace on CE", entry: &ServiceResolverConfigEntry{ Kind: ServiceResolver, Name: "test", @@ -122,7 +122,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_exports_ce_test.go b/agent/structs/config_entry_exports_ce_test.go index cb1d5d4b3bbf..60cd72d44940 100644 --- a/agent/structs/config_entry_exports_ce_test.go +++ b/agent/structs/config_entry_exports_ce_test.go @@ -12,7 +12,7 @@ import ( func TestExportedServicesConfigEntry_OSS(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 03866f929d51..f05638ec4d2e 100644 --- a/agent/structs/config_entry_gateways_test.go +++ b/agent/structs/config_entry_gateways_test.go @@ -524,7 +524,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": { @@ -868,7 +868,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": { @@ -895,7 +895,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_sameness_group_ce.go b/agent/structs/config_entry_sameness_group_ce.go index c1d888f4475c..2fd3a3438de4 100644 --- a/agent/structs/config_entry_sameness_group_ce.go +++ b/agent/structs/config_entry_sameness_group_ce.go @@ -13,22 +13,22 @@ func (s *SamenessGroupConfigEntry) Validate() error { return fmt.Errorf("sameness-groups are an enterprise-only feature") } -// RelatedPeers is an OSS placeholder noop +// RelatedPeers is an CE placeholder noop func (s *SamenessGroupConfigEntry) RelatedPeers() []string { return nil } -// AllMembers is an OSS placeholder noop +// AllMembers is an CE placeholder noop func (s *SamenessGroupConfigEntry) AllMembers() []SamenessGroupMember { return nil } -// ToServiceResolverFailoverTargets is an OSS placeholder noop +// ToServiceResolverFailoverTargets is an CE placeholder noop func (s *SamenessGroupConfigEntry) ToServiceResolverFailoverTargets() []ServiceResolverFailoverTarget { return nil } -// ToQueryFailoverTargets is an OSS placeholder noop +// ToQueryFailoverTargets is an CE placeholder noop func (s *SamenessGroupConfigEntry) ToQueryFailoverTargets(namespace string) []QueryFailoverTarget { return nil } diff --git a/agent/structs/config_entry_test.go b/agent/structs/config_entry_test.go index b164e67b4f7d..9151ef815b15 100644 --- a/agent/structs/config_entry_test.go +++ b/agent/structs/config_entry_test.go @@ -3411,7 +3411,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/intention_ce.go b/agent/structs/intention_ce.go index 77deca9af32e..cb657b8e3777 100644 --- a/agent/structs/intention_ce.go +++ b/agent/structs/intention_ce.go @@ -31,21 +31,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/structs_ce.go b/agent/structs/structs_ce.go index f922b7fd720f..f47fac578afc 100644 --- a/agent/structs/structs_ce.go +++ b/agent/structs/structs_ce.go @@ -84,13 +84,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/token/store_ce.go b/agent/token/store_ce.go index 98d291385aaf..f2fab3390dfd 100644 --- a/agent/token/store_ce.go +++ b/agent/token/store_ce.go @@ -13,7 +13,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_test.go b/agent/ui_endpoint_test.go index ab27d2ea8e0c..1e0c391d0c95 100644 --- a/agent/ui_endpoint_test.go +++ b/agent/ui_endpoint_test.go @@ -1121,7 +1121,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 61ef21d76ae7..e5e5a4980c41 100644 --- a/agent/xds/listeners_ingress.go +++ b/agent/xds/listeners_ingress.go @@ -299,7 +299,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/api/config_entry_gateways_test.go b/api/config_entry_gateways_test.go index 081e698dccc8..7383b0ae6803 100644 --- a/api/config_entry_gateways_test.go +++ b/api/config_entry_gateways_test.go @@ -176,7 +176,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 = "" @@ -195,7 +195,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 = "" @@ -321,7 +321,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) @@ -331,7 +331,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 50000f61ce23..ef8433c34ebb 100644 --- a/build-support/functions/00-vars.sh +++ b/build-support/functions/00-vars.sh @@ -44,4 +44,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 9bdecd650374..4bb9f35a9f38 100644 --- a/build-support/functions/10-util.sh +++ b/build-support/functions/10-util.sh @@ -236,7 +236,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 @@ -637,6 +637,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 2788e3deeabf..c49ff0c59298 100644 --- a/build-support/functions/20-build.sh +++ b/build-support/functions/20-build.sh @@ -92,6 +92,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/connect/envoy/bootstrap_config_test.go b/command/connect/envoy/bootstrap_config_test.go index ed00e0d9140c..ef0578634714 100644 --- a/command/connect/envoy/bootstrap_config_test.go +++ b/command/connect/envoy/bootstrap_config_test.go @@ -1524,7 +1524,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"}, @@ -1534,7 +1534,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"}, @@ -1562,7 +1562,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"}, @@ -1572,7 +1572,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/docs/config/checklist-adding-config-fields.md b/docs/config/checklist-adding-config-fields.md index 4f9a6e657d84..1f6b251e9899 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 beab81b87adc..c8ca1089d807 100644 --- a/docs/persistence/README.md +++ b/docs/persistence/README.md @@ -63,11 +63,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/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go b/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go index cf0685a37849..b1f00a2dcdd7 100644 --- a/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go +++ b/internal/tools/protoc-gen-consul-rate-limit/postprocess/main.go @@ -56,16 +56,16 @@ func run(inputPaths []string, outputPath string) error { return errors.New("-output path must end in .go") } - oss, ent, err := collectSpecs(inputPaths) + ce, ent, err := collectSpecs(inputPaths) if err != nil { return err } - ossSource, err := generateOSS(oss) + ceSource, err := generateCE(ce) if err != nil { return err } - if err := os.WriteFile(outputPath, ossSource, 0666); err != nil { + if err := os.WriteFile(outputPath, ceSource, 0666); err != nil { return fmt.Errorf("failed to write output file: %s - %w", outputPath, err) } @@ -181,19 +181,19 @@ func collectSpecs(inputPaths []string) ([]spec, []spec, error) { return specs[a].MethodName < specs[b].MethodName }) - var oss, ent []spec + var ce, ent []spec for _, spec := range specs { if spec.Enterprise { ent = append(ent, spec) } else { - oss = append(oss, spec) + ce = append(ce, spec) } } - return oss, ent, nil + return ce, ent, nil } -func generateOSS(specs []spec) ([]byte, error) { +func generateCE(specs []spec) ([]byte, error) { var output bytes.Buffer output.WriteString(fileHeader) @@ -206,7 +206,7 @@ func generateOSS(specs []spec) ([]byte, error) { formatted, err := format.Source(output.Bytes()) if err != nil { - return nil, fmt.Errorf("failed to format source in oss: %w", err) + return nil, fmt.Errorf("failed to format source in ce: %w", err) } return formatted, nil } diff --git a/lib/useragent.go b/lib/useragent.go index 1837a4622feb..89c73dec5529 100644 --- a/lib/useragent.go +++ b/lib/useragent.go @@ -19,7 +19,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/test-integ/peering_commontopo/ac6_failovers_test.go b/test-integ/peering_commontopo/ac6_failovers_test.go index aeeeba0fba86..fe3cd181b203 100644 --- a/test-integ/peering_commontopo/ac6_failovers_test.go +++ b/test-integ/peering_commontopo/ac6_failovers_test.go @@ -49,12 +49,12 @@ func (s *ac6FailoversSuite) setup(t *testing.T, ct *commonTopo) { } // dc1 is peered with dc2 and dc3. -// dc1 has an ac6-client in "default" and "part1" partitions (only default in OSS). +// dc1 has an ac6-client in "default" and "part1" partitions (only default in CE). // ac6-client has a single upstream ac6-failover-svc in its respective partition^. // // ac6-failover-svc has the following failovers: // - peer-dc2-default -// - peer-dc2-part1 (not in OSS) +// - peer-dc2-part1 (not in CE) // - peer-dc3-default // // This setup is mirrored from dc2->dc1 as well @@ -356,7 +356,7 @@ func (s *ac6FailoversSuite) test(t *testing.T, ct *commonTopo) { fmt.Println("### preconditions") // TODO: deduce this number, instead of hard-coding nFailoverTargets := 4 - // in OSS, we don't have failover targets for non-default partitions + // in CE, we don't have failover targets for non-default partitions if !utils.IsEnterprise() { nFailoverTargets = 3 } diff --git a/test-integ/peering_commontopo/commontopo.go b/test-integ/peering_commontopo/commontopo.go index 79969afbb3f9..d0e2c8e55dcb 100644 --- a/test-integ/peering_commontopo/commontopo.go +++ b/test-integ/peering_commontopo/commontopo.go @@ -275,7 +275,7 @@ func (ct *commonTopo) APIClientForCluster(t *testing.T, clu *topology.Cluster) * func (ct *commonTopo) ExportService(clu *topology.Cluster, partition string, svcs ...api.ExportedService) { var found bool for _, ce := range clu.InitialConfigEntries { - // We check Name because it must be "default" in OSS whereas Partition will be "". + // We check Name because it must be "default" in CE whereas Partition will be "". if ce.GetKind() == api.ExportedServices && ce.GetName() == partition { found = true e := ce.(*api.ExportedServicesConfigEntry) @@ -285,7 +285,7 @@ func (ct *commonTopo) ExportService(clu *topology.Cluster, partition string, svc if !found { clu.InitialConfigEntries = append(clu.InitialConfigEntries, &api.ExportedServicesConfigEntry{ - Name: partition, // this NEEDs to be "default" in OSS + Name: partition, // this NEEDs to be "default" in CE Partition: ConfigEntryPartition(partition), Services: svcs, }, @@ -305,11 +305,11 @@ func (ct *commonTopo) ClusterByDatacenter(t *testing.T, name string) *topology.C return nil } -// Since OSS config entries do not contain the partition field, +// Since CE config entries do not contain the partition field, // this func converts default partition to empty string. func ConfigEntryPartition(p string) string { if p == "default" { - return "" // make this OSS friendly + return "" // make this CE friendly } return p } diff --git a/test/integration/connect/envoy/main_test.go b/test/integration/connect/envoy/main_test.go index 7769877efe63..52f3b74187e2 100644 --- a/test/integration/connect/envoy/main_test.go +++ b/test/integration/connect/envoy/main_test.go @@ -55,7 +55,6 @@ func TestEnvoy(t *testing.T) { } } - func runCmdLinux(t *testing.T, c string, env ...string) { t.Helper() @@ -96,7 +95,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/tenancy.go b/test/integration/consul-container/libs/utils/tenancy.go index f8a803bc82c7..058f9cee0147 100644 --- a/test/integration/consul-container/libs/utils/tenancy.go +++ b/test/integration/consul-container/libs/utils/tenancy.go @@ -26,7 +26,7 @@ func DefaultToEmpty(name string) string { } // CompatQueryOpts cleans a QueryOptions so that Partition and Namespace fields -// are compatible with OSS or ENT +// are compatible with CE or ENT // TODO: not sure why we can't do this server-side func CompatQueryOpts(opts *api.QueryOptions) *api.QueryOptions { opts.Partition = DefaultToEmpty(opts.Partition) diff --git a/test/integration/consul-container/test/upgrade/README.md b/test/integration/consul-container/test/upgrade/README.md index 479e680c1708..598bdfab3480 100644 --- a/test/integration/consul-container/test/upgrade/README.md +++ b/test/integration/consul-container/test/upgrade/README.md @@ -68,9 +68,9 @@ disable following container logs, run the test with `-follow-log false`. Below are the supported CLI options | Flags | Default value | Description | | ----------- | ----------- | ----------- | -| --latest-image | `consul` in OSS, `hashicorp/consulenterprise` in ENT | Name of the Docker image to deploy initially. +| --latest-image | `consul` in CE, `hashicorp/consulenterprise` in ENT | Name of the Docker image to deploy initially. | --latest-version | latest | Tag of the Docker image to deploy initially. -| --target-image | `consul` in OSS, `hashicorp/consulenterprise` in ENT | Name of the Docker image to upgrade to. +| --target-image | `consul` in Ce, `hashicorp/consulenterprise` in ENT | Name of the Docker image to upgrade to. | --target-version | local | Tag of the Docker image to upgrade to. `local` is the tag built by `make dev-docker` above. | -follow-log | true | Emit all container logs. These can be noisy, so we recommend `--follow-log=false` for local development. diff --git a/testing/deployer/topology/compile.go b/testing/deployer/topology/compile.go index 2fa90912ed0a..78ee5843c1b2 100644 --- a/testing/deployer/topology/compile.go +++ b/testing/deployer/topology/compile.go @@ -357,7 +357,7 @@ func compile(logger hclog.Logger, raw *Config, prev *Topology) (*Topology, error if !c.Enterprise { expect := []*Partition{{Name: "default", Namespaces: []string{"default"}}} if !reflect.DeepEqual(c.Partitions, expect) { - return nil, fmt.Errorf("cluster %q references non-default partitions or namespaces but is OSS", c.Name) + return nil, fmt.Errorf("cluster %q references non-default partitions or namespaces but is CE", c.Name) } } } @@ -393,7 +393,7 @@ func compile(logger hclog.Logger, raw *Config, prev *Topology) (*Topology, error } } else { if p.Dialing.Partition != "default" { - return nil, fmt.Errorf("dialing side of peering cannot reference a partition when OSS") + return nil, fmt.Errorf("dialing side of peering cannot reference a partition when CE") } } if acceptingCluster.Enterprise { @@ -402,7 +402,7 @@ func compile(logger hclog.Logger, raw *Config, prev *Topology) (*Topology, error } } else { if p.Accepting.Partition != "default" { - return nil, fmt.Errorf("accepting side of peering cannot reference a partition when OSS") + return nil, fmt.Errorf("accepting side of peering cannot reference a partition when CE") } } diff --git a/testing/deployer/topology/ids.go b/testing/deployer/topology/ids.go index b3268d517f68..3f964b12548e 100644 --- a/testing/deployer/topology/ids.go +++ b/testing/deployer/topology/ids.go @@ -137,7 +137,7 @@ func DefaultToEmpty(name string) string { // PartitionQueryOptions returns an *api.QueryOptions with the given partition // field set only if the partition is non-default. This helps when writing -// tests for joint use in OSS and ENT. +// tests for joint use in CE and ENT. func PartitionQueryOptions(partition string) *api.QueryOptions { return &api.QueryOptions{ Partition: DefaultToEmpty(partition), 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 3c881cd1ed1b..716a1e18b30b 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 @@ -24,7 +24,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 0d4677e6cfb6..3fe145ef58ef 100644 --- a/ui/packages/consul-ui/app/services/client/http.js +++ b/ui/packages/consul-ui/app/services/client/http.js @@ -257,7 +257,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 54f2fa7d6d7c..738b89233ecc 100644 --- a/ui/packages/consul-ui/app/utils/create-fingerprinter.js +++ b/ui/packages/consul-ui/app/utils/create-fingerprinter.js @@ -35,7 +35,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 66551a9ec2b0..b694f7e894ec 100644 --- a/ui/packages/consul-ui/config/environment.js +++ b/ui/packages/consul-ui/config/environment.js @@ -75,6 +75,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.