feat(provider): add EdgeOne DNS provider for non-accelerated domain records#588
Conversation
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
…ains Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
|
@copilot |
- Acceleration domains: edgeone, edgeone_acc, teo_acc - DNS records: edgeone_dns, teo_dns, edgeone_noacc - Removed: teo, tencentedgeone, neo_acc, neo - Updated documentation to reflect new aliases Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Updated the provider aliases as requested in commit 59b4f82: Acceleration domains: All tests passing (55/55 ✓) and documentation updated accordingly. |
|
…index - Add edgeone_dns to provider index documentation (README.md) - Add "teo" alias for backward compatibility (not documented) - Enable EdgeOneProvider to support both acceleration and DNS records via extra['dns_record'] parameter - Update provider aliases and documentation Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
- Add detailed step-by-step guide for creating new DNS providers - Include API analysis, implementation, testing, and documentation steps - Provide code templates and examples for both BaseProvider and SimpleProvider - Add completion checklist and common pitfalls - Document all requirements including compatibility checks and index updates Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
All requested tasks completed in commits f508d2e and 77d1178:
All 55 tests passing ✓ |
|
…inType - Change EdgeOneProvider to use teoDomainType parameter instead of dns_record - Support values: "dns" or "acceleration" (default) - Parameter is case-insensitive - EdgeOneDnsProvider now uses extra parameter to control behavior - All 55 tests passing Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Updated in commit 0688d2f:
All 55 tests passing ✓ |
|
@copilot ddns/provider/edgeone_dns.py:18 EdgeOneDnsProvider._query_record 不用再次实现 |
- Extract common extra parameter preparation into _prepare_extra() method - Reduces code duplication across _query_record, _create_record, _update_record - All 55 tests passing Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot 1. 在文档上隐藏 teo,teo_dns,teo_acc的参数; 2. 检查和fix lint |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot run ruff check the lint and fix them |
|
@copilot pip3 install ruff first |
- Format 9 files with ruff - Fix 2 linting issues automatically - One complexity warning remains (C901) but doesn't affect functionality - All code now follows consistent formatting standards Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
|
@copilot add the install ruff tips in the agent markdown files |
|
@copilot add the tips about using pip install ruff tips into the new-provider.md |
- Add pip3 install ruff command before formatting/linting steps - Ensures developers have required tools before running verification - Prevents common setup errors Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
…nfig sources - Add comments explaining that extra_ prefixed keys override nested extra dict values within the same source - Improves code documentation clarity for config flattening logic - Addresses feedback about intra-source priority ordering Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (2)
doc/providers/edgeone.md:58
- The example uses an insecure HTTP URL for IP detection (http://api.ipify.cn). Consider using HTTPS (https://api.ipify.cn) to ensure secure communication and prevent potential man-in-the-middle attacks during IP address retrieval.
"index4": ["url:http://api.ipify.cn", "public"], // IPv4地址来源
doc/providers/edgeone.en.md:58
- The example uses an insecure HTTP URL for IP detection (http://api.ipify.cn). Consider using HTTPS (https://api.ipify.cn) to ensure secure communication and prevent potential man-in-the-middle attacks during IP address retrieval.
"index4": ["url:http://api.ipify.cn", "public"], // IPv4 address source
|
@copilot fix ruff Error: |
- Extract _process_extra_from_source helper method to reduce cyclomatic complexity - Fixes ruff C901 error (complexity was 14, now under threshold) - Maintains all existing functionality and test coverage - All 60 extra-related tests passing Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
... Fixed in commit (pending). Refactored |
✅ EdgeOne DNS Provider - Production Ready
Successfully implemented EdgeOne DNS provider for managing non-accelerated domains in Tencent Cloud EdgeOne.
Key Features:
edgeone,edgeone_acc→ EdgeOneProvideredgeone_dns,edgeone_noacc→ EdgeOneDnsProviderteo,teo_acc,teo_dnsFixes #586
Original prompt
This section details on the original issue you should resolve
<issue_title>[feature]为edgeone添加非加速域名添加/更新支持</issue_title>
<issue_description>## 描述场景和问题 (Is your feature request related to a problem? Please describe)
当前edgeone的provider仅支持添加/更新加速域名,但将域名完全托管给edgeone后,也有更新/添加非加速域名的需求
解决方案或者思路 (Describe the solution you'd like)
创建一个EdgeOneNoAccerate的Provider,参考代码如下
考虑过的其他方案或者思路 (Describe alternatives you've considered)
增加选项,根据填写的选项选择使用哪种模式
补充说明 (Additional context)
</issue_description>
<agent_instructions>请继承 EdgeOneProvider 实现一个新的 provider。并支持其它别名 edgeone_acc/neo_acc/neo 和 edgeone_noAcc/edgeone_dns</agent_instructions>
Comments on the Issue (you are @copilot in this section)
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.