Skip to content

Conversation

@ironcladlou
Copy link
Contributor

When matching deployment image change triggers to new image repository
records, use correct matching logic which takes into account both the
From and RepositoryName trigger fields.

@ironcladlou
Copy link
Contributor Author

@pmorie @smarterclayton

Please take a close look at this one. I want to make sure I have all the trigger/image repository field precedence rules correct. I made what I think is a pretty comprehensive table test.

Resolves #838 as a side-effect.

@ironcladlou
Copy link
Contributor Author

[test]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1002/)

Copy link
Contributor

Choose a reason for hiding this comment

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

return repo.Namespace == namespace && repo.Name == trigger.From.Name

@ironcladlou ironcladlou force-pushed the image-trigger-matching-fix branch 3 times, most recently from b0cbaa9 to a0f1c48 Compare February 4, 2015 15:52
Copy link
Contributor

Choose a reason for hiding this comment

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

Invert this - do the simple check "empty" and return false, then do the more complex check in the final block.

@ironcladlou
Copy link
Contributor Author

@smarterclayton

Okay, ready for another look. Had to redo some of the tests. Just verified everything still works in e2e.

Copy link
Contributor

Choose a reason for hiding this comment

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

split this into two ifs - the first if should be "not trigger on image change || not automatic" continue. Make this easier to read.

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

@ironcladlou ironcladlou force-pushed the image-trigger-matching-fix branch 2 times, most recently from 6bd6ae6 to 6ac2444 Compare February 4, 2015 21:31
@smarterclayton
Copy link
Contributor

Rebase to get rid of merge commit

When matching deployment image change triggers to new image repository
records, use correct matching logic which takes into account both the
From and RepositoryName trigger fields.
@ironcladlou ironcladlou force-pushed the image-trigger-matching-fix branch from 41f0efe to 8d835b4 Compare February 5, 2015 15:06
@ironcladlou
Copy link
Contributor Author

Rebased.

@pmorie
Copy link
Contributor

pmorie commented Feb 5, 2015

LGTM 👍

@smarterclayton
Copy link
Contributor

LGTM too [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/844/) (Image: devenv-fedora_720)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 8d835b4

openshift-bot pushed a commit that referenced this pull request Feb 5, 2015
@openshift-bot openshift-bot merged commit f8a29f9 into openshift:master Feb 5, 2015
@ironcladlou ironcladlou deleted the image-trigger-matching-fix branch February 6, 2015 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants