You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "aaron-sierra (via GitHub)" <gi...@apache.org> on 2025/04/03 00:50:51 UTC
[PR] Fix DNS driver API inconsistencies [libcloud]
aaron-sierra opened a new pull request, #2066:
URL: https://github.com/apache/libcloud/pull/2066
## Fix DNS driver API inconsistencies
### Description
Implement #2065
### Status
- work in progress
### Checklist (tick everything that applies)
- [ ] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks)
- [ ] Documentation
- [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6770992150
> I probably prefer to return `None` when the domain is not related, as in the example `notexample.com`. `""` should only be returned when using the same domain as a prefix. What do you think?
I thought a bit on this and probably returning the full DNS name can be the best solution: as in the example `notexample.com` will return `notexample.com`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub) via notifications" <no...@libcloud.apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6774697625
> Google Cloud DNS — get_record() uses a relative name in the API query.
>
> After parsing the normalized record ID, parts.name contains a relative name such as foo. However, the Cloud DNS API expects a fully qualified name such as foo.example.com. in the name query parameter.
>
> I believe this should use zone.fqdn(parts.name) instead. The corresponding test currently checks the endpoint URL but does not assert the query parameters.
You're right! I've added API parameter checking to `test_get_record()`, so this doesn't slip through again:
```
self.assertEqual(len(sent.query["type"]), 1)
self.assertEqual(sent.query["type"].pop(), "A")
self.assertEqual(len(sent.query["name"]), 1)
self.assertEqual(sent.query["name"].pop(), "foo.example.com.")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "Hisernberg (via GitHub) via notifications" <no...@libcloud.apache.org>.
Hisernberg commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6806674860
FYI from #2216 (micafer's review thread): your `NsOneResponse` hunk and mine are semantically identical (class-level `errors`/`objects` → per-instance lists, set before `super().__init__()` since it calls `success()`). Whichever PR merges first, the other rebases trivially; the regression tests in #2216 (`test_nsone.py`) pin the shared behavior either way. No action needed from you now — just flagging so the eventual rebase is a no-op decision-wise.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6790058112
So please make this changes and merge the trunk branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on code in PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#discussion_r4583107703
##########
libcloud/dns/base.py:
##########
@@ -580,3 +694,19 @@ def _string_to_record_type(self, string):
string = string.upper()
record_type = getattr(RecordType, string)
return record_type
+
+ @staticmethod
+ def to_default_id(zone, name, type):
+ prefix = zone.prefix(name)
+ return f"{type}:{prefix}" if prefix else str(type)
+
+ @classmethod
+ def from_default_id(cls, zone, record_id):
+ match = cls.DEFAULT_ID_RE.match(record_id)
Review Comment:
The current implementation uses re.match() to parse record IDs. Since re.match() only requires a match at the beginning of the string, malformed IDs can be partially accepted.
For example, "A:" matches the "A" prefix because the optional name group cannot match an empty string. As a result, the trailing colon is silently ignored instead of rejecting the invalid ID.
Would it make sense to use re.fullmatch() instead, so the entire record ID must match the expected format?
A regression test for malformed IDs such as "A:" would also be useful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6910435506
One of the tests are failing:
Please could you update the example: https://github.com/apache/libcloud/blob/trunk/example_dns.py
It uses the deleted Zerigo DNS driver to make the test, could you update it to use any other?
> World Wide DNS — update_record() fails when extra=None.
I prefer that, at least in the drivers modified in this PR that this error is solved.
Then we can open another PR to fix the rest.
It requires a minor change:
```py
def update_record(self, record, name, type, data, extra=None):
record_id = record.id
if extra and "entry" in extra and str(extra["entry"]) != record_id:
raise WorldWideDNSError(...)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub) via notifications" <no...@libcloud.apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6693851219
Hi Miguel,
Thanks for your review. In the example that you described regarding `Zone.prefix()` for a "sub-domain" that isn't _actually_ related to the `Zone` instance, what would you suggest as reasonable output? A few options come to mind:
1. Return `None` to indicate "no relationship", since the empty string is used to indicate "related, but no prefix"
* Both `None` and `""` are falsy, which could make it a source of error.
2. Raise a `ValueError` exception (to aggressively highlight bugs?)
3. Something else
Presumably all three of the `Zone` helpers that operate on sub-domains should behave similarly when offered an unrelated "sub-domain" (i.e. `Zone.prefix()`, `Zone.hostname()`, and `Zone.fqdn()`). Does that sound right to you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub) via notifications" <no...@libcloud.apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6774287999
> Google Cloud DNS — get_record() uses a relative name in the API query.
>
> After parsing the normalized record ID, parts.name contains a relative name such as foo. However, the Cloud DNS API expects a fully qualified name such as foo.example.com. in the name query parameter.
Do you have API request/response data you can share for a new `test_create_record()` for _test_google.py_?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "codecov-commenter (via GitHub) via notifications" <no...@libcloud.apache.org>.
codecov-commenter commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6874899172
## [Codecov](https://app.codecov.io/gh/apache/libcloud/pull/2066?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `99.16318%` with `10 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 83.39%. Comparing base ([`8a0ef62`](https://app.codecov.io/gh/apache/libcloud/commit/8a0ef6260680625d54fce5093d2315e0926a7dc9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`34d96fa`](https://app.codecov.io/gh/apache/libcloud/commit/34d96fa48d185c19978b2ab6da237eff505a4a14?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/libcloud/pull/2066?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [libcloud/dns/drivers/worldwidedns.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fworldwidedns.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvd29ybGR3aWRlZG5zLnB5) | 36.36% | [4 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [libcloud/dns/drivers/route53.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Froute53.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvcm91dGU1My5weQ==) | 75.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [libcloud/dns/drivers/google.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fgoogle.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvZ29vZ2xlLnB5) | 66.67% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## trunk #2066 +/- ##
==========================================
- Coverage 83.66% 83.39% -0.27%
==========================================
Files 352 350 -2
Lines 82445 82990 +545
Branches 8890 8867 -23
==========================================
+ Hits 68974 69207 +233
- Misses 10591 10934 +343
+ Partials 2880 2849 -31
```
| [Files with missing lines](https://app.codecov.io/gh/apache/libcloud/pull/2066?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [libcloud/dns/base.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2Jhc2UucHk=) | `97.97% <100.00%> (+0.70%)` | :arrow_up: |
| [libcloud/dns/drivers/dnsimple.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fdnsimple.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvZG5zaW1wbGUucHk=) | `26.44% <ø> (-67.82%)` | :arrow_down: |
| [libcloud/dns/drivers/durabledns.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fdurabledns.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvZHVyYWJsZWRucy5weQ==) | `88.14% <100.00%> (+0.08%)` | :arrow_up: |
| [libcloud/dns/drivers/gandi.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fgandi.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvZ2FuZGkucHk=) | `92.25% <100.00%> (+0.06%)` | :arrow_up: |
| [libcloud/dns/drivers/gandi\_live.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fgandi_live.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvZ2FuZGlfbGl2ZS5weQ==) | `89.06% <100.00%> (+0.06%)` | :arrow_up: |
| [libcloud/dns/drivers/luadns.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fluadns.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvbHVhZG5zLnB5) | `88.18% <100.00%> (ø)` | |
| [libcloud/dns/drivers/nsone.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fnsone.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvbnNvbmUucHk=) | `76.47% <100.00%> (+0.79%)` | :arrow_up: |
| [libcloud/dns/drivers/pointdns.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fpointdns.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvcG9pbnRkbnMucHk=) | `86.33% <100.00%> (ø)` | |
| [libcloud/dns/drivers/powerdns.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Fpowerdns.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvcG93ZXJkbnMucHk=) | `67.47% <100.00%> (+0.40%)` | :arrow_up: |
| [libcloud/dns/drivers/rackspace.py](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree&filepath=libcloud%2Fdns%2Fdrivers%2Frackspace.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliY2xvdWQvZG5zL2RyaXZlcnMvcmFja3NwYWNlLnB5) | `77.54% <100.00%> (-0.91%)` | :arrow_down: |
| ... and [33 more](https://app.codecov.io/gh/apache/libcloud/pull/2066?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
... and [3 files with indirect coverage changes](https://app.codecov.io/gh/apache/libcloud/pull/2066/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub)" <gi...@apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-2776747648
The latest batch of updates includes changes from `black` and `isort`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub) via notifications" <no...@libcloud.apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6775801421
> > I probably prefer to return `None` when the domain is not related, as in the example `notexample.com`. `""` should only be returned when using the same domain as a prefix. What do you think?
>
> I thought a bit on this and probably returning the full DNS name can be the best solution: as in the example `notexample.com` will return `notexample.com`.
I think we need to clarify what should happen when a hostname (unrooted) and an FQDN (rooted) are passed into these functions. In the following examples, `zone.domain == "example.com"`.
1. In the case of an unrelated hostname ("notexample.com") , these functions can't *really* do much more than treat the input as a prefix and output garbage:
* `zone.prefix("notexample.com") == "notexample.com"`
* `zone.hostname("notexample.com") == "notexample.com.example.com"`
* `zone.fqdn("notexample.com") == "notexample.com.example.com."`
2. In the case of an unrelated FQDN ("notexample.com.") , these functions *know* that the input is garbage and can return `None` (or raise an exception):
* `zone.prefix("notexample.com.") == None`
* `zone.hostname("notexample.com.") == None`
* `zone.fqdn("notexample.com.") == None`
I think that I prefer raising an exception in the unrelated FQDN case, considering how #2065 notes inconsistent usage of `None` and the empty string by various DNS driver implementations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6790026529
> I think that I prefer raising an exception in the unrelated FQDN case, considering how [#2065](https://github.com/apache/libcloud/issues/2065) notes inconsistent usage of `None` and the empty string by various DNS driver implementations.
Ok, so let's go in that direction. But we can create an specific exception (something like `ZoneNameMismatchError`) instead of using the generic ValueError.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub)" <gi...@apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-2776806212
The latest changes have been through `black`, `isort`, `lint`, and `pylint`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub) via notifications" <no...@libcloud.apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6864643800
> World Wide DNS — update_record() fails when extra=None.
>
> The new condition if "entry" in extra raises TypeError when the optional extra argument is omitted.
>
> Please guard against None and add a regression test covering an update without extra.
I'd like to omit this from the current merge request, if you agree. I've spent time trying to implement common/reusable function-call-level API test cases, but it needs review and refinement. I think this warrants a new issue.
1. At least one other driver (`GandiDNSDriver`) needs similar fixes for `create_record()` and `update_record()`.
2. Several drivers have explicit quirks that don't play nice with that sort of testing.
3. The Google DNS driver testing relies on a mocked HTTP authentication endpoint that I have not managed to get working with this class of testing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer closed pull request #2066: Fix DNS driver API inconsistencies
URL: https://github.com/apache/libcloud/pull/2066
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6719353220
I probably prefer to return `None` when the domain is not related, as in the example `notexample.com`.
`""` should only be returned when using the same domain as a prefix.
What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6771915895
I'm still checking this and I found two issues:
Google Cloud DNS — get_record() uses a relative name in the API query.
After parsing the normalized record ID, parts.name contains a relative name such as foo. However, the Cloud DNS API expects a fully qualified name such as foo.example.com. in the name query parameter.
I believe this should use zone.fqdn(parts.name) instead. The corresponding test currently checks the endpoint URL but does not assert the query parameters.
World Wide DNS — update_record() fails when extra=None.
The new condition if "entry" in extra raises TypeError when the optional extra argument is omitted.
Please guard against None and add a regression test covering an update without extra.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "aaron-sierra (via GitHub) via notifications" <no...@libcloud.apache.org>.
aaron-sierra commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-6808533322
> > I think that I prefer raising an exception in the unrelated FQDN case, considering how [#2065](https://github.com/apache/libcloud/issues/2065) notes inconsistent usage of `None` and the empty string by various DNS driver implementations.
>
> Ok, so let's go in that direction. But we can create an specific exception (something like `ZoneNameMismatchError`) instead of using the generic ValueError.
How's `ZoneNotRelatedError` for clarity and specificity?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DNS driver API inconsistencies [libcloud]
Posted by "micafer (via GitHub) via notifications" <no...@libcloud.apache.org>.
micafer commented on PR #2066:
URL: https://github.com/apache/libcloud/pull/2066#issuecomment-7039134950
Moved to: #2233
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org