diff --git a/examples/churn_prediction/Customer Churn Prediction.ipynb b/examples/churn_prediction/Customer Churn Prediction.ipynb index 078b23c6d..8fe727d0e 100644 --- a/examples/churn_prediction/Customer Churn Prediction.ipynb +++ b/examples/churn_prediction/Customer Churn Prediction.ipynb @@ -796,7 +796,7 @@ } ], "source": [ - "warehouse = client.resource(name=\"aqueduct_demo\")\n", + "warehouse = client.resource(name=\"Demo\")\n", "\n", "# customers_table is an Aqueduct TableArtifact, which is a wrapper around\n", "# a Pandas DataFrame. A TableArtifact can be used as argument to any operator\n", diff --git a/examples/diabetes-classifier/Classifying Diabetes Risk.ipynb b/examples/diabetes-classifier/Classifying Diabetes Risk.ipynb index 0f2c63b78..367daa56a 100644 --- a/examples/diabetes-classifier/Classifying Diabetes Risk.ipynb +++ b/examples/diabetes-classifier/Classifying Diabetes Risk.ipynb @@ -1169,7 +1169,7 @@ } ], "source": [ - "demodb = client.resource(\"aqueduct_demo\")\n", + "demodb = client.resource(\"Demo\")\n", "\n", "# mpg_data is an Aqueduct TableArtifact, which is a wrapper around\n", "# a Pandas DataFrame. A TableArtifact can be used as argument to any operator\n", diff --git a/examples/house-price-prediction/House Price Prediction.ipynb b/examples/house-price-prediction/House Price Prediction.ipynb index dce84c0bc..c043e12b1 100644 --- a/examples/house-price-prediction/House Price Prediction.ipynb +++ b/examples/house-price-prediction/House Price Prediction.ipynb @@ -917,7 +917,7 @@ } ], "source": [ - "demo_db = client.resource(\"aqueduct_demo\")\n", + "demo_db = client.resource(\"Demo\")\n", "raw_data = demo_db.sql(\"select * from house_prices;\")\n", "\n", "filled_data = fill_missing_data(raw_data)\n", diff --git a/examples/mpg-regressor/Predicting MPG.ipynb b/examples/mpg-regressor/Predicting MPG.ipynb index 364240f3a..990ff8ef3 100644 --- a/examples/mpg-regressor/Predicting MPG.ipynb +++ b/examples/mpg-regressor/Predicting MPG.ipynb @@ -52,7 +52,7 @@ "id": "3ec5e482", "metadata": {}, "source": [ - "Once we have our client, the first thing we'll do is load our data. Aqueduct has the ability to most common databases and storage systems (check out the Resources page on the Aqueduct UI). Here, we'll load a connection to the default `aqueduct_demo` database, which comes preloaded with a number of [common datasets](https://docs.aqueducthq.com/example-workflows/demo-data-warehouse). \n", + "Once we have our client, the first thing we'll do is load our data. Aqueduct has the ability to most common databases and storage systems (check out the Resources page on the Aqueduct UI). Here, we'll load a connection to the default `Demo` database, which comes preloaded with a number of [common datasets](https://docs.aqueducthq.com/example-workflows/demo-data-warehouse). \n", "\n", "Once we have a connection to the demo DB, we can run a SQL query to retrieve our base data." ] @@ -73,7 +73,7 @@ } ], "source": [ - "demodb = client.resource(\"aqueduct_demo\")\n", + "demodb = client.resource(\"Demo\")\n", "\n", "# mpg_data is an Aqueduct TableArtifact, which is a wrapper around\n", "# a Pandas DataFrame. A TableArtifact can be used as argument to any operator\n", @@ -1735,7 +1735,7 @@ "id": "7f4f4c46", "metadata": {}, "source": [ - "The last line above calls `.save()` on the `predicted_mpg` table. This tells Aqueduct that the results of `predicted_mpg` should be written to a database (in this case the `aqueduct_demo` DB we accessed earlier) into a table called `predicted_mpg`.\n", + "The last line above calls `.save()` on the `predicted_mpg` table. This tells Aqueduct that the results of `predicted_mpg` should be written to a database (in this case the `Demo` DB we accessed earlier) into a table called `predicted_mpg`.\n", "\n", "Now that we've defined our pipeline, we can call `.get()` on `predicted_mpg` to ensure that the pipeline executed successfully. Here, we can verify that our `predicted_mpg` matches what we computed locally:" ] diff --git a/examples/sentiment-analysis/Sentiment Model.ipynb b/examples/sentiment-analysis/Sentiment Model.ipynb index 2f1ee4998..eaa29172a 100644 --- a/examples/sentiment-analysis/Sentiment Model.ipynb +++ b/examples/sentiment-analysis/Sentiment Model.ipynb @@ -78,7 +78,7 @@ "metadata": {}, "outputs": [], "source": [ - "warehouse = client.resource(\"aqueduct_demo\")\n", + "warehouse = client.resource(\"Demo\")\n", "\n", "# reviews_table is an Aqueduct TableArtifact, which is a wrapper around\n", "# a Pandas DataFrame. A TableArtifact can be used as argument to any operator\n", diff --git a/examples/tutorials/Parameters Tutorial.ipynb b/examples/tutorials/Parameters Tutorial.ipynb index 3b9a9b57e..6dba9c932 100644 --- a/examples/tutorials/Parameters Tutorial.ipynb +++ b/examples/tutorials/Parameters Tutorial.ipynb @@ -58,7 +58,7 @@ "metadata": {}, "outputs": [], "source": [ - "db = client.resource(\"aqueduct_demo\")\n", + "db = client.resource(\"Demo\")\n", "\n", "# reviews_table is an Aqueduct TableArtifact, which is a wrapper around\n", "# a Pandas DataFrame. A TableArtifact can be used as argument to any operator\n", diff --git a/examples/tutorials/Quickstart Tutorial.ipynb b/examples/tutorials/Quickstart Tutorial.ipynb index ce9622b87..331e4631a 100644 --- a/examples/tutorials/Quickstart Tutorial.ipynb +++ b/examples/tutorials/Quickstart Tutorial.ipynb @@ -60,7 +60,7 @@ "---\n", "### Accessing Data\n", "\n", - "The base data for our workflow is the [hotel reviews](https://docs.aqueducthq.com/integrations/aqueduct-demo-integration) dataset in the pre-built aqueduct_demo that comes with the Aqueduct server. This code does two things -- (1) it loads a connection to the demo database, and (2) it runs a SQL query against that DB and returns a pointer to the resulting dataset." + "The base data for our workflow is the [hotel reviews](https://docs.aqueducthq.com/integrations/aqueduct-demo-integration) dataset in the pre-built Demo that comes with the Aqueduct server. This code does two things -- (1) it loads a connection to the demo database, and (2) it runs a SQL query against that DB and returns a pointer to the resulting dataset." ] }, { @@ -222,7 +222,7 @@ } ], "source": [ - "demo_db = client.resource(\"aqueduct_demo\")\n", + "demo_db = client.resource(\"Demo\")\n", "reviews_table = demo_db.sql(\"select * from hotel_reviews;\")\n", "\n", "# You will see the type of `reviews_table` is an Aqueduct TableArtifact.\n", diff --git a/examples/wine-ratings-prediction/Predict Missing Wine Ratings.ipynb b/examples/wine-ratings-prediction/Predict Missing Wine Ratings.ipynb index c2d9bd195..b0724937a 100644 --- a/examples/wine-ratings-prediction/Predict Missing Wine Ratings.ipynb +++ b/examples/wine-ratings-prediction/Predict Missing Wine Ratings.ipynb @@ -64,7 +64,7 @@ "metadata": {}, "outputs": [], "source": [ - "demodb = client.resource(\"aqueduct_demo\")\n", + "demodb = client.resource(\"Demo\")\n", "\n", "# wines is an Aqueduct TableArtifact, which is a wrapper around\n", "# a Pandas DataFrame. A TableArtifact can be used as argument to any operator\n", diff --git a/integration_tests/no_concurrency/sdk/utils.py b/integration_tests/no_concurrency/sdk/utils.py index 1590eed1e..804b869a3 100644 --- a/integration_tests/no_concurrency/sdk/utils.py +++ b/integration_tests/no_concurrency/sdk/utils.py @@ -2,4 +2,4 @@ def get_integration_name() -> str: - return "aqueduct_demo" + return "Demo" diff --git a/integration_tests/notebook/imported_function.ipynb b/integration_tests/notebook/imported_function.ipynb index 5e5d7b9de..d8091daed 100644 --- a/integration_tests/notebook/imported_function.ipynb +++ b/integration_tests/notebook/imported_function.ipynb @@ -49,7 +49,7 @@ } ], "source": [ - "warehouse = client.resource(name=\"aqueduct_demo\")\n", + "warehouse = client.resource(name=\"Demo\")\n", "customers_table = warehouse.sql(query=\"SELECT * FROM customers;\")\n", "print(type(customers_table))" ] diff --git a/integration_tests/notebook/util_dependency.ipynb b/integration_tests/notebook/util_dependency.ipynb index 6d1048951..dc87e0f3f 100644 --- a/integration_tests/notebook/util_dependency.ipynb +++ b/integration_tests/notebook/util_dependency.ipynb @@ -45,7 +45,7 @@ "metadata": {}, "outputs": [], "source": [ - "warehouse = client.resource(name=\"aqueduct_demo\")\n", + "warehouse = client.resource(name=\"Demo\")\n", "customers_table = warehouse.sql(query=\"SELECT * FROM customers;\")\n", "print(type(customers_table))" ] diff --git a/integration_tests/sdk/aqueduct_tests/integration_test.py b/integration_tests/sdk/aqueduct_tests/integration_test.py index e2c48001c..f34ddbc41 100644 --- a/integration_tests/sdk/aqueduct_tests/integration_test.py +++ b/integration_tests/sdk/aqueduct_tests/integration_test.py @@ -40,7 +40,7 @@ def test_invalid_connect_integration(client): with pytest.raises( InvalidUserActionException, match="An integration with this name already exists." ): - client.connect_resource("aqueduct_demo", "SQLite", config) + client.connect_resource("Demo", "SQLite", config) # Service is invalid. with pytest.raises( diff --git a/integration_tests/sdk/conftest.py b/integration_tests/sdk/conftest.py index a6997ee75..e0c513e91 100644 --- a/integration_tests/sdk/conftest.py +++ b/integration_tests/sdk/conftest.py @@ -122,6 +122,10 @@ def data_integration(request, pytestconfig, client): "Skipped. Tests are only running against data integration %s." % cmdline_data_flag ) + # Translate aqueduct_demo -> Demo integration. + if request.param == "aqueduct_demo": + return client.resource("Demo") + return client.resource(request.param) diff --git a/integration_tests/sdk/setup_integration.py b/integration_tests/sdk/setup_integration.py index 8f376c775..db25a6415 100644 --- a/integration_tests/sdk/setup_integration.py +++ b/integration_tests/sdk/setup_integration.py @@ -107,7 +107,7 @@ def _add_missing_artifacts( if len(missing_names) == 0: return - demo = client.resource("aqueduct_demo") + demo = client.resource("Demo") artifacts: List[BaseArtifact] = [] for table_name in missing_names: data = _fetch_demo_data(demo, table_name) @@ -205,6 +205,8 @@ def setup_data_integrations(client: Client, filter_to: Optional[str] = None) -> # No need to do any setup for the demo db. if "aqueduct_demo" in data_integrations: data_integrations.remove("aqueduct_demo") + if "Demo" in data_integrations: + data_integrations.remove("Demo") if len(data_integrations) == 0: return diff --git a/manual_qa_tests/README.md b/manual_qa_tests/README.md index 05e31713c..c2a29313c 100644 --- a/manual_qa_tests/README.md +++ b/manual_qa_tests/README.md @@ -25,12 +25,12 @@ To run with more flexibility, configure the following commandline flags: * **Workflow Details** Page: Each page should reflect the **workflow description**. Pay attention to any noted **sidesheets** behaviors in the description. * **Integration** Page: * There should be **1** *Cloud* integration, **11** *Data* integrations, **6** *Compute* integrations, and **2** *Notifications* integrations. - * If you are not using additional integration, `aqueduct_demo` should be the only available one. If you have passed in slack arguments to `initialize.py`, there should be two. + * If you are not using additional integration, `Demo` should be the only available one. If you have passed in slack arguments to `initialize.py`, there should be two. * **Integration Details** Page: - * In the **Workflows** section of the `aqueduct_demo` page: + * In the **Workflows** section of the `Demo` page: * There should be **13** workflows if using `--example-notebooks` * There should be **7** workflows if **not** using `--example-notebooks` - * If you are using `aqueduct_demo`, there should be **8** tables in **Data** section. + * If you are using `Demo`, there should be **8** tables in **Data** section. * **Data** Page: There should be **7** data rows available. * **Slack channel**: * If Slack flags are set, there should be **15** new notifications. diff --git a/manual_qa_tests/initialize.py b/manual_qa_tests/initialize.py index 7c068a809..81814a870 100644 --- a/manual_qa_tests/initialize.py +++ b/manual_qa_tests/initialize.py @@ -69,7 +69,7 @@ def deploy_flow(name, deploy_fn, api_key, address, data_integration) -> None: if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--addr", default="localhost:8080") - parser.add_argument("--data-integration", default="aqueduct_demo") + parser.add_argument("--data-integration", default="Demo") parser.add_argument("--api-key", default="") # parser.add_argument("-q", "--quiet", action="store_true") parser.add_argument("--example-notebooks", action="store_true") diff --git a/sdk/aqueduct/client.py b/sdk/aqueduct/client.py index b41969b75..91c4f1fe5 100644 --- a/sdk/aqueduct/client.py +++ b/sdk/aqueduct/client.py @@ -119,6 +119,10 @@ def get_apikey() -> str: exit(1) +DEPRECATED_AQUEDUCT_DEMO_DB_NAME = "aqueduct_demo" +AQUEDUCT_DEMO_DB_NAME = "Demo" + + class Client: """This class allows users to interact with flows on their Aqueduct cluster.""" @@ -306,12 +310,19 @@ def delete_resource( The name of the integration to delete. """ existing_integrations = globals.__GLOBAL_API_CLIENT__.list_resources() + + # If the user uses the deprecated demo name, and there isn't a resource for this, that means they actually + # want to use the new demo name. + if ( + name == DEPRECATED_AQUEDUCT_DEMO_DB_NAME + and DEPRECATED_AQUEDUCT_DEMO_DB_NAME not in existing_integrations.keys() + ) or name == AQUEDUCT_DEMO_DB_NAME: + raise InvalidUserActionException("Cannot delete the Aqueduct demo database: %s" % name) if name not in existing_integrations.keys(): raise InvalidIntegrationException("Not connected to integration %s!" % name) - globals.__GLOBAL_API_CLIENT__.delete_integration(existing_integrations[name].id) - # Update the connected integrations cached on this object. + globals.__GLOBAL_API_CLIENT__.delete_integration(existing_integrations[name].id) self._connected_integrations = globals.__GLOBAL_API_CLIENT__.list_resources() def list_integrations(self) -> Dict[str, ResourceInfo]: @@ -385,8 +396,19 @@ def resource( incompatible type. """ self._connected_integrations = globals.__GLOBAL_API_CLIENT__.list_resources() + connected_names = self._connected_integrations.keys() + + if name == DEPRECATED_AQUEDUCT_DEMO_DB_NAME: + # If the user uses the deprecated demo name, and there isn't a resource for this, that means they actually + # want to use the new demo name. We implicitly convert this for them, with a warning. + if DEPRECATED_AQUEDUCT_DEMO_DB_NAME not in connected_names: + logger().warning( + "`%s` is the deprecated name for the aqueduct demo db. Please use `%s` instead." + % (DEPRECATED_AQUEDUCT_DEMO_DB_NAME, AQUEDUCT_DEMO_DB_NAME) + ) + name = AQUEDUCT_DEMO_DB_NAME - if name not in self._connected_integrations.keys(): + if name not in connected_names: raise InvalidIntegrationException("Not connected to integration %s!" % name) integration_info = self._connected_integrations[name] diff --git a/sdk/aqueduct/constants/enums.py b/sdk/aqueduct/constants/enums.py index ed6dbbc95..0df5202f8 100644 --- a/sdk/aqueduct/constants/enums.py +++ b/sdk/aqueduct/constants/enums.py @@ -61,7 +61,6 @@ class ServiceType(str, Enum, metaclass=MetaEnum): MARIADB = "MariaDB" SQLSERVER = "SQL Server" BIGQUERY = "BigQuery" - AQUEDUCTDEMO = "Aqueduct Demo" GITHUB = "Github" SALESFORCE = "Salesforce" GOOGLE_SHEETS = "Google Sheets" @@ -93,7 +92,6 @@ class RelationalDBServices(str, Enum, metaclass=MetaEnum): MARIADB = "MariaDB" SQLSERVER = "SQL Server" BIGQUERY = "BigQuery" - AQUEDUCTDEMO = "Aqueduct Demo" SQLITE = "SQLite" ATHENA = "Athena" diff --git a/sdk/aqueduct/github.py b/sdk/aqueduct/github.py index 5a25a9ed7..670f65094 100644 --- a/sdk/aqueduct/github.py +++ b/sdk/aqueduct/github.py @@ -201,7 +201,7 @@ def query( ``` Then to use it: ``` - warehouse = aqueduct_client.resource(name="aqueduct_demo") + warehouse = aqueduct_client.resource(name="Demo") gh = aqueduct_client.github(repo=, branch=) reviews = warehouse.sql( query=gh.query(path="queries/hotel.sql") diff --git a/sdk/aqueduct/models/integration.py b/sdk/aqueduct/models/integration.py index c06e9a921..0c1e583d5 100644 --- a/sdk/aqueduct/models/integration.py +++ b/sdk/aqueduct/models/integration.py @@ -54,7 +54,6 @@ def is_relational(self) -> bool: ServiceType.MARIADB, ServiceType.SQLSERVER, ServiceType.BIGQUERY, - ServiceType.AQUEDUCTDEMO, ServiceType.SQLITE, ServiceType.ATHENA, ] diff --git a/sdk/aqueduct/resources/sql.py b/sdk/aqueduct/resources/sql.py index d6e6d503a..e4f9b68de 100644 --- a/sdk/aqueduct/resources/sql.py +++ b/sdk/aqueduct/resources/sql.py @@ -64,7 +64,6 @@ def list_tables(self) -> pd.DataFrame: if self.type() in [ ServiceType.POSTGRES, - ServiceType.AQUEDUCTDEMO, ServiceType.REDSHIFT, ]: list_tables_query = LIST_TABLES_QUERY_PG diff --git a/src/golang/cmd/server/handler/connect_integration.go b/src/golang/cmd/server/handler/connect_integration.go index 56d520dc5..955e03751 100644 --- a/src/golang/cmd/server/handler/connect_integration.go +++ b/src/golang/cmd/server/handler/connect_integration.go @@ -123,6 +123,12 @@ func (h *ConnectIntegrationHandler) Prepare(r *http.Request) (interface{}, int, return nil, http.StatusBadRequest, errors.New("Resource name is not provided") } + // On startup, we currently enforce that such a resource does not exist by forcibly deleting it. + // Therefore, we don't want users to be able to create a resource with this name. + if name == shared.DeprecatedDemoDBResourceName && service == shared.Sqlite { + return nil, http.StatusBadRequest, errors.Newf("%s is a reserved name for SQLite resources.", shared.DeprecatedDemoDBResourceName) + } + if service == shared.Github || service == shared.GoogleSheets { return nil, http.StatusBadRequest, errors.Newf("%s integration type is currently not supported", service) } diff --git a/src/golang/cmd/server/server/aqueduct_server.go b/src/golang/cmd/server/server/aqueduct_server.go index a4d1e6a3a..30c2e47d2 100644 --- a/src/golang/cmd/server/server/aqueduct_server.go +++ b/src/golang/cmd/server/server/aqueduct_server.go @@ -135,6 +135,7 @@ func NewAqServer(environment aq_context.ServerEnvironment, externalIP string, po log.Fatal(err) } + // If the deprecated demo db name still exists in the database, we delete it in this check too. demoDBConnected, aqEngineConnected, err := CheckBuiltinIntegrations(ctx, s, accountOrganizationId) if err != nil { db.Close() diff --git a/src/golang/cmd/server/server/test_account.go b/src/golang/cmd/server/server/test_account.go index cd0b1f08e..4a04dda3f 100644 --- a/src/golang/cmd/server/server/test_account.go +++ b/src/golang/cmd/server/server/test_account.go @@ -44,6 +44,8 @@ func CreateTestAccount( } // CheckBuiltinIntegrations returns whether the builtin demo and compute integrations already exist. +// If we notice that the deprecated demo integration exists, we delete it. We expect the caller to add +// the appropriate demo integration with `ConnectBuiltinDemoDBIntegration()` next. func CheckBuiltinIntegrations(ctx context.Context, s *AqServer, orgID string) (bool, bool, error) { integrations, err := s.IntegrationRepo.GetByOrg( context.Background(), @@ -57,10 +59,18 @@ func CheckBuiltinIntegrations(ctx context.Context, s *AqServer, orgID string) (b demoConnected := false engineConnected := false for _, integrationObject := range integrations { - if integrationObject.Name == shared.DemoDbIntegrationName { + if integrationObject.Name == shared.DeprecatedDemoDBResourceName && integrationObject.Service == shared.Sqlite { + if err := s.IntegrationRepo.Delete( + ctx, + integrationObject.ID, + s.Database, + ); err != nil { + return false, false, errors.Newf("Unable to delete deprecated demo integration: %v", err) + } + continue + } else if integrationObject.Name == shared.DemoDbIntegrationName { demoConnected = true - } - if integrationObject.Name == shared.AqueductComputeIntegrationName { + } else if integrationObject.Name == shared.AqueductComputeIntegrationName { engineConnected = true } diff --git a/src/golang/lib/job/k8s.go b/src/golang/lib/job/k8s.go index c445210fc..f0b2b556e 100644 --- a/src/golang/lib/job/k8s.go +++ b/src/golang/lib/job/k8s.go @@ -364,7 +364,7 @@ func mapJobTypeToDockerImage(spec Spec, launchGpu bool, cudaVersion operator.Cud func mapIntegrationServiceToDockerImage(service shared.Service) (string, error) { switch service { - case shared.Postgres, shared.Redshift, shared.AqueductDemo: + case shared.Postgres, shared.Redshift: return PostgresConnectorDockerImage, nil case shared.Snowflake: return SnowflakeConnectorDockerImage, nil diff --git a/src/golang/lib/job/lambda.go b/src/golang/lib/job/lambda.go index cb8f6620a..4191dfff8 100644 --- a/src/golang/lib/job/lambda.go +++ b/src/golang/lib/job/lambda.go @@ -258,7 +258,7 @@ func mapIntegrationServiceToLambdaFunction(service shared.Service) (string, erro switch service { case shared.Snowflake: return lambda_utils.SnowflakeLambdaFunction, nil - case shared.Postgres, shared.Redshift, shared.AqueductDemo: + case shared.Postgres, shared.Redshift: return lambda_utils.PostgresLambdaFunction, nil case shared.BigQuery: return lambda_utils.BigQueryLambdaFunction, nil diff --git a/src/golang/lib/models/shared/operator/connector/extract.go b/src/golang/lib/models/shared/operator/connector/extract.go index 1edf8838a..33cf2503e 100644 --- a/src/golang/lib/models/shared/operator/connector/extract.go +++ b/src/golang/lib/models/shared/operator/connector/extract.go @@ -36,7 +36,7 @@ func (e *Extract) UnmarshalJSON(data []byte) error { // Initialize correct destination struct for this operator's Extract.Parameters var params ExtractParams switch e.Service { - case shared.Postgres, shared.AqueductDemo: + case shared.Postgres: params = &PostgresExtractParams{} case shared.Athena: params = &AthenaExtractParams{} diff --git a/src/golang/lib/models/shared/operator/connector/load.go b/src/golang/lib/models/shared/operator/connector/load.go index 33da7f059..2548123a8 100644 --- a/src/golang/lib/models/shared/operator/connector/load.go +++ b/src/golang/lib/models/shared/operator/connector/load.go @@ -37,7 +37,7 @@ func (l *Load) UnmarshalJSON(data []byte) error { // Initialize correct destination struct for this operator's Load.Parameters var params LoadParams switch l.Service { - case shared.Postgres, shared.AqueductDemo: + case shared.Postgres: params = &PostgresLoadParams{} case shared.Snowflake: params = &SnowflakeLoadParams{} diff --git a/src/golang/lib/models/shared/service.go b/src/golang/lib/models/shared/service.go index 05bddb676..92100c860 100644 --- a/src/golang/lib/models/shared/service.go +++ b/src/golang/lib/models/shared/service.go @@ -39,26 +39,31 @@ const ( // Container registry integrations ECR Service = "ECR" - // Built-in integrations - Aqueduct Service = "Aqueduct" - AqueductDemo Service = "Aqueduct Demo" + // Aqueduct compute is the only build-in resource type. + Aqueduct Service = "Aqueduct" + // Built-in resource names AqueductComputeIntegrationName = "Aqueduct Server" - DemoDbIntegrationName = "aqueduct_demo" + DemoDbIntegrationName = "Demo" + + // This is what the demo DB resource used to be called, during release v0.3.1 and before. + // If we detect a SQLite resource with this name, we will delete it on startup and + // make sure that the new resource name is being used. This means that we prevent anyone + // from registering any new SQLite integrations with this name. + DeprecatedDemoDBResourceName = "aqueduct_demo" ) var relationalDatabaseIntegrations map[Service]bool = map[Service]bool{ - Postgres: true, - Snowflake: true, - MySql: true, - Redshift: true, - MariaDb: true, - SqlServer: true, - BigQuery: true, - AqueductDemo: true, - Sqlite: true, - Athena: true, - MongoDB: true, + Postgres: true, + Snowflake: true, + MySql: true, + Redshift: true, + MariaDb: true, + SqlServer: true, + BigQuery: true, + Sqlite: true, + Athena: true, + MongoDB: true, } var dataIntegrations map[Service]bool = map[Service]bool{ @@ -72,7 +77,6 @@ var dataIntegrations map[Service]bool = map[Service]bool{ GoogleSheets: true, Salesforce: true, S3: true, - AqueductDemo: true, Sqlite: true, Athena: true, MongoDB: true, @@ -118,7 +122,6 @@ func ParseService(s string) (Service, error) { Salesforce, S3, Athena, - AqueductDemo, Github, Sqlite, Airflow, diff --git a/src/golang/lib/repos/tests/seed.go b/src/golang/lib/repos/tests/seed.go index 87fc24bc5..aa2cf83f7 100644 --- a/src/golang/lib/repos/tests/seed.go +++ b/src/golang/lib/repos/tests/seed.go @@ -21,7 +21,7 @@ import ( const ( // Defaults used for seeding database records testOrgID = "aqueduct-test" - testIntegrationService = shared.AqueductDemo + testIntegrationService = shared.Sqlite ) // seedStorageMigraton creates a 5 storage migration records, alternating between diff --git a/src/python/aqueduct_executor/operators/connectors/data/common.py b/src/python/aqueduct_executor/operators/connectors/data/common.py index 73cf7faa5..eaa2a3422 100644 --- a/src/python/aqueduct_executor/operators/connectors/data/common.py +++ b/src/python/aqueduct_executor/operators/connectors/data/common.py @@ -15,7 +15,6 @@ class Name(Enum, metaclass=enums.MetaEnum): S3 = "S3" ATHENA = "Athena" SQLITE = "SQLite" - AQUEDUCT_DEMO = "Aqueduct Demo" GCS = "GCS" MONGO_DB = "MongoDB" diff --git a/src/python/aqueduct_executor/operators/connectors/data/execute.py b/src/python/aqueduct_executor/operators/connectors/data/execute.py index 0abb3a1ae..5256a5dfe 100644 --- a/src/python/aqueduct_executor/operators/connectors/data/execute.py +++ b/src/python/aqueduct_executor/operators/connectors/data/execute.py @@ -305,7 +305,7 @@ def setup_connector( ) -> connector.DataConnector: # prevent isort from moving around type: ignore comments which will cause mypy issues. # isort: off - if connector_name == common.Name.AQUEDUCT_DEMO or connector_name == common.Name.POSTGRES: + if connector_name == common.Name.POSTGRES: try: import psycopg2 except: diff --git a/src/python/aqueduct_executor/operators/connectors/data/spec.py b/src/python/aqueduct_executor/operators/connectors/data/spec.py index 58756d803..b3a0aba25 100644 --- a/src/python/aqueduct_executor/operators/connectors/data/spec.py +++ b/src/python/aqueduct_executor/operators/connectors/data/spec.py @@ -13,7 +13,7 @@ from aqueduct_executor.operators.utils.storage import config as sconfig from pydantic import parse_obj_as, validator -AQUEDUCT_DEMO_NAME = "aqueduct_demo" +AQUEDUCT_DEMO_NAME = "Demo" def unwrap_connector_config(cls, connector_config, values): # type: ignore diff --git a/src/ui/common/src/components/cards/GettingStartedTutorial.tsx b/src/ui/common/src/components/cards/GettingStartedTutorial.tsx index 0c1090115..e63917844 100644 --- a/src/ui/common/src/components/cards/GettingStartedTutorial.tsx +++ b/src/ui/common/src/components/cards/GettingStartedTutorial.tsx @@ -126,8 +126,8 @@ const GettingStartedTutorial: React.FC = ({ resources {' '} page and connect a database. If you don't have a - database handy, you can use the aqueduct_demo{' '} - database -- see the documentation{' '} + database handy, you can use the Demo database + -- see the documentation{' '} here diff --git a/src/ui/common/src/components/integrations/cards/aqueductDemoCard.tsx b/src/ui/common/src/components/integrations/cards/aqueductDemoCard.tsx deleted file mode 100644 index 20b6eb30b..000000000 --- a/src/ui/common/src/components/integrations/cards/aqueductDemoCard.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; - -import { Integration } from '../../../utils/integrations'; - -type Props = { - integration: Integration; -}; - -export const AqueductDemoCard: React.FC = ({ integration }) => { - return null; -}; diff --git a/src/ui/common/src/components/integrations/cards/resourceFieldsDetailsCard.tsx b/src/ui/common/src/components/integrations/cards/resourceFieldsDetailsCard.tsx index be0af0fd4..8b43f970d 100644 --- a/src/ui/common/src/components/integrations/cards/resourceFieldsDetailsCard.tsx +++ b/src/ui/common/src/components/integrations/cards/resourceFieldsDetailsCard.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { Integration } from 'src/utils/integrations'; import { AirflowCard } from './airflowCard'; -import { AqueductDemoCard } from './aqueductDemoCard'; import { AthenaCard } from './athenaCard'; import AWSCard from './awsCard'; import { BasicDBCard } from './basicDBCard'; @@ -45,9 +44,6 @@ export const ResourceFieldsDetailsCard: React.FC< ); break; - case 'Aqueduct Demo': - serviceCard = ; - break; case 'MongoDB': serviceCard = ; break; diff --git a/src/ui/common/src/components/integrations/dialogs/dialog.tsx b/src/ui/common/src/components/integrations/dialogs/dialog.tsx index 28cb0c25d..b6de98ee3 100644 --- a/src/ui/common/src/components/integrations/dialogs/dialog.tsx +++ b/src/ui/common/src/components/integrations/dialogs/dialog.tsx @@ -23,7 +23,6 @@ import { AppDispatch, RootState } from '../../../stores/store'; import UserProfile from '../../../utils/auth'; import { AirflowConfig, - aqueductDemoName, AthenaConfig, AWSConfig, BigQueryConfig, @@ -151,10 +150,7 @@ const IntegrationDialog: React.FC = ({ const connectStatus = editMode ? editStatus : connectNewStatus; const disableConnect = - !editMode && - (!isConfigComplete(config, service) || - name === '' || - name === aqueductDemoName); + !editMode && (!isConfigComplete(config, service) || name === ''); const setConfigField = (field: string, value: string) => setConfig((config) => { return { ...config, [field]: value }; @@ -229,9 +225,6 @@ const IntegrationDialog: React.FC = ({ /> ); break; - case 'Aqueduct Demo': - serviceDialog = null; - break; case 'MySQL': serviceDialog = ( = ({ setShouldShowNameError(false); }} value={name} - disabled={service === 'Aqueduct Demo'} /> ); diff --git a/src/ui/common/src/components/integrations/options.tsx b/src/ui/common/src/components/integrations/options.tsx index ecd0beb8d..9758dd9f4 100644 --- a/src/ui/common/src/components/integrations/options.tsx +++ b/src/ui/common/src/components/integrations/options.tsx @@ -83,24 +83,19 @@ const IntegrationOptions: React.FC = ({ - {!isBuiltinIntegration(integration) && - integration.service !== 'AWS' && ( - { - setAnchorEl(null); - onEdit(); - }} - > - - - Edit Resource - - - )} + {integration.service !== 'AWS' && ( + { + setAnchorEl(null); + onEdit(); + }} + > + + + Edit Resource + + + )} {!isBuiltinIntegration(integration) && allowDeletion && ( { diff --git a/src/ui/common/src/components/pages/integration/id/index.tsx b/src/ui/common/src/components/pages/integration/id/index.tsx index 8341cccba..443182637 100644 --- a/src/ui/common/src/components/pages/integration/id/index.tsx +++ b/src/ui/common/src/components/pages/integration/id/index.tsx @@ -349,15 +349,16 @@ const IntegrationDetailsPage: React.FC = ({ )} - {selectedIntegration.name === 'aqueduct_demo' && ( - - You can see the documentation for the Aqueduct Demo database{' '} - - here - - . - - )} + {selectedIntegration.name === 'Demo' && + selectedIntegration.service == 'SQLite' && ( + + You can see the documentation for the Aqueduct Demo database{' '} + + here + + . + + )} {showResourceDetails && ( diff --git a/src/ui/common/src/index.tsx b/src/ui/common/src/index.tsx index 21f80e42f..0581a9aa4 100644 --- a/src/ui/common/src/index.tsx +++ b/src/ui/common/src/index.tsx @@ -4,7 +4,6 @@ import ExecutionChip from './components/execution/chip'; import { useAqueductConsts } from './components/hooks/useAqueductConsts'; import useUser from './components/hooks/useUser'; import AddIntegrations from './components/integrations/addIntegrations'; -import { AqueductDemoCard } from './components/integrations/cards/aqueductDemoCard'; import { AWSCard } from './components/integrations/cards/awsCard'; import { BigQueryCard } from './components/integrations/cards/bigqueryCard'; import { IntegrationCard } from './components/integrations/cards/card'; @@ -195,7 +194,6 @@ export { AddTableDialog, aqueductApi, AqueductBezier, - AqueductDemoCard, AqueductQuadratic, AqueductStraight, archiveNotification, diff --git a/src/ui/common/src/utils/integrations.ts b/src/ui/common/src/utils/integrations.ts index 506019e24..a3b62f96d 100644 --- a/src/ui/common/src/utils/integrations.ts +++ b/src/ui/common/src/utils/integrations.ts @@ -270,7 +270,6 @@ export type Service = | 'S3' | 'Athena' | 'GCS' - | 'Aqueduct Demo' | 'Airflow' | 'Kubernetes' | 'SQLite' diff --git a/src/ui/common/src/utils/operators.ts b/src/ui/common/src/utils/operators.ts index 8b163fd9f..3ffa4a072 100644 --- a/src/ui/common/src/utils/operators.ts +++ b/src/ui/common/src/utils/operators.ts @@ -75,7 +75,6 @@ export enum ServiceType { MariaDB = 'MariaDB', SQLServer = 'SQL Server', BigQuery = 'BigQuery', - AqueductDemo = 'Aqueduct Demo', SQLite = 'SQLite', Athena = 'Athena', S3 = 'S3', @@ -90,7 +89,6 @@ export enum RelationalDBServices { MariaDB = 'MariaDB', SQLServer = 'SQL Server', BigQuery = 'BigQuery', - AqueductDemo = 'Aqueduct Demo', SQLite = 'SQLite', Athena = 'Athena', }