ddns-scripts: fix netcup.com for multiple runs#29098
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes repeatability and retry behavior of the netcup.com DDNS updater by removing a readonly reassignment error, improving JSON loading, and converting several hard-fail exits into retryable failures.
Changes:
- Make
__NETCUP_ENDPOINTre-source-safe by removingreadonlyassignment. - Use
json_load_filefor parsing the provider response stored in$DATFILE. - Convert several hard failures into
return 1paths to allow ddns framework retries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| net/ddns-scripts/files/usr/lib/ddns/update_netcup_com.sh | Makes the netcup updater safe to source multiple times; improves JSON loading and makes several failures retryable. |
| net/ddns-scripts/Makefile | Bumps package release to publish the behavior fixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Can you please split this into 3 changes:
You're wondering why this should be split into separate commits. Here's my explanation: |
|
@feckert Thanks for your reply! I fully understand this. Do you prefer a single PR or should I create a separate PR for the readonly bug? |
|
I am fine with one PR. Only split them up in 3 commits. I have seen that the provider is only available in the master Branch. |
The netcup ddns update script fails on subsequent runs because a readonly variable is assigned again. Fix this by removing the readonly declaration to allow repeated execution. Signed-off-by: Tim Flubshi <flubshi@gmail.com>
Replace manual file loading via cat with json_load_file for parsing JSON data. This uses the intended helper function and improves code clarity and robustness. Signed-off-by: Tim Flubshi <flubshi@gmail.com>
Adjust the update error handling path to avoid hard failures on recoverable errors. This allows ddns to retry updates after the configured retry interval and improves reliability. Signed-off-by: Tim Flubshi <flubshi@gmail.com>
238478e to
2013f30
Compare
|
@feckert PR is adjusted. I hope it is now fine as it is. |
|
Thanks merged! |
📦 Package Details
Maintainer: @feckert
(You can find this by checking the history of the package
Makefile.)Description:
This PR fixes an issue where the netcup DDNS update script fails on subsequent runs due to reassigning a
readonlyvariable. The variable has been changed to a regular assignment to ensure the script can be sourced multiple times without errors.Additionally, error handling has been improved:
write_log 14) have been replaced with soft failures (return 1) to allow the ddns framework to retry updates according to the configured retry policy.cat-based loading with json_load_file, which is the intended method for handling JSON input in this context.🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.