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

Fix deployment config scale subresource #17517

Merged
merged 2 commits into from
Dec 4, 2017
Merged

Fix deployment config scale subresource #17517

merged 2 commits into from
Dec 4, 2017

Conversation

liggitt
Copy link
Contributor

@liggitt liggitt commented Nov 29, 2017

3.6 and 3.7 shipped with the /apis/apps.openshift.io/deploymentconfigs/scale subresource returning apps.openshift.io/v1 Scale objects

This is a non-standard Scale object that the HPA will never be able to make use of.

The intent was to continue send the same thing as /oapi/v1/deploymentconfigs/scale: extensions/v1beta1 Scale objects

This PR fixes the groupified API to send/receive the correct type.

It also updates the UpdateScale() client method to send extensions/v1beta1 Scale objects

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 29, 2017
@liggitt liggitt added this to the 3.7.0 milestone Nov 29, 2017
@liggitt
Copy link
Contributor Author

liggitt commented Nov 29, 2017

cc @deads2k @mfojtik @soltysh

@liggitt liggitt added the kind/bug Categorizes issue or PR as related to a bug. label Nov 29, 2017
@mfojtik
Copy link
Contributor

mfojtik commented Nov 29, 2017

code LGTM

@liggitt
Copy link
Contributor Author

liggitt commented Nov 29, 2017

Will fix up generated bits

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

lgtm to me as well


// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *deploymentConfigs) UpdateScale(deploymentConfigName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
// FIXME: make non-homogenous subresource GV client generation work
Copy link
Member

Choose a reason for hiding this comment

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

I'll sync with @sttts tomorrow and try to fix it in client generation. Unless you do it first.

@liggitt
Copy link
Contributor Author

liggitt commented Nov 30, 2017

regenerated files, removed apps.openshift.io/v1 Scale from etcd test whitelist (no longer exists)

@liggitt
Copy link
Contributor Author

liggitt commented Nov 30, 2017

/retest

1 similar comment
@soltysh
Copy link
Member

soltysh commented Nov 30, 2017

/retest

@soltysh
Copy link
Member

soltysh commented Nov 30, 2017

Hmmm... template service broker should not be affected by this chanage
/retest

@liggitt liggitt added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 30, 2017
@liggitt
Copy link
Contributor Author

liggitt commented Nov 30, 2017

removed unused import

@liggitt
Copy link
Contributor Author

liggitt commented Nov 30, 2017

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 30, 2017
var scaleCodec = kapi.Codecs.LegacyCodec(v1beta1.SchemeGroupVersion)

// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *deploymentConfigs) UpdateScale(deploymentConfigName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In 3.9, I'd rather have nothing than an untested, hand-written function in the external client. We can tell people to use the generic scale client.

For 3.7, I don't have a preference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In 3.9, I'd rather have nothing than an untested, hand-written function in the external client.

It's exercised by CI... in what way is it untested?

var scaleCodec = kapi.Codecs.LegacyCodec(v1beta1.SchemeGroupVersion)

// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *deploymentConfigs) UpdateScale(deploymentConfigName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, is the client function ever used in 3.7? If not, let's just leave it deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it's used

@liggitt
Copy link
Contributor Author

liggitt commented Nov 30, 2017

/retest

@liggitt
Copy link
Contributor Author

liggitt commented Nov 30, 2017

/retest

1 similar comment
@liggitt
Copy link
Contributor Author

liggitt commented Dec 1, 2017

/retest

@deads2k
Copy link
Contributor

deads2k commented Dec 1, 2017

Thanks for the updates.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 1, 2017
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, liggitt

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@soltysh
Copy link
Member

soltysh commented Dec 1, 2017

/retest

@openshift-bot
Copy link
Contributor

/retest

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

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@liggitt
Copy link
Contributor Author

liggitt commented Dec 4, 2017

/retest

1 similar comment
@0xmichalis
Copy link
Contributor

/retest

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 4, 2017

@liggitt: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_conformance_crio f698138 link /test crio
ci/openshift-jenkins/extended_conformance_install_update f698138 link /test extended_conformance_install_update

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

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/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. needs-api-review 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.

None yet

8 participants