From 3fb8dda96072877cf6f854969b1f516d28fb8fc5 Mon Sep 17 00:00:00 2001 From: Semir Patel Date: Wed, 23 Aug 2023 11:53:44 -0500 Subject: [PATCH] [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) --- .github/scripts/get_runner_classes.sh | 2 +- .github/workflows/build-artifacts.yml | 2 +- .github/workflows/build.yml | 1 + ...merge-trigger.yml => ce-merge-trigger.yml} | 9 +++--- .github/workflows/frontend.yml | 2 +- .github/workflows/go-tests.yml | 8 +++--- .github/workflows/nightly-test-1.12.x.yaml | 28 +++++++++---------- .github/workflows/nightly-test-1.13.x.yaml | 28 +++++++++---------- .github/workflows/nightly-test-1.14.x.yaml | 28 +++++++++---------- .github/workflows/nightly-test-1.15.x.yaml | 28 +++++++++---------- .github/workflows/nightly-test-main.yaml | 28 +++++++++---------- .golangci.yml | 6 ++-- .release/security-scan.hcl | 1 + acl/{acl_oss.go => acl_ce.go} | 2 +- acl/{authorizer_oss.go => authorizer_ce.go} | 0 ...rprisemeta_oss.go => enterprisemeta_ce.go} | 0 acl/{errors_oss.go => errors_ce.go} | 0 ...horizer_oss.go => policy_authorizer_ce.go} | 0 acl/{policy_oss.go => policy_ce.go} | 0 ...licy_merger_oss.go => policy_merger_ce.go} | 0 agent/{acl_oss.go => acl_ce.go} | 0 agent/agent.go | 2 +- agent/{agent_oss.go => agent_ce.go} | 0 agent/{agent_oss_test.go => agent_ce_test.go} | 0 ...t_endpoint_oss.go => agent_endpoint_ce.go} | 0 ..._oss_test.go => agent_endpoint_ce_test.go} | 0 .../{auto_config_oss.go => auto_config_ce.go} | 2 +- ...fig_oss_test.go => auto_config_ce_test.go} | 0 .../{config_oss.go => config_ce.go} | 2 +- .../{mock_oss_test.go => mock_ce_test.go} | 2 +- ...endpoint_oss.go => catalog_endpoint_ce.go} | 0 .../config/{builder_oss.go => builder_ce.go} | 2 +- ...builder_oss_test.go => builder_ce_test.go} | 0 agent/config/{config_oss.go => config_ce.go} | 0 .../config/{default_oss.go => default_ce.go} | 0 .../config/{runtime_oss.go => runtime_ce.go} | 0 ...runtime_oss_test.go => runtime_ce_test.go} | 4 +-- .../config/{segment_oss.go => segment_ce.go} | 0 ...segment_oss_test.go => segment_ce_test.go} | 4 +-- agent/connect/sni.go | 6 ++-- .../{uri_agent_oss.go => uri_agent_ce.go} | 2 +- ...agent_oss_test.go => uri_agent_ce_test.go} | 0 ..._gateway_oss.go => uri_mesh_gateway_ce.go} | 2 +- ...ss_test.go => uri_mesh_gateway_ce_test.go} | 0 agent/connect/uri_service.go | 4 +-- .../{uri_service_oss.go => uri_service_ce.go} | 6 ++-- ...ice_oss_test.go => uri_service_ce_test.go} | 0 ...authmethod_oss.go => acl_authmethod_ce.go} | 0 agent/consul/{acl_oss.go => acl_ce.go} | 4 +-- .../{acl_oss_test.go => acl_ce_test.go} | 0 ...acl_endpoint_oss.go => acl_endpoint_ce.go} | 0 .../{acl_server_oss.go => acl_server_ce.go} | 0 .../auth/{binder_oss.go => binder_ce.go} | 0 ...token_writer_oss.go => token_writer_ce.go} | 0 .../{authmethods_oss.go => authmethods_ce.go} | 0 .../kubeauth/{k8s_oss.go => k8s_ce.go} | 0 .../ssoauth/{sso_oss.go => sso_ce.go} | 0 .../{testing_oss.go => testing_ce.go} | 0 .../{autopilot_oss.go => autopilot_ce.go} | 0 agent/consul/catalog_endpoint.go | 2 +- agent/consul/{config_oss.go => config_ce.go} | 0 .../{compile_oss.go => compile_ce.go} | 0 ..._client_oss.go => enterprise_client_ce.go} | 0 ..._config_oss.go => enterprise_config_ce.go} | 0 ..._server_oss.go => enterprise_server_ce.go} | 4 +-- ...s_test.go => enterprise_server_ce_test.go} | 0 .../fsm/{commands_oss.go => commands_ce.go} | 0 ...mmands_oss_test.go => commands_ce_test.go} | 0 agent/consul/fsm/fsm.go | 2 +- .../fsm/{snapshot_oss.go => snapshot_ce.go} | 4 +-- ...apshot_oss_test.go => snapshot_ce_test.go} | 4 +-- agent/consul/fsm/snapshot_test.go | 4 +-- .../{leader_oss_test.go => leader_ce_test.go} | 0 ...entions_oss.go => leader_intentions_ce.go} | 4 +-- ...s_test.go => leader_intentions_ce_test.go} | 0 agent/consul/{merge_oss.go => merge_ce.go} | 0 .../{merge_oss_test.go => merge_ce_test.go} | 2 +- .../consul/{options_oss.go => options_ce.go} | 0 ...g_backend_oss.go => peering_backend_ce.go} | 0 ...oss_test.go => peering_backend_ce_test.go} | 0 .../{walk_oss_test.go => walk_ce_test.go} | 0 ...t_oss.go => prepared_query_endpoint_ce.go} | 0 ....go => prepared_query_endpoint_ce_test.go} | 2 +- .../rate/{handler_oss.go => handler_ce.go} | 0 .../{reporting_oss.go => reporting_ce.go} | 0 .../consul/{segment_oss.go => segment_ce.go} | 8 +++--- agent/consul/{server_oss.go => server_ce.go} | 2 +- .../{server_oss_test.go => server_ce_test.go} | 0 agent/consul/state/{acl_oss.go => acl_ce.go} | 0 .../state/{acl_oss_test.go => acl_ce_test.go} | 0 .../state/{catalog_oss.go => catalog_ce.go} | 2 +- ...catalog_oss_test.go => catalog_ce_test.go} | 0 ...log_events_oss.go => catalog_events_ce.go} | 0 ..._oss_test.go => catalog_events_ce_test.go} | 2 +- ...config_entry_oss.go => config_entry_ce.go} | 2 +- ...ry_oss_test.go => config_entry_ce_test.go} | 0 ...o => config_entry_exported_services_ce.go} | 0 agent/consul/state/config_entry_intention.go | 6 ++-- ...on_oss.go => config_entry_intention_ce.go} | 0 ...s.go => config_entry_sameness_group_ce.go} | 2 +- ...=> config_entry_sameness_group_ce_test.go} | 0 .../{coordinate_oss.go => coordinate_ce.go} | 0 ...nate_oss_test.go => coordinate_ce_test.go} | 0 .../state/{delay_oss.go => delay_ce.go} | 0 .../{graveyard_oss.go => graveyard_ce.go} | 0 .../{intention_oss.go => intention_ce.go} | 0 agent/consul/state/{kvs_oss.go => kvs_ce.go} | 0 .../state/{kvs_oss_test.go => kvs_ce_test.go} | 0 .../{operations_oss.go => operations_ce.go} | 0 agent/consul/state/peering.go | 2 +- .../state/{peering_oss.go => peering_ce.go} | 0 ...peering_oss_test.go => peering_ce_test.go} | 0 .../state/{query_oss.go => query_ce.go} | 0 .../state/{schema_oss.go => schema_ce.go} | 0 .../{schema_oss_test.go => schema_ce_test.go} | 0 .../state/{session_oss.go => session_ce.go} | 0 ...ore_oss_test.go => state_store_ce_test.go} | 0 .../state/{usage_oss.go => usage_ce.go} | 0 ...usagemetrics_oss.go => usagemetrics_ce.go} | 0 ...cs_oss_test.go => usagemetrics_ce_test.go} | 8 +++--- agent/{dns_oss.go => dns_ce.go} | 2 +- agent/{dns_oss_test.go => dns_ce_test.go} | 2 +- ...egate_oss.go => enterprise_delegate_ce.go} | 2 +- agent/{http_oss.go => http_ce.go} | 4 +-- agent/{http_oss_test.go => http_ce_test.go} | 6 ++-- ...test.go => intentions_endpoint_ce_test.go} | 2 +- ...ndpoint_oss.go => operator_endpoint_ce.go} | 2 +- ...s_test.go => operator_endpoint_ce_test.go} | 0 agent/peering_endpoint.go | 2 +- ...ss_test.go => peering_endpoint_ce_test.go} | 8 +++--- .../{intentions_oss.go => intentions_ce.go} | 0 ...data_sources_oss.go => data_sources_ce.go} | 0 ...mesh_gateway_oss.go => mesh_gateway_ce.go} | 0 agent/proxycfg/naming.go | 2 +- .../proxycfg/{naming_oss.go => naming_ce.go} | 0 agent/proxycfg/snapshot.go | 2 +- .../{state_oss_test.go => state_ce_test.go} | 0 agent/proxycfg/state_test.go | 2 +- .../{testing_oss.go => testing_ce.go} | 0 agent/proxycfg/testing_ingress_gateway.go | 4 +-- ...streams_oss.go => testing_upstreams_ce.go} | 0 agent/rpc/peering/service.go | 6 ++-- ...service_oss_test.go => service_ce_test.go} | 0 ...stutil_oss_test.go => testutil_ce_test.go} | 0 agent/rpcclient/health/view_test.go | 2 +- agent/setup.go | 2 +- agent/{setup_oss.go => setup_ce.go} | 0 agent/structs/{acl_oss.go => acl_ce.go} | 0 .../{autopilot_oss.go => autopilot_ce.go} | 0 .../structs/{catalog_oss.go => catalog_ce.go} | 0 ...config_entry_oss.go => config_entry_ce.go} | 0 ...ry_oss_test.go => config_entry_ce_test.go} | 5 ++-- ...s.go => config_entry_discoverychain_ce.go} | 2 +- ...=> config_entry_discoverychain_ce_test.go} | 20 ++++++------- ...orts_oss.go => config_entry_exports_ce.go} | 0 ...est.go => config_entry_exports_ce_test.go} | 4 +-- agent/structs/config_entry_gateways_test.go | 6 ++-- ...s_oss.go => config_entry_intentions_ce.go} | 0 ....go => config_entry_intentions_ce_test.go} | 0 ...oss.go => config_entry_jwt_provider_ce.go} | 0 ...ry_mesh_oss.go => config_entry_mesh_ce.go} | 0 ...s.go => config_entry_sameness_group_ce.go} | 8 +++--- agent/structs/config_entry_test.go | 2 +- .../structs/{connect_oss.go => connect_ce.go} | 0 ...nfig_oss.go => connect_proxy_config_ce.go} | 0 ...ery_chain_oss.go => discovery_chain_ce.go} | 0 .../{intention_oss.go => intention_ce.go} | 6 ++-- .../structs/{structs_oss.go => structs_ce.go} | 6 ++-- ...structs_oss_test.go => structs_ce_test.go} | 0 agent/token/{store_oss.go => store_ce.go} | 2 +- ...int_oss_test.go => ui_endpoint_ce_test.go} | 0 agent/ui_endpoint_test.go | 2 +- ...est.go => delta_envoy_extender_ce_test.go} | 0 ..._oss_test.go => runtime_config_ce_test.go} | 0 ...er_policy_oss.go => failover_policy_ce.go} | 0 agent/xds/listeners_ingress.go | 2 +- ...urces_oss_test.go => resources_ce_test.go} | 0 agent/xds/{server_oss.go => server_ce.go} | 0 api/{oss_test.go => ce_test.go} | 4 +-- api/config_entry_gateways_test.go | 8 +++--- build-support/functions/00-vars.sh | 1 + build-support/functions/10-util.sh | 3 +- build-support/functions/20-build.sh | 1 + ..._create_oss.go => authmethod_create_ce.go} | 0 ..._update_oss.go => authmethod_update_ce.go} | 0 ...atter_oss_test.go => formatter_ce_test.go} | 2 +- .../{oss => ce}/basic.json.golden | 0 .../{oss => ce}/basic.pretty-meta.golden | 0 .../{oss => ce}/basic.pretty.golden | 0 .../{oss => ce}/complex.json.golden | 0 .../{oss => ce}/complex.pretty-meta.golden | 0 .../{oss => ce}/complex.pretty.golden | 0 .../catalog/{helpers_oss.go => helpers_ce.go} | 0 .../connect/envoy/bootstrap_config_test.go | 8 +++--- .../{envoy_oss_test.go => envoy_ce_test.go} | 0 command/login/{login_oss.go => login_ce.go} | 0 .../state/operator_autopilot_state_test.go | 2 +- .../state/testdata/{oss => ce}/json.golden | 0 .../state/testdata/{oss => ce}/pretty.golden | 0 .../state/testdata/{oss => ce}/state.json | 0 ...instances_oss.go => usage_instances_ce.go} | 0 ...oss_test.go => usage_instances_ce_test.go} | 0 command/{registry_oss.go => registry_ce.go} | 0 docs/config/checklist-adding-config-fields.md | 2 +- docs/persistence/README.md | 4 +-- .../postprocess/main.go | 16 +++++------ lib/useragent.go | 2 +- .../{auto_config_oss.go => auto_config_ce.go} | 0 .../pbcommon/{common_oss.go => common_ce.go} | 0 .../{peering_oss.go => peering_ce.go} | 0 .../{convert_oss.go => convert_ce.go} | 0 ...convert_oss_test.go => convert_ce_test.go} | 0 sentinel/{sentinel_oss.go => sentinel_ce.go} | 0 .../consul-container/libs/utils/version.go | 2 +- .../utils/{version_oss.go => version_ce.go} | 2 +- .../{tenancy_oss.go => tenancy_ce.go} | 0 .../consul-container/test/upgrade/README.md | 4 +-- ui/README.md | 2 +- .../peer/form/token/fieldsets/index.hbs | 2 +- ui/packages/consul-ui/GNUmakefile | 1 + .../consul-ui/app/services/client/http.js | 2 +- .../app/utils/create-fingerprinter.js | 2 +- ui/packages/consul-ui/config/environment.js | 1 + .../consul-ui/docs/significant-patterns.mdx | 2 +- 224 files changed, 237 insertions(+), 228 deletions(-) rename .github/workflows/{oss-merge-trigger.yml => ce-merge-trigger.yml} (83%) rename acl/{acl_oss.go => acl_ce.go} (96%) rename acl/{authorizer_oss.go => authorizer_ce.go} (100%) rename acl/{enterprisemeta_oss.go => enterprisemeta_ce.go} (100%) rename acl/{errors_oss.go => errors_ce.go} (100%) rename acl/{policy_authorizer_oss.go => policy_authorizer_ce.go} (100%) rename acl/{policy_oss.go => policy_ce.go} (100%) rename acl/{policy_merger_oss.go => policy_merger_ce.go} (100%) rename agent/{acl_oss.go => acl_ce.go} (100%) rename agent/{agent_oss.go => agent_ce.go} (100%) rename agent/{agent_oss_test.go => agent_ce_test.go} (100%) rename agent/{agent_endpoint_oss.go => agent_endpoint_ce.go} (100%) rename agent/{agent_endpoint_oss_test.go => agent_endpoint_ce_test.go} (100%) rename agent/auto-config/{auto_config_oss.go => auto_config_ce.go} (88%) rename agent/auto-config/{auto_config_oss_test.go => auto_config_ce_test.go} (100%) rename agent/auto-config/{config_oss.go => config_ce.go} (90%) rename agent/auto-config/{mock_oss_test.go => mock_ce_test.go} (87%) rename agent/{catalog_endpoint_oss.go => catalog_endpoint_ce.go} (100%) rename agent/config/{builder_oss.go => builder_ce.go} (97%) rename agent/config/{builder_oss_test.go => builder_ce_test.go} (100%) rename agent/config/{config_oss.go => config_ce.go} (100%) rename agent/config/{default_oss.go => default_ce.go} (100%) rename agent/config/{runtime_oss.go => runtime_ce.go} (100%) rename agent/config/{runtime_oss_test.go => runtime_ce_test.go} (97%) rename agent/config/{segment_oss.go => segment_ce.go} (100%) rename agent/config/{segment_oss_test.go => segment_ce_test.go} (95%) rename agent/connect/{uri_agent_oss.go => uri_agent_ce.go} (87%) rename agent/connect/{uri_agent_oss_test.go => uri_agent_ce_test.go} (100%) rename agent/connect/{uri_mesh_gateway_oss.go => uri_mesh_gateway_ce.go} (87%) rename agent/connect/{uri_mesh_gateway_oss_test.go => uri_mesh_gateway_ce_test.go} (100%) rename agent/connect/{uri_service_oss.go => uri_service_ce.go} (74%) rename agent/connect/{uri_service_oss_test.go => uri_service_ce_test.go} (100%) rename agent/consul/{acl_authmethod_oss.go => acl_authmethod_ce.go} (100%) rename agent/consul/{acl_oss.go => acl_ce.go} (95%) rename agent/consul/{acl_oss_test.go => acl_ce_test.go} (100%) rename agent/consul/{acl_endpoint_oss.go => acl_endpoint_ce.go} (100%) rename agent/consul/{acl_server_oss.go => acl_server_ce.go} (100%) rename agent/consul/auth/{binder_oss.go => binder_ce.go} (100%) rename agent/consul/auth/{token_writer_oss.go => token_writer_ce.go} (100%) rename agent/consul/authmethod/{authmethods_oss.go => authmethods_ce.go} (100%) rename agent/consul/authmethod/kubeauth/{k8s_oss.go => k8s_ce.go} (100%) rename agent/consul/authmethod/ssoauth/{sso_oss.go => sso_ce.go} (100%) rename agent/consul/authmethod/testauth/{testing_oss.go => testing_ce.go} (100%) rename agent/consul/{autopilot_oss.go => autopilot_ce.go} (100%) rename agent/consul/{config_oss.go => config_ce.go} (100%) rename agent/consul/discoverychain/{compile_oss.go => compile_ce.go} (100%) rename agent/consul/{enterprise_client_oss.go => enterprise_client_ce.go} (100%) rename agent/consul/{enterprise_config_oss.go => enterprise_config_ce.go} (100%) rename agent/consul/{enterprise_server_oss.go => enterprise_server_ce.go} (99%) rename agent/consul/{enterprise_server_oss_test.go => enterprise_server_ce_test.go} (100%) rename agent/consul/fsm/{commands_oss.go => commands_ce.go} (100%) rename agent/consul/fsm/{commands_oss_test.go => commands_ce_test.go} (100%) rename agent/consul/fsm/{snapshot_oss.go => snapshot_ce.go} (99%) rename agent/consul/fsm/{snapshot_oss_test.go => snapshot_ce_test.go} (91%) rename agent/consul/{leader_oss_test.go => leader_ce_test.go} (100%) rename agent/consul/{leader_intentions_oss.go => leader_intentions_ce.go} (96%) rename agent/consul/{leader_intentions_oss_test.go => leader_intentions_ce_test.go} (100%) rename agent/consul/{merge_oss.go => merge_ce.go} (100%) rename agent/consul/{merge_oss_test.go => merge_ce_test.go} (97%) rename agent/consul/{options_oss.go => options_ce.go} (100%) rename agent/consul/{peering_backend_oss.go => peering_backend_ce.go} (100%) rename agent/consul/{peering_backend_oss_test.go => peering_backend_ce_test.go} (100%) rename agent/consul/prepared_query/{walk_oss_test.go => walk_ce_test.go} (100%) rename agent/consul/{prepared_query_endpoint_oss.go => prepared_query_endpoint_ce.go} (100%) rename agent/consul/{prepared_query_endpoint_oss_test.go => prepared_query_endpoint_ce_test.go} (96%) rename agent/consul/rate/{handler_oss.go => handler_ce.go} (100%) rename agent/consul/reporting/{reporting_oss.go => reporting_ce.go} (100%) rename agent/consul/{segment_oss.go => segment_ce.go} (89%) rename agent/consul/{server_oss.go => server_ce.go} (98%) rename agent/consul/{server_oss_test.go => server_ce_test.go} (100%) rename agent/consul/state/{acl_oss.go => acl_ce.go} (100%) rename agent/consul/state/{acl_oss_test.go => acl_ce_test.go} (100%) rename agent/consul/state/{catalog_oss.go => catalog_ce.go} (99%) rename agent/consul/state/{catalog_oss_test.go => catalog_ce_test.go} (100%) rename agent/consul/state/{catalog_events_oss.go => catalog_events_ce.go} (100%) rename agent/consul/state/{catalog_events_oss_test.go => catalog_events_ce_test.go} (92%) rename agent/consul/state/{config_entry_oss.go => config_entry_ce.go} (95%) rename agent/consul/state/{config_entry_oss_test.go => config_entry_ce_test.go} (100%) rename agent/consul/state/{config_entry_exported_services_oss.go => config_entry_exported_services_ce.go} (100%) rename agent/consul/state/{config_entry_intention_oss.go => config_entry_intention_ce.go} (100%) rename agent/consul/state/{config_entry_sameness_group_oss.go => config_entry_sameness_group_ce.go} (94%) rename agent/consul/state/{config_entry_sameness_group_oss_test.go => config_entry_sameness_group_ce_test.go} (100%) rename agent/consul/state/{coordinate_oss.go => coordinate_ce.go} (100%) rename agent/consul/state/{coordinate_oss_test.go => coordinate_ce_test.go} (100%) rename agent/consul/state/{delay_oss.go => delay_ce.go} (100%) rename agent/consul/state/{graveyard_oss.go => graveyard_ce.go} (100%) rename agent/consul/state/{intention_oss.go => intention_ce.go} (100%) rename agent/consul/state/{kvs_oss.go => kvs_ce.go} (100%) rename agent/consul/state/{kvs_oss_test.go => kvs_ce_test.go} (100%) rename agent/consul/state/{operations_oss.go => operations_ce.go} (100%) rename agent/consul/state/{peering_oss.go => peering_ce.go} (100%) rename agent/consul/state/{peering_oss_test.go => peering_ce_test.go} (100%) rename agent/consul/state/{query_oss.go => query_ce.go} (100%) rename agent/consul/state/{schema_oss.go => schema_ce.go} (100%) rename agent/consul/state/{schema_oss_test.go => schema_ce_test.go} (100%) rename agent/consul/state/{session_oss.go => session_ce.go} (100%) rename agent/consul/state/{state_store_oss_test.go => state_store_ce_test.go} (100%) rename agent/consul/state/{usage_oss.go => usage_ce.go} (100%) rename agent/consul/usagemetrics/{usagemetrics_oss.go => usagemetrics_ce.go} (100%) rename agent/consul/usagemetrics/{usagemetrics_oss_test.go => usagemetrics_ce_test.go} (99%) rename agent/{dns_oss.go => dns_ce.go} (97%) rename agent/{dns_oss_test.go => dns_ce_test.go} (98%) rename agent/{enterprise_delegate_oss.go => enterprise_delegate_ce.go} (78%) rename agent/{http_oss.go => http_ce.go} (99%) rename agent/{http_oss_test.go => http_ce_test.go} (97%) rename agent/{intentions_endpoint_oss_test.go => intentions_endpoint_ce_test.go} (95%) rename agent/{operator_endpoint_oss.go => operator_endpoint_ce.go} (97%) rename agent/{operator_endpoint_oss_test.go => operator_endpoint_ce_test.go} (100%) rename agent/{peering_endpoint_oss_test.go => peering_endpoint_ce_test.go} (86%) rename agent/proxycfg-glue/{intentions_oss.go => intentions_ce.go} (100%) rename agent/proxycfg/{data_sources_oss.go => data_sources_ce.go} (100%) rename agent/proxycfg/{mesh_gateway_oss.go => mesh_gateway_ce.go} (100%) rename agent/proxycfg/{naming_oss.go => naming_ce.go} (100%) rename agent/proxycfg/{state_oss_test.go => state_ce_test.go} (100%) rename agent/proxycfg/{testing_oss.go => testing_ce.go} (100%) rename agent/proxycfg/{testing_upstreams_oss.go => testing_upstreams_ce.go} (100%) rename agent/rpc/peering/{service_oss_test.go => service_ce_test.go} (100%) rename agent/rpc/peering/{testutil_oss_test.go => testutil_ce_test.go} (100%) rename agent/{setup_oss.go => setup_ce.go} (100%) rename agent/structs/{acl_oss.go => acl_ce.go} (100%) rename agent/structs/{autopilot_oss.go => autopilot_ce.go} (100%) rename agent/structs/{catalog_oss.go => catalog_ce.go} (100%) rename agent/structs/{config_entry_oss.go => config_entry_ce.go} (100%) rename agent/structs/{config_entry_oss_test.go => config_entry_ce_test.go} (97%) rename agent/structs/{config_entry_discoverychain_oss.go => config_entry_discoverychain_ce.go} (98%) rename agent/structs/{config_entry_discoverychain_oss_test.go => config_entry_discoverychain_ce_test.go} (89%) rename agent/structs/{config_entry_exports_oss.go => config_entry_exports_ce.go} (100%) rename agent/structs/{config_entry_exports_oss_test.go => config_entry_exports_ce_test.go} (94%) rename agent/structs/{config_entry_intentions_oss.go => config_entry_intentions_ce.go} (100%) rename agent/structs/{config_entry_intentions_oss_test.go => config_entry_intentions_ce_test.go} (100%) rename agent/structs/{config_entry_jwt_provider_oss.go => config_entry_jwt_provider_ce.go} (100%) rename agent/structs/{config_entry_mesh_oss.go => config_entry_mesh_ce.go} (100%) rename agent/structs/{config_entry_sameness_group_oss.go => config_entry_sameness_group_ce.go} (78%) rename agent/structs/{connect_oss.go => connect_ce.go} (100%) rename agent/structs/{connect_proxy_config_oss.go => connect_proxy_config_ce.go} (100%) rename agent/structs/{discovery_chain_oss.go => discovery_chain_ce.go} (100%) rename agent/structs/{intention_oss.go => intention_ce.go} (90%) rename agent/structs/{structs_oss.go => structs_ce.go} (99%) rename agent/structs/{structs_oss_test.go => structs_ce_test.go} (100%) rename agent/token/{store_oss.go => store_ce.go} (92%) rename agent/{ui_endpoint_oss_test.go => ui_endpoint_ce_test.go} (100%) rename agent/xds/{delta_envoy_extender_oss_test.go => delta_envoy_extender_ce_test.go} (100%) rename agent/xds/extensionruntime/{runtime_config_oss_test.go => runtime_config_ce_test.go} (100%) rename agent/xds/{failover_policy_oss.go => failover_policy_ce.go} (100%) rename agent/xds/{resources_oss_test.go => resources_ce_test.go} (100%) rename agent/xds/{server_oss.go => server_ce.go} (100%) rename api/{oss_test.go => ce_test.go} (83%) rename command/acl/authmethod/create/{authmethod_create_oss.go => authmethod_create_ce.go} (100%) rename command/acl/authmethod/update/{authmethod_update_oss.go => authmethod_update_ce.go} (100%) rename command/acl/token/{formatter_oss_test.go => formatter_ce_test.go} (78%) rename command/acl/token/testdata/FormatTokenExpanded/{oss => ce}/basic.json.golden (100%) rename command/acl/token/testdata/FormatTokenExpanded/{oss => ce}/basic.pretty-meta.golden (100%) rename command/acl/token/testdata/FormatTokenExpanded/{oss => ce}/basic.pretty.golden (100%) rename command/acl/token/testdata/FormatTokenExpanded/{oss => ce}/complex.json.golden (100%) rename command/acl/token/testdata/FormatTokenExpanded/{oss => ce}/complex.pretty-meta.golden (100%) rename command/acl/token/testdata/FormatTokenExpanded/{oss => ce}/complex.pretty.golden (100%) rename command/catalog/{helpers_oss.go => helpers_ce.go} (100%) rename command/connect/envoy/{envoy_oss_test.go => envoy_ce_test.go} (100%) rename command/login/{login_oss.go => login_ce.go} (100%) rename command/operator/autopilot/state/testdata/{oss => ce}/json.golden (100%) rename command/operator/autopilot/state/testdata/{oss => ce}/pretty.golden (100%) rename command/operator/autopilot/state/testdata/{oss => ce}/state.json (100%) rename command/operator/usage/instances/{usage_instances_oss.go => usage_instances_ce.go} (100%) rename command/operator/usage/instances/{usage_instances_oss_test.go => usage_instances_ce_test.go} (100%) rename command/{registry_oss.go => registry_ce.go} (100%) rename proto/private/pbautoconf/{auto_config_oss.go => auto_config_ce.go} (100%) rename proto/private/pbcommon/{common_oss.go => common_ce.go} (100%) rename proto/private/pbpeering/{peering_oss.go => peering_ce.go} (100%) rename proto/private/pbservice/{convert_oss.go => convert_ce.go} (100%) rename proto/private/pbservice/{convert_oss_test.go => convert_ce_test.go} (100%) rename sentinel/{sentinel_oss.go => sentinel_ce.go} (100%) rename test/integration/consul-container/libs/utils/{version_oss.go => version_ce.go} (82%) rename test/integration/consul-container/test/gateways/{tenancy_oss.go => tenancy_ce.go} (100%) diff --git a/.github/scripts/get_runner_classes.sh b/.github/scripts/get_runner_classes.sh index 80980b7a8..59748ab57 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/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index 2e87d767f..f57ea3527 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@f03ac48505955848960e80bbb68046aa35c7b9e7 # pin@v2.4.1 - # 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@f4ef78c080cd8ba55a85445d5b36e214a81df20a # pin@v2.1.0 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e405e38a..2d357acfb 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/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 4a4fdaa20..4de475166 100644 --- a/.github/workflows/oss-merge-trigger.yml +++ b/.github/workflows/ce-merge-trigger.yml @@ -1,7 +1,7 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -name: Trigger OSS to Enterprise Merge +name: Trigger Community Edition to Enterprise Merge on: pull_request_target: types: @@ -11,8 +11,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: @@ -22,8 +22,9 @@ 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' \ -d "{\"event_type\": \"oss-merge\", \"client_payload\": {\"git-ref\": \"${GIT_REF}\", \"git-sha\": \"${GIT_SHA}\", \"git-actor\": \"${GIT_ACTOR}\" }}" \ - "https://api.github.com/repos/hashicorp/consul-enterprise/dispatches" \ No newline at end of file + "https://api.github.com/repos/hashicorp/consul-enterprise/dispatches" diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 5eab231c6..d8b260360 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 58ef29ba0..ed0f5dd1d 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -198,7 +198,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 @@ -212,7 +212,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 @@ -230,7 +230,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 @@ -474,7 +474,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.12.x.yaml b/.github/workflows/nightly-test-1.12.x.yaml index 0f016075e..c09cc4864 100644 --- a/.github/workflows/nightly-test-1.12.x.yaml +++ b/.github/workflows/nightly-test-1.12.x.yaml @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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 51a1226b2..6139eb4bc 100644 --- a/.github/workflows/nightly-test-1.13.x.yaml +++ b/.github/workflows/nightly-test-1.13.x.yaml @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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 86f48c37a..9b310f590 100644 --- a/.github/workflows/nightly-test-1.14.x.yaml +++ b/.github/workflows/nightly-test-1.14.x.yaml @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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 7fdc9247b..9048abb4a 100644 --- a/.github/workflows/nightly-test-1.15.x.yaml +++ b/.github/workflows/nightly-test-1.15.x.yaml @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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 3fc316a1a..16160175b 100644 --- a/.github/workflows/nightly-test-main.yaml +++ b/.github/workflows/nightly-test-main.yaml @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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 bac9b716a..3e45ef464 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/.release/security-scan.hcl b/.release/security-scan.hcl index 335289068..3029b3327 100644 --- a/.release/security-scan.hcl +++ b/.release/security-scan.hcl @@ -11,6 +11,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 96% rename from acl/acl_oss.go rename to acl/acl_ce.go index 8c8b24eaa..58f92022b 100644 --- a/acl/acl_oss.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/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 881b94209..d1d461647 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -3751,7 +3751,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 88% rename from agent/auto-config/auto_config_oss.go rename to agent/auto-config/auto_config_ce.go index 7944ea5d2..78c9ee66d 100644 --- a/agent/auto-config/auto_config_oss.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/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 90% rename from agent/auto-config/config_oss.go rename to agent/auto-config/config_ce.go index a51d30c6c..4162bda4c 100644 --- a/agent/auto-config/config_oss.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_oss_test.go b/agent/auto-config/mock_ce_test.go similarity index 87% rename from agent/auto-config/mock_oss_test.go rename to agent/auto-config/mock_ce_test.go index 6f10f9972..872aa5e54 100644 --- a/agent/auto-config/mock_oss_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/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 fa715a38a..dae1e275c 100644 --- a/agent/config/builder_oss.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/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 06801ac83..99a2f6789 100644 --- a/agent/config/runtime_oss_test.go +++ b/agent/config/runtime_ce_test.go @@ -35,9 +35,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 6dbb60645..1fbaf3c2a 100644 --- a/agent/config/segment_oss_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 b9eb8a14b..339116b64 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_oss.go b/agent/connect/uri_agent_ce.go similarity index 87% rename from agent/connect/uri_agent_oss.go rename to agent/connect/uri_agent_ce.go index e7d426234..2a87d1084 100644 --- a/agent/connect/uri_agent_oss.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_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 87% rename from agent/connect/uri_mesh_gateway_oss.go rename to agent/connect/uri_mesh_gateway_ce.go index 6ac369ddd..876e05101 100644 --- a/agent/connect/uri_mesh_gateway_oss.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_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 5f5f5c9bc..31bd3e5df 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_oss.go b/agent/connect/uri_service_ce.go similarity index 74% rename from agent/connect/uri_service_oss.go rename to agent/connect/uri_service_ce.go index 7323055ad..4106fc811 100644 --- a/agent/connect/uri_service_oss.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/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 496b6cb55..aafe26a13 100644 --- a/agent/consul/acl_oss.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/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 32b8067e5..446037a31 100644 --- a/agent/consul/catalog_endpoint.go +++ b/agent/consul/catalog_endpoint.go @@ -450,7 +450,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 99% rename from agent/consul/enterprise_server_oss.go rename to agent/consul/enterprise_server_ce.go index 836b64e2b..8e56a8108 100644 --- a/agent/consul/enterprise_server_oss.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") } @@ -89,7 +89,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 d1ab112e1..4357ad7c3 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_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 16e4cc460..f563ba21a 100644 --- a/agent/consul/fsm/snapshot_oss.go +++ b/agent/consul/fsm/snapshot_ce.go @@ -18,7 +18,7 @@ import ( ) func init() { - registerPersister(persistOSS) + registerPersister(persistCE) registerRestorer(structs.RegisterRequestType, restoreRegistration) registerRestorer(structs.KVSRequestType, restoreKV) @@ -47,7 +47,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 91% rename from agent/consul/fsm/snapshot_oss_test.go rename to agent/consul/fsm/snapshot_ce_test.go index 76404f62f..b08e75716 100644 --- a/agent/consul/fsm/snapshot_oss_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/fsm/snapshot_test.go b/agent/consul/fsm/snapshot_test.go index d95865b92..3e16efb19 100644 --- a/agent/consul/fsm/snapshot_test.go +++ b/agent/consul/fsm/snapshot_test.go @@ -27,7 +27,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) @@ -941,7 +941,7 @@ func TestFSM_SnapshotRestore_OSS(t *testing.T) { } } -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 76970f397..83880d31d 100644 --- a/agent/consul/leader_intentions_oss.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/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 aef74f7ba..8b0a7514a 100644 --- a/agent/consul/merge_oss_test.go +++ b/agent/consul/merge_ce_test.go @@ -16,7 +16,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/prepared_query_endpoint_oss.go b/agent/consul/prepared_query_endpoint_ce.go similarity index 100% rename from agent/consul/prepared_query_endpoint_oss.go rename to agent/consul/prepared_query_endpoint_ce.go diff --git a/agent/consul/prepared_query_endpoint_oss_test.go b/agent/consul/prepared_query_endpoint_ce_test.go similarity index 96% rename from agent/consul/prepared_query_endpoint_oss_test.go rename to agent/consul/prepared_query_endpoint_ce_test.go index ee96a7b26..876f91d42 100644 --- a/agent/consul/prepared_query_endpoint_oss_test.go +++ b/agent/consul/prepared_query_endpoint_ce_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestPreparedQuery_OSS_Apply(t *testing.T) { +func TestPreparedQuery_CE_Apply(t *testing.T) { if testing.Short() { t.Skip("too slow for testing.Short") } diff --git a/agent/consul/rate/handler_oss.go b/agent/consul/rate/handler_ce.go similarity index 100% rename from agent/consul/rate/handler_oss.go rename to agent/consul/rate/handler_ce.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 89% rename from agent/consul/segment_oss.go rename to agent/consul/segment_ce.go index 9dfd7a53f..a3c0162d2 100644 --- a/agent/consul/segment_oss.go +++ b/agent/consul/segment_ce.go @@ -14,7 +14,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.", @@ -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_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 e31539efb..22660f490 100644 --- a/agent/consul/server_oss.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/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 78acf8797..bec9a6a61 100644 --- a/agent/consul/state/catalog_oss.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/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 91b4a6ab5..0de8286c4 100644 --- a/agent/consul/state/catalog_events_oss_test.go +++ b/agent/consul/state/catalog_events_ce_test.go @@ -14,7 +14,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 35b77972a..ec01e0c09 100644 --- a/agent/consul/state/config_entry_oss.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_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_exported_services_oss.go b/agent/consul/state/config_entry_exported_services_ce.go similarity index 100% rename from agent/consul/state/config_entry_exported_services_oss.go rename to agent/consul/state/config_entry_exported_services_ce.go diff --git a/agent/consul/state/config_entry_intention.go b/agent/consul/state/config_entry_intention.go index ef595e00f..301baf9c0 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_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/config_entry_sameness_group_oss.go b/agent/consul/state/config_entry_sameness_group_ce.go similarity index 94% rename from agent/consul/state/config_entry_sameness_group_oss.go rename to agent/consul/state/config_entry_sameness_group_ce.go index d1e4bdd61..16437cd8f 100644 --- a/agent/consul/state/config_entry_sameness_group_oss.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/config_entry_sameness_group_oss_test.go b/agent/consul/state/config_entry_sameness_group_ce_test.go similarity index 100% rename from agent/consul/state/config_entry_sameness_group_oss_test.go rename to agent/consul/state/config_entry_sameness_group_ce_test.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 b8e2fd10c..90db74845 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/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 8a4b51157..47834da91 100644 --- a/agent/consul/usagemetrics/usagemetrics_oss_test.go +++ b/agent/consul/usagemetrics/usagemetrics_ce_test.go @@ -999,7 +999,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 { @@ -1038,7 +1038,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) @@ -1142,7 +1142,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) @@ -1402,7 +1402,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 97% rename from agent/dns_oss.go rename to agent/dns_ce.go index e7b6dbf8c..8c055776e 100644 --- a/agent/dns_oss.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/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 7bbe6fdd5..920568cd3 100644 --- a/agent/dns_oss_test.go +++ b/agent/dns_ce_test.go @@ -17,7 +17,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 78% rename from agent/enterprise_delegate_oss.go rename to agent/enterprise_delegate_ce.go index 20bfeec22..39ae3db7c 100644 --- a/agent/enterprise_delegate_oss.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/http_oss.go b/agent/http_ce.go similarity index 99% rename from agent/http_oss.go rename to agent/http_ce.go index 6aafdaa2c..d9c233226 100644 --- a/agent/http_oss.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/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 5ba36320f..bf085ca8c 100644 --- a/agent/http_oss_test.go +++ b/agent/http_ce_test.go @@ -62,7 +62,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") } @@ -130,7 +130,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") } @@ -171,7 +171,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 1eb8f8293..fb6a47f5e 100644 --- a/agent/intentions_endpoint_oss_test.go +++ b/agent/intentions_endpoint_ce_test.go @@ -15,7 +15,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 366899cd9..cf2ba2a20 100644 --- a/agent/operator_endpoint_oss.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/operator_endpoint_oss_test.go b/agent/operator_endpoint_ce_test.go similarity index 100% rename from agent/operator_endpoint_oss_test.go rename to agent/operator_endpoint_ce_test.go diff --git a/agent/peering_endpoint.go b/agent/peering_endpoint.go index 8372c94c2..a1fbd009a 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_oss_test.go b/agent/peering_endpoint_ce_test.go similarity index 86% rename from agent/peering_endpoint_oss_test.go rename to agent/peering_endpoint_ce_test.go index 997251580..b0395ea96 100644 --- a/agent/peering_endpoint_oss_test.go +++ b/agent/peering_endpoint_ce_test.go @@ -20,7 +20,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") } @@ -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-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 44c1c2cf4..07aa42f2f 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/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 00e501f6a..b4093d6f7 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_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 86957df4b..9065db885 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_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 d6b2c3ad2..87a3313ec 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/proxycfg/testing_upstreams_oss.go b/agent/proxycfg/testing_upstreams_ce.go similarity index 100% rename from agent/proxycfg/testing_upstreams_oss.go rename to agent/proxycfg/testing_upstreams_ce.go diff --git a/agent/rpc/peering/service.go b/agent/rpc/peering/service.go index f8e89cabb..cae0319a6 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/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 2324ba866..6b4b8ee85 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/setup.go b/agent/setup.go index 4d5d0feed..88c883f9b 100644 --- a/agent/setup.go +++ b/agent/setup.go @@ -504,7 +504,7 @@ func getPrometheusDefs(cfg *config.RuntimeConfig, isServer bool) ([]prometheus.G 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 ce9ac5fad..4561f4aae 100644 --- a/agent/structs/config_entry_oss_test.go +++ b/agent/structs/config_entry_ce_test.go @@ -7,12 +7,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 98% rename from agent/structs/config_entry_discoverychain_oss.go rename to agent/structs/config_entry_discoverychain_ce.go index d9a645ff2..87c222637 100644 --- a/agent/structs/config_entry_discoverychain_oss.go +++ b/agent/structs/config_entry_discoverychain_ce.go @@ -114,7 +114,7 @@ func (f *ServiceResolverFailoverPolicy) ValidateEnterprise() error { return nil } -// RelatedSamenessGroups doesn't return anything on open source. +// RelatedSamenessGroups doesn't return anything in community edition. func (e *ServiceResolverConfigEntry) RelatedSamenessGroups() []string { return nil } diff --git a/agent/structs/config_entry_discoverychain_oss_test.go b/agent/structs/config_entry_discoverychain_ce_test.go similarity index 89% rename from agent/structs/config_entry_discoverychain_oss_test.go rename to agent/structs/config_entry_discoverychain_ce_test.go index ec816f07c..2edcce2be 100644 --- a/agent/structs/config_entry_discoverychain_oss_test.go +++ b/agent/structs/config_entry_discoverychain_ce_test.go @@ -13,7 +13,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 @@ -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_oss.go b/agent/structs/config_entry_exports_ce.go similarity index 100% rename from agent/structs/config_entry_exports_oss.go rename to agent/structs/config_entry_exports_ce.go diff --git a/agent/structs/config_entry_exports_oss_test.go b/agent/structs/config_entry_exports_ce_test.go similarity index 94% rename from agent/structs/config_entry_exports_oss_test.go rename to agent/structs/config_entry_exports_ce_test.go index 0c3982f73..671654b3b 100644 --- a/agent/structs/config_entry_exports_oss_test.go +++ b/agent/structs/config_entry_exports_ce_test.go @@ -10,9 +10,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 16a18752d..d624b39ac 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_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_intentions_oss_test.go b/agent/structs/config_entry_intentions_ce_test.go similarity index 100% rename from agent/structs/config_entry_intentions_oss_test.go rename to agent/structs/config_entry_intentions_ce_test.go diff --git a/agent/structs/config_entry_jwt_provider_oss.go b/agent/structs/config_entry_jwt_provider_ce.go similarity index 100% rename from agent/structs/config_entry_jwt_provider_oss.go rename to agent/structs/config_entry_jwt_provider_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_sameness_group_oss.go b/agent/structs/config_entry_sameness_group_ce.go similarity index 78% rename from agent/structs/config_entry_sameness_group_oss.go rename to agent/structs/config_entry_sameness_group_ce.go index 0693ed0ee..282ab862f 100644 --- a/agent/structs/config_entry_sameness_group_oss.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 9143dc05d..cdaae4e23 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/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 b6ae492dc..af62df50b 100644 --- a/agent/structs/intention_oss.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_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 b1f051f21..6b004460e 100644 --- a/agent/structs/structs_oss.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/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 92% rename from agent/token/store_oss.go rename to agent/token/store_ce.go index bf2ff796f..87fefdbbe 100644 --- a/agent/token/store_oss.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_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 d2cda642f..b39a2f31d 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/delta_envoy_extender_oss_test.go b/agent/xds/delta_envoy_extender_ce_test.go similarity index 100% rename from agent/xds/delta_envoy_extender_oss_test.go rename to agent/xds/delta_envoy_extender_ce_test.go diff --git a/agent/xds/extensionruntime/runtime_config_oss_test.go b/agent/xds/extensionruntime/runtime_config_ce_test.go similarity index 100% rename from agent/xds/extensionruntime/runtime_config_oss_test.go rename to agent/xds/extensionruntime/runtime_config_ce_test.go diff --git a/agent/xds/failover_policy_oss.go b/agent/xds/failover_policy_ce.go similarity index 100% rename from agent/xds/failover_policy_oss.go rename to agent/xds/failover_policy_ce.go diff --git a/agent/xds/listeners_ingress.go b/agent/xds/listeners_ingress.go index ea4c311cd..031709e2a 100644 --- a/agent/xds/listeners_ingress.go +++ b/agent/xds/listeners_ingress.go @@ -298,7 +298,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/api/oss_test.go b/api/ce_test.go similarity index 83% rename from api/oss_test.go rename to api/ce_test.go index 613a2c4de..c60897042 100644 --- a/api/oss_test.go +++ b/api/ce_test.go @@ -6,8 +6,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 421a6283a..25b0a2d51 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 69de94257..2f16f8ce7 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 fdce50c50..9a47ea372 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 9f357884f..a2e583019 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/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 78% rename from command/acl/token/formatter_oss_test.go rename to command/acl/token/formatter_ce_test.go index 32f5b0164..9faa6f4b7 100644 --- a/command/acl/token/formatter_oss_test.go +++ b/command/acl/token/formatter_ce_test.go @@ -11,5 +11,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 293aee660..86566ed80 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/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 b18db7836..d81abcde4 100644 --- a/command/operator/autopilot/state/operator_autopilot_state_test.go +++ b/command/operator/autopilot/state/operator_autopilot_state_test.go @@ -107,7 +107,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/operator/usage/instances/usage_instances_oss.go b/command/operator/usage/instances/usage_instances_ce.go similarity index 100% rename from command/operator/usage/instances/usage_instances_oss.go rename to command/operator/usage/instances/usage_instances_ce.go diff --git a/command/operator/usage/instances/usage_instances_oss_test.go b/command/operator/usage/instances/usage_instances_ce_test.go similarity index 100% rename from command/operator/usage/instances/usage_instances_oss_test.go rename to command/operator/usage/instances/usage_instances_ce_test.go 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 4f9a6e657..1f6b251e9 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 beab81b87..c8ca1089d 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 12c18097f..bd9ea5779 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 c3f74e5c6..e967ed11f 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/proto/private/pbautoconf/auto_config_oss.go b/proto/private/pbautoconf/auto_config_ce.go similarity index 100% rename from proto/private/pbautoconf/auto_config_oss.go rename to proto/private/pbautoconf/auto_config_ce.go diff --git a/proto/private/pbcommon/common_oss.go b/proto/private/pbcommon/common_ce.go similarity index 100% rename from proto/private/pbcommon/common_oss.go rename to proto/private/pbcommon/common_ce.go diff --git a/proto/private/pbpeering/peering_oss.go b/proto/private/pbpeering/peering_ce.go similarity index 100% rename from proto/private/pbpeering/peering_oss.go rename to proto/private/pbpeering/peering_ce.go diff --git a/proto/private/pbservice/convert_oss.go b/proto/private/pbservice/convert_ce.go similarity index 100% rename from proto/private/pbservice/convert_oss.go rename to proto/private/pbservice/convert_ce.go diff --git a/proto/private/pbservice/convert_oss_test.go b/proto/private/pbservice/convert_ce_test.go similarity index 100% rename from proto/private/pbservice/convert_oss_test.go rename to proto/private/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/consul-container/libs/utils/version.go b/test/integration/consul-container/libs/utils/version.go index 91c4da5e3..bad097550 100644 --- a/test/integration/consul-container/libs/utils/version.go +++ b/test/integration/consul-container/libs/utils/version.go @@ -24,7 +24,7 @@ var ( ) const ( - DefaultImageNameOSS = "hashicorp/consul" + DefaultImageNameCE = "hashicorp/consul" DefaultImageNameENT = "hashicorp/consul-enterprise" ImageVersionSuffixENT = "-ent" ) 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 9fefeebf4..2232ed8eb 100644 --- a/test/integration/consul-container/libs/utils/version_oss.go +++ b/test/integration/consul-container/libs/utils/version_ce.go @@ -7,7 +7,7 @@ package utils const ( - defaultImageName = DefaultImageNameOSS + defaultImageName = DefaultImageNameCE ImageVersionSuffix = "" isInEnterpriseRepo = false ) diff --git a/test/integration/consul-container/test/gateways/tenancy_oss.go b/test/integration/consul-container/test/gateways/tenancy_ce.go similarity index 100% rename from test/integration/consul-container/test/gateways/tenancy_oss.go rename to test/integration/consul-container/test/gateways/tenancy_ce.go diff --git a/test/integration/consul-container/test/upgrade/README.md b/test/integration/consul-container/test/upgrade/README.md index 479e680c1..598bdfab3 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/ui/README.md b/ui/README.md index dc3f8e64b..850cff2ab 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 6568638a3..eb0f8703c 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 0855de1da..68ad9cc41 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 a9aa3072c..c23b9ff8d 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 644cce6e7..30e779aa8 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 7bdcac9e0..1a02cf8d5 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 0cd9d4365..f60e2d287 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.