Code Monkey home page Code Monkey logo

Comments (6)

CoreyGriffin avatar CoreyGriffin commented on May 16, 2024 3

Thanks @helfrichmichael

Kinda jank...but I ended up adjusting the logic in deploy_impl.py to account for a symbol as needed

@property
    def version(self, name_separator="."):
        """Returns the version string for the App Engine services as a string.

           name_sparator: Optional argument to be set if you need to split
                          username on symbol. Default: None
                          
                          ex: ".", "-", "_"
                          
                          Orginal: first.last-20190219
                          New: firstlast-20190219

           https://github.com/google/loaner/issues/15
        """
        user = getpass.getuser()
        if name_separator is not None:
            split_username = user.split(name_separator)
            user = split_username[0] + split_username[1]
        if self._version:
            return self._version
        return "{user}-{date}".format(
            user=user,
            date=datetime.datetime.strftime(datetime.datetime.now(), "%Y%m%d"),
        )

from loaner.

helfrichmichael avatar helfrichmichael commented on May 16, 2024

Out of curiosity does your username start with admin_? If so, that would explain the issue since it has an underscore which is not permitted according to that error. If this is the case, we might be able to look into simplifying/stripping non-approved characters from usernames.

from loaner.

Korath avatar Korath commented on May 16, 2024

Ah so I've tried it logged in on 2 accounts.

admin@domain
first.last@domain

I assume admin is reserved by system so it changes it to admin_@cloudshell and it doesn't like . so changes that one to first_last@cloudshell

from loaner.

ericwhiteau avatar ericwhiteau commented on May 16, 2024

I had the same issue, using the compute engine vm, as gcp account names are eric_white.

Did the build as root without issue.

from loaner.

CoreyGriffin avatar CoreyGriffin commented on May 16, 2024

I noticed this is still open, and I'm currently running into the same issue with the first.last username setup.

Is there a workaround other than running the build as root or is that the suggested route to take?

from loaner.

helfrichmichael avatar helfrichmichael commented on May 16, 2024

So for what it's worth, this is defined here https://github.com/google/loaner/blob/master/loaner/deployments/deploy_impl.py#L272.

@CoreyGriffin and others - to get around this, you can add the following flag to your deployment script --version="name". You'll replace name with your name or something that meets the criteria for the versioning.

I.E. bash deployments/deploy.sh --version="testing" web prod.

from loaner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.