Bug: PERIOD env variable not working #289

Closed
opened 2025-11-20 04:22:22 -05:00 by saavagebueno · 6 comments
Owner

Originally created by @adripo on GitHub (Jun 15, 2023).

TLDR: Describe your issue in a one liner here

  1. Is this urgent: Yes

  2. DNS provider(s) you use: -

  3. Program version: 2.5.0

    Running version latest built on 2020-03-13T01:30:06Z (commit d0f678c)

  4. What are you using to run the container: docker-compose

  5. Extra information (optional):
    PERIOD env variable is ignored and not read by the application.
    After a fast search I saw that the correct variable that is being read is UPDATE_PERIOD.
    https://github.com/qdm12/ddns-updater/blob/master/internal/config/sources/env/update.go#L34

Indeed, after naming it UPDATE_PERIOD, everything worked correctly and config log was correct.
Which one is the correct variable that should be used?

Logs:


INFO Settings summary:
├── HTTP client
|   └── Timeout: 10s
├── Update
|   ├── Period: 10m0s
|   └── Cooldown: 2m0s

Configuration file (remove your credentials!):

...
    environment:
      - PERIOD=2m
      - UPDATE_COOLDOWN_PERIOD=2m
...

Host OS:

Originally created by @adripo on GitHub (Jun 15, 2023). <!-- YOU CAN CHAT THERE EVENTUALLY: https://github.com/qdm12/ddns-updater/discussions --> **TLDR**: *Describe your issue in a one liner here* 1. Is this urgent: Yes 2. DNS provider(s) you use: - 3. Program version: 2.5.0 <!-- See the line at the top of your logs --> `Running version latest built on 2020-03-13T01:30:06Z (commit d0f678c)` 4. What are you using to run the container: docker-compose 5. Extra information (optional): `PERIOD` env variable is ignored and not read by the application. After a fast search I saw that the correct variable that is being read is `UPDATE_PERIOD`. https://github.com/qdm12/ddns-updater/blob/master/internal/config/sources/env/update.go#L34 Indeed, after naming it `UPDATE_PERIOD`, everything worked correctly and config log was correct. Which one is the correct variable that should be used? Logs: ```log INFO Settings summary: ├── HTTP client | └── Timeout: 10s ├── Update | ├── Period: 10m0s | └── Cooldown: 2m0s ``` Configuration file (**remove your credentials!**): ```json ... environment: - PERIOD=2m - UPDATE_COOLDOWN_PERIOD=2m ... ``` Host OS: -
Author
Owner

@qdm12 commented on GitHub (Jun 16, 2023):

Thanks for creating the issue, this is fixed for the latest image in 3fdda01509 it got changed by mistake to UPDATE_PERIOD when doing that large settings refactor 4 days ago.

FYI if it says Running version latest ... then it's not version v2.5.0 but the latest Docker image 😉 To run version v2.5.0, you need to use the image tag :v2.5.0.

@qdm12 commented on GitHub (Jun 16, 2023): Thanks for creating the issue, this is fixed for the latest image in 3fdda015093e5da05c6b38eac01193054cb1fa36 it got changed by mistake to UPDATE_PERIOD when doing that large settings refactor 4 days ago. FYI if it says `Running version latest ...` then it's not version v2.5.0 but the latest Docker image 😉 To run version v2.5.0, you need to use the image tag `:v2.5.0`.
Author
Owner

@adripo commented on GitHub (Jun 16, 2023):

Thank you

@adripo commented on GitHub (Jun 16, 2023): Thank you
Author
Owner

@adripo commented on GitHub (Jun 16, 2023):

@qdm12 Regarding version naming, typically latest serves as an alias for the most recent stable version. For development purposes, alternative tags such as alpha, beta, and dev can be utilized. Additionally, named versions typically exclude the v prefix.
Due to these conventions, I mistakenly selected incorrect versions. Therefore, I would like to propose including a reference to the latest stable version in the docker-compose file, assuming you intend to keep in place this naming convention going forward.

@adripo commented on GitHub (Jun 16, 2023): @qdm12 Regarding version naming, typically `latest` serves as an alias for the most recent stable version. For development purposes, alternative tags such as `alpha`, `beta`, and `dev` can be utilized. Additionally, named versions typically exclude the `v` prefix. Due to these conventions, I mistakenly selected incorrect versions. Therefore, I would like to propose including a reference to the latest stable version in the [docker-compose](https://github.com/qdm12/ddns-updater/blob/master/docker-compose.yml#L4) file, assuming you intend to keep in place this naming convention going forward.
Author
Owner

@qdm12 commented on GitHub (Jun 17, 2023):

Actually I have my own view on this 😸 I even wrote up a post about it: https://qqq.ninja/blog/post/docker-tags/

You can use tag :v2 for the stable v2 compatible release too.

Additionally, named versions typically exclude the v prefix.

Where have you seen this? I have seen the opposite and generally the v is always prefixed to semver versioning in programming.

@qdm12 commented on GitHub (Jun 17, 2023): Actually I have my own view on this 😸 I even wrote up a post about it: https://qqq.ninja/blog/post/docker-tags/ You can use tag `:v2` for the stable v2 compatible release too. > Additionally, named versions typically exclude the v prefix. Where have you seen this? I have seen the opposite and generally the `v` is always prefixed to semver versioning in programming.
Author
Owner

@adripo commented on GitHub (Jun 18, 2023):

Actually I have my own view on this 😸 I even wrote up a post about it: https://qqq.ninja/blog/post/docker-tags/

Thanks, I will have a look.

You can use tag :v2 for the stable v2 compatible release too.

That's what i thought, but after looking on docker hub, v2 was last updated 3 years ago

image

Where have you seen this? I have seen the opposite and generally the v is always prefixed to semver versioning in programming.

I agree with you for software versioning, but docker is using a different standard.
Here are some example of the official Docker images:
https://hub.docker.com//alpine
https://hub.docker.com/
/nginx
https://hub.docker.com//busybox
https://hub.docker.com/
/ubuntu

@adripo commented on GitHub (Jun 18, 2023): > Actually I have my own view on this 😸 I even wrote up a post about it: https://qqq.ninja/blog/post/docker-tags/ Thanks, I will have a look. > You can use tag :v2 for the stable v2 compatible release too. That's what i thought, but after looking on docker hub, v2 was last updated 3 years ago ![image](https://github.com/qdm12/ddns-updater/assets/26493496/5b5fb542-0e27-4782-8a06-68c7f5db7676) > Where have you seen this? I have seen the opposite and generally the v is always prefixed to semver versioning in programming. I agree with you for software versioning, but docker is using a different standard. Here are some example of the official Docker images: https://hub.docker.com/_/alpine https://hub.docker.com/_/nginx https://hub.docker.com/_/busybox https://hub.docker.com/_/ubuntu
Author
Owner

@qdm12 commented on GitHub (Jun 18, 2023):

That's what i thought, but after looking on docker hub, v2 was last updated 3 years ago

Indeed, CI only got upgraded since v2.5.0 to perform this docker tagging so it will be present with v2.6.0.

I agree with you for software versioning, but docker is using a different standard.

Good point, I'll change the CI to push tags both prefixed with v and not prefixed.

@qdm12 commented on GitHub (Jun 18, 2023): > That's what i thought, but after looking on docker hub, v2 was last updated 3 years ago Indeed, CI only got upgraded since v2.5.0 to perform this docker tagging so it will be present with v2.6.0. > I agree with you for software versioning, but docker is using a different standard. Good point, I'll change the CI to push tags both prefixed with v and not prefixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#289