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

Validate autoupdate_config and autoupdate_agent_rollout #50181

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

hugoShaka
Copy link
Contributor

Part of: RFD-184

Goal (internal): https://github.com/gravitational/cloud/issues/10289

This PR removes the restrictions of the autoupdate_agent_rollout and autoupdate_config schedules but adds groups validation.

It also adds some optional server-side validation that should not be enforced at the resource level.

@hugoShaka hugoShaka changed the title Hugo/autoupdate config validation Validate autoupdate_config and autoupdate_agent_rollout Dec 12, 2024
@hugoShaka hugoShaka marked this pull request as ready for review December 13, 2024 16:07
lib/auth/autoupdate/autoupdatev1/service.go Outdated Show resolved Hide resolved
}

var maxGroups int
isCloud := modules.GetModules().Features().Cloud
Copy link
Member

Choose a reason for hiding this comment

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

We may want to relax these restrictions for some Cloud customers on a case-by-case basis. Would it be tricky to add an "unrestricted" feature? (Could be a separate PR)

Copy link
Contributor Author

@hugoShaka hugoShaka Dec 13, 2024

Choose a reason for hiding this comment

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

We will likely want to rely on entitlements. I'm not familiar with this mechanism and will have to ask cloud devs how to do this. If it's not easy, I'll just glue an ugly environment variable so we are not blocked.

@hugoShaka hugoShaka force-pushed the hugo/autoupdate_config-validation branch from f7451c1 to 3a91f1b Compare December 13, 2024 21:27
@hugoShaka hugoShaka force-pushed the hugo/autoupdate_config-validation branch from 3a91f1b to 2966633 Compare December 16, 2024 21:05
@hugoShaka
Copy link
Contributor Author

@sclevine and @vapopov I revamped the PR as we changed from wait_days to wait_hours. Could yo do a fresh review?

lib/auth/autoupdate/autoupdatev1/service.go Outdated Show resolved Hide resolved
Copy link
Contributor

@vapopov vapopov left a comment

Choose a reason for hiding this comment

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

LGTM, seems like you need to adjust unit tests (nil struct in map)

lib/autoupdate/rollout/reconciler.go Outdated Show resolved Hide resolved
@hugoShaka hugoShaka force-pushed the hugo/autoupdate_config-validation branch 3 times, most recently from 50d6973 to b41f57e Compare December 17, 2024 16:01
@hugoShaka hugoShaka added the no-changelog Indicates that a PR does not require a changelog entry label Dec 17, 2024
This commit removes the restrictions of the autoupdate_agent_rollout and autoupdate_config schedules but adds groups validation.

It also adds some optional server-side validation that should not be enforced at the resource level.
@hugoShaka hugoShaka force-pushed the hugo/autoupdate_config-validation branch from b41f57e to 0fb7fd6 Compare December 17, 2024 16:12
Copy link
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

Bot.

@hugoShaka hugoShaka enabled auto-merge December 17, 2024 16:55
@hugoShaka hugoShaka added this pull request to the merge queue Dec 17, 2024
Merged via the queue into master with commit 89a3d2a Dec 17, 2024
42 checks passed
@hugoShaka hugoShaka deleted the hugo/autoupdate_config-validation branch December 17, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/lg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants