Skip to content

Unstructured OpenstackProviderSpec#2200

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mce-2.5from
2uasimojo:HIVE-2308/unstructured-mce-2.5
Feb 7, 2024
Merged

Unstructured OpenstackProviderSpec#2200
openshift-merge-bot[bot] merged 1 commit intoopenshift:mce-2.5from
2uasimojo:HIVE-2308/unstructured-mce-2.5

Conversation

@2uasimojo
Copy link
Copy Markdown
Member

@2uasimojo 2uasimojo commented Feb 6, 2024

Another attempt to address the move of OpenstackProviderSpec from cluster-api-provider-openstack to openstack/api/machine. See #2117 for background. In that PR, we simply replaced our imports. The result is that we could only decode the new thing. The problem is that we may still get the old thing if we're talking to an old cluster.

We only need the decoding to steal the osImage from the master machines so we can use that value for new workers. Rather than importing both schemata, trying to figure out which version we're talking to, and decoding against the correct one, this commit unmarshals the providerSpec as raw JSON into an Unstructured object and explicitly paths into it map-wise.

On the creation side, we're told that the spoke cluster itself will understand the new thing even if it's an old version (MAPI also unmarshals the JSON raw). So it should be fine to continue using recent vendored installer code to generate MachineSets (which will contain new-apiVersion OpenstackProviderSpec).

HIVE-2308

(cherry picked from commit 28dac77)

Another attempt to address the move of OpenstackProviderSpec from
cluster-api-provider-openstack to openstack/api/machine. See openshift#2117 for
background. In that PR, we simply replaced our imports. The result is
that we could only decode the _new_ thing. The problem is that we may
still get the _old_ thing if we're talking to an old cluster.

We only need the decoding to steal the osImage from the master machines
so we can use that value for new workers. Rather than importing both
schemata, trying to figure out which version we're talking to, and
decoding against the correct one, this commit unmarshals the
providerSpec as raw JSON into an Unstructured object and explicitly
paths into it map-wise.

On the creation side, we're told that the spoke cluster itself will
understand the new thing even if it's an old version (MAPI also
unmarshals the JSON raw). So it should be fine to continue using recent
vendored installer code to generate MachineSets (which will contain
new-apiVersion OpenstackProviderSpec).

HIVE-2308

(cherry picked from commit 28dac77)
@openshift-ci openshift-ci Bot requested review from dlom and lleshchi February 6, 2024 20:28
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2024
@2uasimojo
Copy link
Copy Markdown
Member Author

/assign @lleshchi

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 6, 2024

@2uasimojo: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (mce-2.5@28510d7). Click here to learn what that means.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             mce-2.5    #2200   +/-   ##
==========================================
  Coverage           ?   57.83%           
==========================================
  Files              ?      187           
  Lines              ?    25983           
  Branches           ?        0           
==========================================
  Hits               ?    15027           
  Misses             ?     9700           
  Partials           ?     1256           

@lleshchi
Copy link
Copy Markdown
Contributor

lleshchi commented Feb 7, 2024

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2024
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, lleshchi

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

The pull request process is described here

Details 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-merge-bot openshift-merge-bot Bot merged commit 302154d into openshift:mce-2.5 Feb 7, 2024
@2uasimojo 2uasimojo deleted the HIVE-2308/unstructured-mce-2.5 branch February 7, 2024 16:02
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.

2 participants