Skip to content

Conversation

@dkarpele
Copy link
Collaborator

This commit introduces new env variable IMAGE_UPDATER_INTERVAL for run --interval option. It will make it easier for users to configure update cycles, along with many other parameters that can already be set via either environment variable or command line arguments.

Closes: #1076

@dkarpele
Copy link
Collaborator Author

dkarpele commented Apr 18, 2025

Checks fail because they still use [email protected] which doesn't have updated env.go and env_test.go with GetDurationVal

value is `2m0s`.

Can also be set using the *IMAGE_UPDATER_INTERVAL* environment variable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should descriibe the order the precedence here: if the param is not set, then check the env var, and if neither the param or env var is set, then fall back to the default value 2m.

duration, err := time.ParseDuration(val)
if err == nil {
return duration
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should log a warning for invalid value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, please see #1110

@chengfang
Copy link
Collaborator

Checks fail because they still use [email protected] which doesn't have updated env.go and env_test.go with GetDurationVal

We can separate registry-scanner changs into a separate PR, and once it is merged, change image-updater go.mod to reference a psudo-version of registry-scanner pointing to the commit sha of the first PR.

@dkarpele
Copy link
Collaborator Author

Checks fail because they still use [email protected] which doesn't have updated env.go and env_test.go with GetDurationVal

We can separate registry-scanner changs into a separate PR, and once it is merged, change image-updater go.mod to reference a psudo-version of registry-scanner pointing to the commit sha of the first PR.

Separate PR: #1110

This commit introduces new env variable `IMAGE_UPDATER_INTERVAL` for `run --interval` option. It will make it easier for users to configure update cycles, along with many other parameters that can already be set via either environment variable or command line arguments.

Closes: argoproj-labs#1076
Signed-off-by: Denis Karpelevich <[email protected]>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.49%. Comparing base (90959eb) to head (5d99a97).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1107   +/-   ##
=======================================
  Coverage   63.49%   63.49%           
=======================================
  Files          15       15           
  Lines        2326     2326           
=======================================
  Hits         1477     1477           
  Misses        758      758           
  Partials       91       91           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chengfang chengfang merged commit 61ea007 into argoproj-labs:master Apr 22, 2025
11 checks passed
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.

Support setting --interval via env variable

3 participants