-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🎉 Source Looker: enable supporting of customer-hosted (self-hosted) instances #3587
Changes from 7 commits
2c6d916
78cd567
da173ab
846c10d
6af8b3d
2782739
5be65ce
8c6f412
7d58efa
a245335
4ff70eb
cd9e005
319b73a
a651528
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -9,9 +9,15 @@ | |||||
"properties": { | ||||||
"domain": { | ||||||
"type": "string", | ||||||
"pattern": ["^[a-zA-Z0-9._-]*\\.looker\\.com$"], | ||||||
"examples": ["domainname.looker.com"], | ||||||
"description": "Domain for your Looker account, e.g. airbyte.cloud.looker.com" | ||||||
"pattern": [ | ||||||
"(^[a-zA-Z0-9._-]*\\.looker\\.com$)|(^(?:[a-zA-Z0-9._-]*)?[a-zA-Z0-9._-]*\\.[a-zA-Z0-9._-]*$)|(^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(?::\\d{1,5})?$)" | ||||||
], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pattern needs to be checked. For example, the second group requires entry string dived at least by two dots. I think this is wrong. The third group has no segment length limitation. |
||||||
"examples": [ | ||||||
"domainname.looker.com", | ||||||
"looker.clientname.com", | ||||||
"123.123.124.123:8000" | ||||||
], | ||||||
"description": "Domain for your Looker account, e.g. airbyte.cloud.looker.com,looker.[clientname].com,ip address" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}, | ||||||
"client_id": { | ||||||
"title": "Client ID", | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you create unit tests to verify this works? I'm not sure the second regex works as intended. I tested it on https://regex101.com/ with
looker.airbyte.com
and it didn't work.If it's too hard to pin down the regex then we can remove the
pattern
entirely and rely on thecheck
operation to verify the domain is correct.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(^(?:[a-zA-Z0-9._-]*)?[a-zA-Z0-9._-]*\\.[a-zA-Z0-9._-]*$)
-->pattern in spec.json(^(?:[a-zA-Z0-9._-]*)?[a-zA-Z0-9._-]*\.[a-zA-Z0-9._-]*$)
--->pattern in python(used for testing in regexp101)Did you try changing
\\.
to\.
and then test it on regexp101. since '.' have special meaning ..we use\
as an escape character in python. But regexp pattern in spec.json file expects us to use\\
as an escape character. Same applies for matching the digits\d
in third pattern. Please find the snap below that matches several domains and let me know if any changes required:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Janardhanpoola hm, what about
my.shiny.website.com:1234
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, please add a unit test for this.