Skip to content

Storage: This doesn't match our existing project ID: hello-rightscale002 #4447

Closed

Activity

  1. added
    api: storageIssues related to the Cloud Storage API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Nov 24, 2017
  2. changed the title [-]This doesn't match our existing project ID: hello-rightscale002[/-] [+]Storage: This doesn't match our existing project ID: hello-rightscale002[/+] on Nov 24, 2017
  3. chemelnucfin commented on Nov 27, 2017

    @chemelnucfin
    Contributor

    I think the project id specifications have changed. I will try to find out more about what they should be and adjust the regex accordingly.

  4. added a commit that references this issue on Nov 28, 2017
    bab607d
  5. chemelnucfin commented on Nov 28, 2017

    @chemelnucfin
    Contributor

    Hi @papudesi, dhermes suggested a temporary fix while I try to find the actual project id. I will leave this issue open until I can find the actual requirements.

    import re
    
    from google.cloud.storage import notification
    
    
    notification._PROJECT_PATTERN = r'(?P<project>[a-z]+-[a-z]+\d+)'
    notification._TOPIC_REF_PATTERN = notification._TOPIC_REF_FMT.format(
        notification._PROJECT_PATTERN,
        notification._TOPIC_NAME_PATTERN)
    notification._TOPIC_REF_RE = re.compile(notification._TOPIC_REF_PATTERN)`
  6. hrfuller commented on Dec 6, 2017

    @hrfuller
    Contributor

    Also running into this with an existing project id of the form my-project. The suggested solution in #4467 wouldn't work for it anyway. I will also monkey patch the regex.

  7. tseaver commented on Dec 6, 2017

    @tseaver
    Contributor

    The resource manager API docs say:

    The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited.

  8. dhermes commented on Dec 6, 2017

    @dhermes
    Contributor

    @tseaver Nice find! (I assume you are implicitly saying "The current regex doesn't match that.")

  9. chemelnucfin commented on Dec 6, 2017

    @chemelnucfin
    Contributor
  10. tseaver commented on Dec 6, 2017

    @tseaver
    Contributor

    The current regex insists on three hyphen-separated tokens, the first two of which must be alpha-only, and the last of which must be numeric-only. A regex which fits the spec I quoted would be:

    _PROJECT_PATTERN = r'(?P<project>[a-z0-9-]{5,29}[a-z0-9])'
  11. tseaver commented on Dec 6, 2017

    @tseaver
    Contributor

    FTR, pythex is a cool way to test / debug regexes.

  12. chemelnucfin commented on Dec 13, 2017

    @chemelnucfin
    Contributor

    Closed via #4543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions