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

Bug 1779933: set version to start for s390/ppc until we have actual samples #205

Merged
merged 1 commit into from Dec 5, 2019

Conversation

gabemontero
Copy link
Contributor

/assign @bparees
/assign @adambkaplan

@openshift-ci-robot
Copy link
Contributor

@gabemontero: This pull request references Bugzilla bug 1779933, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Bug 1779933: set version to start for s390/ppc until we have actual samples

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.

@openshift-ci-robot
Copy link
Contributor

@gabemontero: This pull request references Bugzilla bug 1779933, which is valid. The bug has been moved to the POST state.

In response to this:

Bug 1779933: set version to start for s390/ppc until we have actual samples

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 5, 2019
@@ -588,6 +588,10 @@ func (h *Handler) Handle(event util.Event) error {
// Every time we see a change to the Config object, update the ClusterOperator status
// based on the current conditions of the Config.
cfg = h.refetchCfgMinimizeConflicts(cfg)
//TODO remove this setting of version once we start getting samples for z or ppc
if len(cfg.Spec.Architectures) > 0 && cfg.Spec.Architectures[0] != v1.AMDArchitecture && cfg.Spec.Architectures[0] != v1.X86Architecture {
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm a little confused as to why this is specifically checking array index 0?

  1. do we support multiple architectures being specified?
  2. if we do, what happens if x86 is listed first and Z is listed second?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm a little confused as to why this is specifically checking array index 0?

1. do we support multiple architectures being specified?

at the moment, no ... we just have a place holder given this is an array to support it in the future

2. if we do, what happens if x86 is listed first and Z is listed second?

we hard code the entry at start up, and the first time through should set all the clusteroperator related bits

Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding validation type logic that handles a cluster admin replacing our boostrapping with incorrect choices is doable, but more complicated

where we compare what they set in the array with what the golang arch env vars reports, etc.

@gabemontero gabemontero mentioned this pull request Dec 5, 2019
@gabemontero
Copy link
Contributor Author

/cherrypick release-4.3

@openshift-cherrypick-robot

@gabemontero: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.3

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.

1 similar comment
@openshift-cherrypick-robot

@gabemontero: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.3

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.

@gabemontero
Copy link
Contributor Author

/cherrypick release-4.2

@openshift-cherrypick-robot

@gabemontero: once the present PR merges, I will cherry-pick it on top of release-4.2 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.2

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.

1 similar comment
@openshift-cherrypick-robot

@gabemontero: once the present PR merges, I will cherry-pick it on top of release-4.2 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.2

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.

Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

Since we need to backport this change and don't have e2e CI for Z/power, is there an easy way for us to add unit tests to verify we're setting version correctly?

@@ -588,6 +588,10 @@ func (h *Handler) Handle(event util.Event) error {
// Every time we see a change to the Config object, update the ClusterOperator status
// based on the current conditions of the Config.
cfg = h.refetchCfgMinimizeConflicts(cfg)
//TODO remove this setting of version once we start getting samples for z or ppc
if len(cfg.Spec.Architectures) > 0 && cfg.Spec.Architectures[0] != v1.AMDArchitecture && cfg.Spec.Architectures[0] != v1.X86Architecture {
cfg.Status.Version = h.version
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we always set this, and vary whether or not it is reported based on the Available status?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no we shouldn't ... all that was sorted out in 4.0/4.1 initial dev

only report the version once you have achieved it

pkg/stub/handler.go Outdated Show resolved Hide resolved
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 5, 2019
@gabemontero
Copy link
Contributor Author

Since we need to backport this change and don't have e2e CI for Z/power, is there an easy way for us to add unit tests to verify we're setting version correctly?

Yes I believe so ... will start on that

@openshift-ci-robot openshift-ci-robot removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 5, 2019
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 5, 2019
@gabemontero
Copy link
Contributor Author

unit test added @adambkaplan

Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

@gabemontero need to check that version is set if we're reporting Available=true; Progressing=false, Degraded=false

}

Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like validate verifies that we've set version correctly. Needs to be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the setting of the version happens after the setup() call ... it does not need to be in validate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't need it everwhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nevermind ... I'll do it everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unit test updated

@gabemontero
Copy link
Contributor Author

@gabemontero need to check that version is set if we're reporting Available=true; Progressing=false, Degraded=false

we don't test that in the unit tests ... we already do in the e2e's

https://github.com/openshift/cluster-samples-operator/blob/master/test/e2e/cluster_samples_operator_test.go#L219-L242

too big of a change to do in the unit tests

@gabemontero
Copy link
Contributor Author

/test unit

@@ -98,6 +107,7 @@ func TestWithArchDist(t *testing.T) {
conditions,
statuses, t)


Copy link
Member

Choose a reason for hiding this comment

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

nit: why do we keep adding empty lines?

@gabemontero
Copy link
Contributor Author

/test e2e-aws

Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

/lgtm

We have existing coverage to verify version is set via the current e2e suite. However we do not have CI infrastructure for non-X86 architectures at present.

Multi-arch team will be manually verifying our patch to 4.2.z (which cannot be cherry-picked).

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan, gabemontero

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:
  • OWNERS [adambkaplan,gabemontero]

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

@openshift-merge-robot openshift-merge-robot merged commit 32efce3 into openshift:master Dec 5, 2019
@openshift-ci-robot
Copy link
Contributor

@gabemontero: All pull requests linked via external trackers have merged. Bugzilla bug 1779933 has been moved to the MODIFIED state.

In response to this:

Bug 1779933: set version to start for s390/ppc until we have actual samples

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@gabemontero: All pull requests linked via external trackers have merged. Bugzilla bug 1779933 has been moved to the MODIFIED state.

In response to this:

Bug 1779933: set version to start for s390/ppc until we have actual samples

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.

@openshift-cherrypick-robot

@gabemontero: failed to push cherry-picked changes in GitHub: pushing failed, output: "To https://github.com/openshift-cherrypick-robot/cluster-samples-operator\n ! [remote rejected] cherry-pick-205-to-release-4.3 -> cherry-pick-205-to-release-4.3 (cannot lock ref 'refs/heads/cherry-pick-205-to-release-4.3': reference already exists)\nerror: failed to push some refs to 'https://openshift-cherrypick-robot:CENSORED@github.com/openshift-cherrypick-robot/cluster-samples-operator'\n", error: exit status 1

In response to this:

/cherrypick release-4.3

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.

@openshift-cherrypick-robot

@gabemontero: new pull request created: #208

In response to this:

/cherrypick release-4.3

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.

@openshift-cherrypick-robot

@gabemontero: #205 failed to apply on top of branch "release-4.2":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	pkg/operatorstatus/operatorstatus.go
M	pkg/stub/handler.go
M	pkg/stub/handler_test.go
A	pkg/util/util.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): pkg/util/util.go deleted in HEAD and modified in set version to start for s390/ppc until we have actual samples. Version set version to start for s390/ppc until we have actual samples of pkg/util/util.go left in tree.
Auto-merging pkg/stub/handler_test.go
Auto-merging pkg/stub/handler.go
Auto-merging pkg/operatorstatus/operatorstatus.go
Patch failed at 0001 set version to start for s390/ppc until we have actual samples

In response to this:

/cherrypick release-4.2

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.

1 similar comment
@openshift-cherrypick-robot

@gabemontero: #205 failed to apply on top of branch "release-4.2":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	pkg/operatorstatus/operatorstatus.go
M	pkg/stub/handler.go
M	pkg/stub/handler_test.go
A	pkg/util/util.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): pkg/util/util.go deleted in HEAD and modified in set version to start for s390/ppc until we have actual samples. Version set version to start for s390/ppc until we have actual samples of pkg/util/util.go left in tree.
Auto-merging pkg/stub/handler_test.go
Auto-merging pkg/stub/handler.go
Auto-merging pkg/operatorstatus/operatorstatus.go
Patch failed at 0001 set version to start for s390/ppc until we have actual samples

In response to this:

/cherrypick release-4.2

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.

@gabemontero gabemontero deleted the s390x-version branch December 5, 2019 20:19
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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants