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

Fix Vscale hostedzone #1925

Merged
merged 1 commit into from Nov 3, 2019

Conversation

@kuk
Copy link
Contributor

kuk commented Nov 16, 2018

In case of >1 domains "{.*\"name\":\s*\"$h\".*}")" matches {id: 1, name: a}, {id: 2, name: $h} that leads to wrong id (we look for id=2, but match id=1)

{[^{]*\"name\":\s*\"$h\"[^}]*} matches just {id: 2, name: $h}

@kuk

This comment has been minimized.

Copy link
Contributor Author

kuk commented Nov 1, 2019

@Neilpang could you please take a look at this PR. Currently Vscale DNS integration is broken, this PR fixes it

@Neilpang

This comment has been minimized.

Copy link
Owner

Neilpang commented Nov 1, 2019

there can be more graceful fixes, for example:

echo  '{id: 1, name: a}, {id: 2, name: $h}' | tr "{" "\n" | grep "\"name\":\s*\"$h\".*}"

Split the text into multiple lines before greping them.

Because grep "[^{]" is not always safe on all the platforms.

@kuk kuk force-pushed the kuk:master branch from 79b5e03 to 6eaf2d6 Nov 3, 2019
@kuk

This comment has been minimized.

Copy link
Contributor Author

kuk commented Nov 3, 2019

Thank you, changed the code

@Neilpang Neilpang merged commit 6140a3c into Neilpang:dev Nov 3, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.