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

ddns-scripts: refactoring phase 1 scripting #25469

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

systemcrash
Copy link
Contributor

@systemcrash systemcrash commented Dec 1, 2024

Maintainer: @chris5560 (?)

Phase 1 of a refactor of the DDNS scripts. Goal: scripts no longer open many sub-shells or call a number of external utilities like sed and grep or similar piped chains where the equivalent is available in pure script functionality. (The url_update checks found within this change-set avoid spawning six potential sub-shells at every run.)

Refactors make code less shouty and 'stabby'.

I've tested these changes on my system (23.05.5) for a while now and they show an improvement. Otherwise, the refactor achieves synonymous functionality.

This change-set introduces the ability to stop individual sections (previously missing).

@systemcrash
Copy link
Contributor Author

That apk check should be disabled or fixed @aparcar

@feckert
Copy link
Member

feckert commented Dec 2, 2024

Can you please write a comment/context for each change so we have a history in the feature why we did that.
Also prefix each commit head with the correct package name ddns-scripts.

@feckert feckert changed the title DDNS refactor phase 1 ddns-scripts: refactoring phase 1 scripting Dec 2, 2024
@systemcrash systemcrash force-pushed the ddns_refactor_phase_1 branch from 1b20c12 to 42b3aae Compare December 2, 2024 14:55
@systemcrash
Copy link
Contributor Author

Can you please write a comment/context for each change so we have a history in the feature why we did that.

See individual commits and subjects. Or did you want something here in the PR?

Also prefix each commit head with the correct package name ddns-scripts.

Fixed. Thanks.

@systemcrash systemcrash force-pushed the ddns_refactor_phase_1 branch from 42b3aae to efc201c Compare December 2, 2024 14:59
@systemcrash
Copy link
Contributor Author

ping for review. These automated tests are still failing and it's nothing to do with this PR. Closing and reopening to get new tests...

@systemcrash systemcrash closed this Dec 3, 2024
@systemcrash systemcrash reopened this Dec 3, 2024
Now a single xargs calls instead of grepping ps output (unreliable).

Signed-off-by: Paul Donald <[email protected]>
Same functionality - code reads less 'shouty' and 'stabby'.

Signed-off-by: Paul Donald <[email protected]>
Removed redundant if else condition. updater is launched
with the same verbosity value anyway.

Signed-off-by: Paul Donald <[email protected]>
Same functionality - code reads less 'shouty' and 'stabby'.

Signed-off-by: Paul Donald <[email protected]>
@aparcar aparcar force-pushed the ddns_refactor_phase_1 branch from efc201c to aa41159 Compare December 5, 2024 15:06
@aparcar
Copy link
Member

aparcar commented Dec 5, 2024

Hi, I just rebased your PR because the failing APK switch was dropped. Please feel free to merge at your convenience (if approved by the maintainer)

@systemcrash
Copy link
Contributor Author

Ah, I see now. So all I had to do was rebase on a newer master?

@hnyman
Copy link
Contributor

hnyman commented Dec 6, 2024

So all I had to do was rebase on a newer master?

Yes.
As the CI fix was merged in between, rebasing the branch on top of master HEAD also brought the updated CI into play.
(Closing/reopening does not help)

@systemcrash
Copy link
Contributor Author

ping.....?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants