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

merge imagestreamtag list on patch #17091

Merged
merged 1 commit into from
Nov 3, 2017

Conversation

bparees
Copy link
Contributor

@bparees bparees commented Oct 30, 2017

This will ensure we don't drop spec tags when applying a new set of imagestreams that is not a superset of the existing spec tags.

related to https://bugzilla.redhat.com/show_bug.cgi?id=1507031

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 30, 2017
@openshift-merge-robot openshift-merge-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-api-review labels Oct 30, 2017
@bparees
Copy link
Contributor Author

bparees commented Oct 30, 2017

@smarterclayton @dgoodwin I don't think this is necessary for your ansible install issues, but it's probably a good idea.

Tags []TagReference `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"`
// +patchMergeKey=name
// +patchStrategy=merge
Tags []TagReference `json:"tags,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=tags"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test to test-cmd that verifies this merges correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test to test-cmd that verifies this merges correctly?

Turns out, that was a really good idea.

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 need to encourage him...

@bparees bparees force-pushed the tag_merging branch 4 times, most recently from e4fd2ca to 3a5a100 Compare October 30, 2017 19:11
@bparees
Copy link
Contributor Author

bparees commented Oct 30, 2017

/retest

@bparees
Copy link
Contributor Author

bparees commented Oct 30, 2017

@smarterclayton test added.

/retest

@bparees
Copy link
Contributor Author

bparees commented Oct 31, 2017

/retest

@smarterclayton bump.

@bparees bparees closed this Nov 1, 2017
@bparees
Copy link
Contributor Author

bparees commented Nov 1, 2017

You aren't proving that you're using the right merge strategy unless you check that it overwrote the existing tag.

the thing that is being merged is an array. if the strategy was "replace" then the old elements would no longer be present.

is there some third strategy?

@bparees
Copy link
Contributor Author

bparees commented Nov 1, 2017

@smarterclayton done.

@bparees
Copy link
Contributor Author

bparees commented Nov 2, 2017

/retest

@bparees
Copy link
Contributor Author

bparees commented Nov 2, 2017

@smarterclayton i think this is ready now.

@smarterclayton
Copy link
Contributor

/approve

@smarterclayton
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, smarterclayton

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

Needs approval from an approver in each of these OWNERS Files:
  • OWNERS [bparees,smarterclayton]

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

@bparees bparees added the kind/bug Categorizes issue or PR as related to a bug. label Nov 3, 2017
@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 17149, 17091).

@openshift-merge-robot openshift-merge-robot merged commit ba7839e into openshift:master Nov 3, 2017
@bparees bparees deleted the tag_merging branch November 6, 2017 20:20
@@ -272,7 +274,9 @@ type ImageStreamStatus struct {
PublicDockerImageRepository string `json:"publicDockerImageRepository,omitempty" protobuf:"bytes,3,opt,name=publicDockerImageRepository"`
// Tags are a historical record of images associated with each tag. The first entry in the
// TagEvent array is the currently tagged image.
Tags []NamedTagEventList `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"`
// +patchMergeKey=tag
Copy link
Contributor

Choose a reason for hiding this comment

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

well, that explains my issues. API changes after openshift/api was made :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-approved 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/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.

6 participants