Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2001

Serverless create-instance script should handle wider range of project names

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: Serverless
    • Labels:
      None
    • Not Needed

      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.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: