[DRIVERS-2001] Serverless create-instance script should handle wider range of project names Created: 03/Dec/21  Updated: 28/Oct/23  Resolved: 16/Dec/21

Status: Closed
Project: Drivers
Component/s: Serverless
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Driver Changes: Not Needed

 Description   

The create-instance.sh script is responsible for creating serverless instances. It creates the instance names based on the Evergreen project name, which is set in the PROJECT environment variable. The problem is that common project names cause Atlas to return errors. For example, the project name "mongo-java-driver-4.4" results in an this error:

The serverless instance name 697-mongo-java-driver-4.4 is invalid. The name can only contain ASCII letters, numbers, and hyphens.

while the project name "mongo-java-driver-44" results in this error:

Serverless instance name \"9974-mongo-java-driver-44\" is invalid. Atlas truncates serverless instance names to 23 characters which results in an invalid hostname due to a trailing \"\" in the generated serverless instance name prefix \"9974-mongo-java-driver\".

Given that there are many existing projects that don't work with this script, I suggest that we modify this script so that it tolerates a wider range of project names, taking into account whatever rules Atlas has for serverless instance names. Maybe the serverless instance name shouldn't depend on the project name at all. Not sure what the benefit of that is.



 Comments   
Comment by Githook User [ 16/Dec/21 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2001 remove $PROJECT from create-instance (#182)
Branch: master
https://github.com/mongodb-labs/drivers-evergreen-tools/commit/013e525aa9d5167184a6a46f875c1fc19cce582e

Comment by Kevin Albertson [ 14/Dec/21 ]

PR: https://github.com/mongodb-labs/drivers-evergreen-tools/pull/182

Generated at Thu Feb 08 08:24:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.