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

Make manager tasks' interval and start date optional and non-defaulted #1868

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

rzetelskik
Copy link
Member

@rzetelskik rzetelskik commented Mar 28, 2024

Description of your changes:
StartDate and Interval fields are made optional and non-defaulted to make the validation more reasonable, while not changing the default behaviour.

This PR also moves manager's scheduler task spec conversion to a shared func.

Which issue is resolved by this Pull Request:
Prerequisite for #1851.

/kind feature
/priority important-longterm
/cc

Copy link
Contributor

@rzetelskik: GitHub didn't allow me to request PR reviews from the following users: rzetelskik.

Note that only scylladb members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Description of your changes:

Which issue is resolved by this Pull Request:
Resolves #

/kind feature
/priority important-longterm
/cc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@scylla-operator-bot scylla-operator-bot bot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 28, 2024
@rzetelskik rzetelskik changed the title [WIP] Move all manager task validation to validating webhook and make interval and start date optional and non-defaulted Move all manager task validation to validating webhook and make interval and start date optional and non-defaulted Mar 28, 2024
@scylla-operator-bot scylla-operator-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 28, 2024
@rzetelskik rzetelskik requested a review from zimnx March 28, 2024 11:08
@rzetelskik rzetelskik requested a review from tnozicka March 28, 2024 11:15
@rzetelskik rzetelskik force-pushed the manager-validation branch 5 times, most recently from 6e0c1c3 to 561cf58 Compare March 29, 2024 10:30
Copy link
Collaborator

@zimnx zimnx left a comment

Choose a reason for hiding this comment

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

lgtm, please squash last two non-generated commits, as "Move manager task validation to validating webhook" also contains changes to existing tests that "React to schema and validation changes in existing tests " should have based on the title.

@zimnx
Copy link
Collaborator

zimnx commented Apr 2, 2024

/cc tnozicka

@rzetelskik rzetelskik force-pushed the manager-validation branch from 561cf58 to 1eaae5d Compare April 2, 2024 15:27
@rzetelskik
Copy link
Member Author

lgtm, please squash last two non-generated commits, as "Move manager task validation to validating webhook" also contains changes to existing tests that "React to schema and validation changes in existing tests " should have based on the title.

done, thanks

@rzetelskik rzetelskik changed the title Move all manager task validation to validating webhook and make interval and start date optional and non-defaulted [WIP] Move all manager task validation to validating webhook and make interval and start date optional and non-defaulted Apr 3, 2024
@scylla-operator-bot scylla-operator-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2024
@rzetelskik rzetelskik changed the title [WIP] Move all manager task validation to validating webhook and make interval and start date optional and non-defaulted [WIP] Make manager tasks' interval and start date optional and non-defaulted Apr 3, 2024
@rzetelskik rzetelskik force-pushed the manager-validation branch from 1eaae5d to 8be250e Compare April 3, 2024 15:49
@scylla-operator-bot scylla-operator-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 3, 2024
@rzetelskik rzetelskik force-pushed the manager-validation branch from 8be250e to 6c91453 Compare April 3, 2024 15:51
@rzetelskik rzetelskik requested a review from zimnx April 3, 2024 15:53
@rzetelskik rzetelskik changed the title [WIP] Make manager tasks' interval and start date optional and non-defaulted Make manager tasks' interval and start date optional and non-defaulted Apr 3, 2024
@scylla-operator-bot scylla-operator-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2024
@rzetelskik
Copy link
Member Author

Changing the scope of this PR due to #1867 (comment)

Copy link
Contributor

@tnozicka tnozicka left a comment

Choose a reason for hiding this comment

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

one nit, rest lgtm
/approve

@@ -136,7 +137,7 @@ var _ = g.Describe("Scylla Manager integration", func() {
repairTask := tasks.TaskListItemSlice[0]
o.Expect(repairTask.Name).To(o.Equal(sc.Status.Repairs[0].Name))
o.Expect(repairTask.ID).To(o.Equal(sc.Status.Repairs[0].ID))
o.Expect(repairTask.Schedule.Interval).To(o.Equal(sc.Status.Repairs[0].Interval))
o.Expect(repairTask.Schedule.Interval).To(o.Equal(*sc.Status.Repairs[0].Interval))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: expect non-nil to this can't panic (and the other case)

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@scylla-operator-bot scylla-operator-bot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 15, 2024
@rzetelskik rzetelskik requested a review from tnozicka April 15, 2024 13:43
Copy link
Collaborator

@zimnx zimnx left a comment

Choose a reason for hiding this comment

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

/lgtm

@scylla-operator-bot scylla-operator-bot bot added the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2024
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rzetelskik, tnozicka, zimnx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rzetelskik
Copy link
Member Author

@rzetelskik: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gke-parallel-clusterip a3fed6a link true /test e2e-gke-parallel-clusterip
Full PR test history. Your PR dashboard.

https://prow.scylla-operator.scylladb.com/view/gs/scylla-operator-prow/pr-logs/pull/scylladb_scylla-operator/1868/pull-scylla-operator-master-e2e-gke-parallel-clusterip/1779871557737254912#1:test-build-log.txt%3A1619

• [FAILED] [1020.830 seconds]
Scylla Manager integration [It] should register cluster and sync repair tasks
github.com/scylladb/scylla-operator/test/e2e/set/scyllacluster/scyllamanager.go:29
...
  STEP: Waiting for repair to finish @ 04/15/24 14:25:57.016
  [FAILED] in [It] - github.com/scylladb/scylla-operator/test/e2e/set/scyllacluster/scyllamanager.go:190 @ 04/15/24 14:35:57.023

Controller logs:

2024-04-15T14:25:55.960499577Z I0415 14:25:55.960239       1 manager/sync.go:134] "Executing action" action="add task &{ClusterID: Enabled:true ID: Name:weekly Properties:map[intensity:1 parallel:123 small_table_threshold:1073741824] Schedule:0xc000483340 Tags:[] Type:repair}"
...
2024-04-15T14:25:56.175142345Z I0415 14:25:56.172692       1 manager/controller.go:148] "Hit conflict, will retry in a bit" Key="e2e-test-scyllacluster-psxjg-q2tff/basic-hl65b" Error="Operation cannot be fulfilled on scyllaclusters.scylla.scylladb.com \"basic-hl65b\": the object has been modified; please apply your changes to the latest version and try again"
...
2024-04-15T14:25:56.253308196Z I0415 14:25:56.253239       1 manager/sync.go:134] "Executing action" action="delete task \"b3dc792a-587a-43c8-818f-cad6bf869934\""
...
2024-04-15T14:25:56.361381890Z I0415 14:25:56.361067       1 manager/sync.go:134] "Executing action" action="add task &{ClusterID: Enabled:true ID: Name:weekly Properties:map[intensity:1 parallel:123 small_table_threshold:1073741824] Schedule:0xc00081e310 Tags:[] Type:repair}"

Known issue: #1752

#1694 (comment)
/retest

@rzetelskik
Copy link
Member Author

@rzetelskik: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gke-parallel-clusterip a3fed6a link true /test e2e-gke-parallel-clusterip
Full PR test history. Your PR dashboard.

image was already gone

/test images
/retest

@scylla-operator-bot scylla-operator-bot bot merged commit d978341 into scylladb:master Apr 15, 2024
12 checks passed
@rzetelskik rzetelskik deleted the manager-validation branch April 15, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants