Skip to content

⚠️ Remove metal3datatemplate template reference #2265

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peppi-lotta
Copy link
Member

@peppi-lotta peppi-lotta commented Jan 23, 2025

What this PR does / why we need it: This reverts all logic changes made in #184 #190 and any other mention of the templateReference. It's unclear if there is any use cases for templateReference. If there are none it should be deleted.

Deprecation notice: #2326

I'm leaving the field in the API. That will be remove in v1beta2

Which issue(s) this PR fixes:
Fixes # #1357

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign adilghaffardev for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 23, 2025
@peppi-lotta
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-remediation metal3-centos-e2e-feature-test-main-remediation

@peppi-lotta
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-remediation

@Rozzii Rozzii added this to the CAPM3 - v1.11 milestone Feb 11, 2025
@Rozzii
Copy link
Member

Rozzii commented Feb 11, 2025

/kind feature

@metal3-io-bot metal3-io-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 11, 2025
@Rozzii
Copy link
Member

Rozzii commented Feb 11, 2025

@peppi-lotta I have added this to the 1.11 milestone and to the backlog to have a better visibility.
Could you also please rebase and write a short update about the state of this PR?

Pinging some folks for who this might be relevant to take a look:
@kashifest @zaneb @lentzi90

Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

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

I will come back to review after the CI is passing.

@peppi-lotta peppi-lotta force-pushed the peppi-lotta/remove-metal3datatemplate-templateReference branch from bdf965d to 8b6e33c Compare February 13, 2025 08:52
@peppi-lotta
Copy link
Member Author

/test ?

@metal3-io-bot
Copy link
Contributor

@peppi-lotta: The following commands are available to trigger required jobs:

/test build
/test generate
/test gomod
/test manifestlint
/test markdownlint
/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main
/test shellcheck
/test test
/test unit

The following commands are available to trigger optional jobs:

/test metal3-centos-e2e-basic-test-main
/test metal3-centos-e2e-feature-test-main-features
/test metal3-centos-e2e-feature-test-main-pivoting
/test metal3-centos-e2e-feature-test-main-remediation
/test metal3-centos-e2e-feature-test-main-scalability
/test metal3-e2e-1-29-1-30-upgrade-test-main
/test metal3-e2e-clusterctl-upgrade-test-main
/test metal3-ubuntu-e2e-basic-test-main
/test metal3-ubuntu-e2e-feature-test-main-features
/test metal3-ubuntu-e2e-feature-test-main-pivoting
/test metal3-ubuntu-e2e-feature-test-main-remediation

Use /test all to run the following jobs that were automatically triggered:

build
generate
gomod
manifestlint
markdownlint
unit

In response to this:

/test ?

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-sigs/prow repository.

@peppi-lotta
Copy link
Member Author

/test /test metal3-ubuntu-e2e-feature-test-main-remediation

@peppi-lotta peppi-lotta force-pushed the peppi-lotta/remove-metal3datatemplate-templateReference branch 2 times, most recently from 38e790a to c649428 Compare February 13, 2025 13:03
@peppi-lotta
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main
/test metal3-centos-e2e-feature-test-main-features
/test metal3-centos-e2e-feature-test-main-remediation
/test metal3-e2e-1-29-1-30-upgrade-test-main
/test metal3-e2e-clusterctl-upgrade-test-main
/test metal3-ubuntu-e2e-feature-test-main-features
/test metal3-ubuntu-e2e-feature-test-main-remediation

@peppi-lotta
Copy link
Member Author

I'm now running all kind of test to see if removal of templateReference breaks any of the tests.

My manual tests seem to indicate that everything works the same with or without the templateReference. The manual testing showed that by setting the templateReference the name of a m3d object can stay the same after upgrade. I figure this could be useful in some case to keep the m3d objects name the same. The test is not testing this though.

The test seems to just query whether there is a m3d object with a templateReference in general. There is no test regarding whether the template reference is correct in any way. I'm not sure what would be the "correct" way to use the TemplateReference as there is no clear use cases in the upstream.

If none of the test fail due to this change I would say we can remove this feature.

@zaneb
Copy link
Member

zaneb commented Feb 14, 2025

Unfortunately I don't think you can ever remove a field from an existing CRD (except when bumping the version) without breaking users. This API is at v1beta1 already and the field has been there since 2021, so I think this has to wait for v1beta2.

@lentzi90
Copy link
Member

Hmm that is a good point. But we can still remove the logic and ignore the field if it anyway doesn't do anything. Then removing it i v1beta2 would be just cosmetics

@peppi-lotta
Copy link
Member Author

That's a good point @zaneb. Thank you for bringing this up.

Based on this I'm thinking

  • Deprecation notice in release 1.10
  • Logic could be removed 1.11 but leave the API field (Because everything seems to be working the same with or without this value)
  • The API field can be removed in v1beta2 then.

@peppi-lotta peppi-lotta force-pushed the peppi-lotta/remove-metal3datatemplate-templateReference branch 2 times, most recently from 5bd658d to 7f5bf38 Compare February 19, 2025 09:29
@peppi-lotta peppi-lotta force-pushed the peppi-lotta/remove-metal3datatemplate-templateReference branch from 7f5bf38 to 1503da1 Compare February 19, 2025 09:42
@peppi-lotta
Copy link
Member Author

/hold
I'll put this on hold for now. Let's get this merged this once 1.10 is out like I suggested in my last comment.

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 19, 2025
@peppi-lotta
Copy link
Member Author

/test ?

@metal3-io-bot
Copy link
Contributor

@peppi-lotta: The following commands are available to trigger required jobs:

/test build
/test generate
/test gomod
/test manifestlint
/test markdownlint
/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main
/test shellcheck
/test test
/test unit

The following commands are available to trigger optional jobs:

/test metal3-centos-e2e-basic-test-main
/test metal3-centos-e2e-feature-test-main-features
/test metal3-centos-e2e-feature-test-main-pivoting
/test metal3-centos-e2e-feature-test-main-remediation
/test metal3-centos-e2e-feature-test-main-scalability
/test metal3-e2e-1-29-1-30-upgrade-test-main
/test metal3-e2e-clusterctl-upgrade-test-main
/test metal3-ubuntu-e2e-basic-test-main
/test metal3-ubuntu-e2e-feature-test-main-features
/test metal3-ubuntu-e2e-feature-test-main-pivoting
/test metal3-ubuntu-e2e-feature-test-main-remediation

Use /test all to run the following jobs that were automatically triggered:

build
generate
gomod
manifestlint
markdownlint
unit

In response to this:

/test ?

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-sigs/prow repository.

@peppi-lotta
Copy link
Member Author

/test metal3-centos-e2e-basic-test-main
/test metal3-centos-e2e-feature-test-main-features
/test metal3-centos-e2e-feature-test-main-pivoting
/test metal3-centos-e2e-feature-test-main-remediation
/test metal3-centos-e2e-feature-test-main-scalability
/test metal3-e2e-1-29-1-30-upgrade-test-main
/test metal3-e2e-clusterctl-upgrade-test-main
/test metal3-ubuntu-e2e-basic-test-main
/test metal3-ubuntu-e2e-feature-test-main-features
/test metal3-ubuntu-e2e-feature-test-main-pivoting
/test metal3-ubuntu-e2e-feature-test-main-remediation

@metal3-io-bot
Copy link
Contributor

metal3-io-bot commented Feb 19, 2025

@peppi-lotta: 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
metal3-e2e-clusterctl-upgrade-test-main 1503da1 link false /test metal3-e2e-clusterctl-upgrade-test-main

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-sigs/prow 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
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: CAPM3 WIP
Development

Successfully merging this pull request may close these issues.

5 participants