Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort import regex's #1550

Merged

Conversation

chrisst
Copy link
Contributor

@chrisst chrisst commented Mar 19, 2019

Regex's need to be ordered from the most specific to the least specific. This uses the number of slashes to indicate specificity.

fixes hashicorp/terraform-provider-google#3213


[all]

[terraform]

[terraform-beta]

[ansible]

[inspec]

@chrisst chrisst requested a review from emilymye March 19, 2019 23:40
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
This PR seems not to have generated downstream PRs before, as of f27f70f.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#542
depends: hashicorp/terraform-provider-google#3283

(id_formats + [short_id_format, short_id_default_format]).uniq.reject(&:empty?)
# Regexes should be unique and ordered from most specific to least specific
(id_formats + [short_id_format, short_id_default_format]).
uniq.reject(&:empty?).sort_by{|i| i.count('/')}.reverse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you got a bunch of rubocop issues from spacing stuff but otherwise LGTM

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 0b185af.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

chrisst and others added 3 commits March 20, 2019 22:23
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
@modular-magician modular-magician merged commit f11706a into GoogleCloudPlatform:master Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some import formats for compute routers don't work
4 participants