8000 Add option to specify interval for transfer jobs by cristinaleonr · Pull Request #78 · m-lab/gcp-config · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add option to specify interval for transfer jobs #78

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

Merged
merged 7 commits into from
Sep 21, 2023

Conversation

cristinaleonr
Copy link
Collaborator
@cristinaleonr cristinaleonr commented Sep 20, 2023

This PR adds an option to specify a repeat interval for transfer jobs.

It replaces previous 1 hour intervals previously set through the Transfer Job UI and it adds 1 hour transfers for revtr data.

This change is Reviewable

Copy link
Contributor
@nkinkade nkinkade left a comment

Choose a reason for hiding this comment

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

:lgtm: with one non-blocking question about what sync.go is supposed to do.

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @cristinaleonr)


internal/stctl/sync.go line 112 at r1 (raw file):

	if c.Interval != "" && job.Schedule.RepeatInterval != c.Interval {
		logx.Debug.Println("spec: interval not equal", job.Schedule.RepeatInterval, c.Interval)
		return false

This emits an error log message and returns false when the configured job RepeatInterval differs from the c.Interval. For background what is sync.go supposed to do? In my mind "sync" should take the current configuration and make sure that the stored job matches. Instead, it looks like sync.go sees there is a difference, disabled the job and moves on. I assume this is the expected, desired behavior?

Copy link
Collaborator Author
@cristinaleonr cristinaleonr left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @nkinkade)


internal/stctl/sync.go line 112 at r1 (raw file):

Previously, nkinkade wrote…

This emits an error log message and returns false when the configured job RepeatInterval differs from the c.Interval. For background what is sync.go supposed to do? In my mind "sync" should take the current configuration and make sure that the stored job matches. Instead, it looks like sync.go sees there is a difference, disabled the job and moves on. I assume this is the expected, desired behavior?

Sync checks if the current configuration matches the stored job. If so, then it's a no-op (nothing to update). If they differ, it disables the stored job and creates a new one with the current configuration.

Copy link
Contributor
@nkinkade nkinkade left a comment
8000

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @cristinaleonr)


internal/stctl/sync.go line 112 at r1 (raw file):

Previously, cristinaleonr (Cristina Leon) wrote…

Sync checks if the current configuration matches the stored job. If so, then it's a no-op (nothing to update). If they differ, it disables the stored job and creates a new one with the current configuration.

Ah, I missed that it actually creates a new job with the new specs. Thanks. :lgtm:

@cristinaleonr cristinaleonr merged commit f308c06 into main Sep 21, 2023
@cristinaleonr cristinaleonr deleted the sandbox-cristinaleon-hourly branch September 21, 2023 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0