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

Remove support of 'years' and 'months' timeunits from CRD #874

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

btaani
Copy link
Member

@btaani btaani commented Apr 13, 2022

Description

This PR removes the support of y and M time units that are specified in Elasticsearch CRD (yMwdhHms).

/cc @sasagarw
/assign @periklis

Links

@openshift-ci openshift-ci bot requested a review from sasagarw April 13, 2022 16:07
@btaani btaani changed the title Support yMwdhHms time units in IM cronjobs Remove support of 'years' and 'months' timeunits from CRD Apr 14, 2022
@Red-GV
Copy link
Contributor

Red-GV commented Apr 14, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2022
@periklis
Copy link
Contributor

This change looks not backward compatible

@Red-GV
Copy link
Contributor

Red-GV commented Apr 14, 2022

@periklis I don't think we ever supported years or months conversion, at least from what I can tell in the code. So it's not a compatibility issue, but a correction.

@btaani
Copy link
Member Author

btaani commented Apr 14, 2022

Yes we never supported months or years, it was just there in the CRD but whenever, for example maxAge: 1M is used, EO pod displays an error message that this time unit is not supported.

Also, should I remove this from the test file?

Context("with unsupported units", func() {

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2022
Copy link
Contributor

@Red-GV Red-GV left a comment

Choose a reason for hiding this comment

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

One quick question. Otherwise, looks good. I think we can keep the test case.

@Red-GV
Copy link
Contributor

Red-GV commented Apr 14, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2022
@periklis
Copy link
Contributor

Yes we never supported months or years, it was just there in the CRD but whenever, for example maxAge: 1M is used, EO pod displays an error message that this time unit is not supported.

Also, should I remove this from the test file?

Context("with unsupported units", func() {

Regardless if the two units ever reconciled any jobs properly, the compatibility issue here affects the etcd store. If a user has stored an instance of the Elasticsearch CRD with these values and we remove them, we won't be able to read it back. Removing values here is like removing fields. @xperimental WDYT?

@xperimental
Copy link
Contributor

If a user has stored an instance of the Elasticsearch CRD with these values and we remove them, we won't be able to read it back. Removing values here is like removing fields.

As far as I remember, the validation only happens on the write path, so the CRD should still be readable, but it should no longer be possible to write new resources or update existing ones which have values that don't match the new pattern. While it is true, that removing valid values is a breaking change and so would need a versioned changed, I feel like this does not apply to values that were never usable / resulted in an error.

@periklis
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 19, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: btaani, periklis

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 19, 2022
@btaani
Copy link
Member Author

btaani commented Apr 19, 2022

/retest

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 19, 2022

@btaani: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants