-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Promote image trigger annotation to GA and correct syntax #16226
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
Promote image trigger annotation to GA and correct syntax #16226
Conversation
Use the correct JSONPath syntax (this may be something to backport to 3.6.1).
|
/lgtm |
|
/hold |
|
Pointless to use hold like this.
On Sep 8, 2017, at 12:25 AM, Ben Parees <notifications@github.com> wrote:
/hold
(we're post-devcut)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16226 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p3R-xO8zP5x8e-XClyPBBYuzqQR0ks5sgMGmgaJpZM4PQqxw>
.
|
|
Oh, I didn't see you lgtm. We need to talk about some migration implications first - removing label. |
yeah i was trying to get fancy.
but it's alpha! :) |
|
@smarterclayton what happen to existing resources with this annotation? will they stop working? or we don't care because it was alpha? |
soltysh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall lgtm, but I'd like a clear answer wrt to migration path.
| // container image references changed when an image stream tag is updated. Today, only | ||
| // containers can be specified by fieldPath. | ||
| const TriggerAnnotationKey = "image.alpha.openshift.io/triggers" | ||
| const TriggerAnnotationKey = "image.openshift.io/triggers" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll point out here, what @mfojtik pointed in the comments. Are you thinking of existing users? Do you plan some kind of migration/release notes about this change. Why not supporting both of the annotation for a release for a smooth migration and change only after?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My current thinking is how #16225 does it
| } | ||
| // TODO: potentially make this more flexible, like whitespace | ||
| if name := strings.TrimSuffix(strings.TrimPrefix(selector, "?(@.name='"), "')"); name != selector { | ||
| if name := strings.TrimSuffix(strings.TrimPrefix(selector, "?(@.name==\""), "\")"); name != selector { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I start to wonder what is worse, jsonpath or regexp, 🤔
|
Jsonpath is worse because no one ever spec'd it.
On Sep 8, 2017, at 6:45 AM, Maciej Szulik <notifications@github.com> wrote:
*@soltysh* approved this pull request.
Overall lgtm, but I'd like a clear answer wrt to migration path.
------------------------------
In pkg/image/apis/image/v1/trigger/trigger.go
<#16226 (comment)>:
@@ -3,7 +3,7 @@ package trigger
// TriggerAnnotationKey is the annotation used on resources to signal
they wish to have
// container image references changed when an image stream tag is
updated. Today, only
// containers can be specified by fieldPath.
-const TriggerAnnotationKey = "image.alpha.openshift.io/triggers"
+const TriggerAnnotationKey = "image.openshift.io/triggers"
I'll point out here, what @mfojtik <https://github.com/mfojtik> pointed in
the comments. Are you thinking of existing users? Do you plan some kind of
migration/release notes about this change. Why not supporting both of the
annotation for a release for a smooth migration and change only after?
------------------------------
In pkg/image/trigger/annotations/annotations.go
<#16226 (comment)>:
@@ -78,7 +78,7 @@ func findContainerBySelector(spec ometa.PodSpecReferenceMutator, init bool, sele
return spec.GetContainerByIndex(init, i)
}
// TODO: potentially make this more flexible, like whitespace
- if name := strings.TrimSuffix(strings.TrimPrefix(selector,
"?(@.name='"), "')"); name != selector {
+ if name := strings.TrimSuffix(strings.TrimPrefix(selector,
"?(@.name==\""), "\")"); name != selector {
I start to wonder what is worse, jsonpath or regexp, 🤔
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16226 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_px7RtEXkOyCcly7v6b9QlCSd42JJks5sgRrEgaJpZM4PQqxw>
.
|
|
/test |
|
After thinking about this more I don't think we should provide a migration. Alpha is alpha, and this was only in 3.6. The reason why serving certs deserve a migration of some form is that we are using them in deployed code and have been using them since 3.3. This feature has a smaller window, and our general statement of alpha being unsupported and for preview stands. |
|
I'm all for anything that sets a precedent like this :) |
|
/retest |
|
/retest |
How much more work is to provide the migration. I like precedents (sometimes), but at the same time I'd like to be nice (at least try) for our users and provide the with tooling for migration. |
|
Considering this landed in 3.6 (out for a few weeks) and that we are
considering backporting the fix, it's hard to say that any amount of work
is worth it.
If we're going to invest the effort, there are better places to do so.
On Sep 18, 2017, at 9:05 AM, Maciej Szulik <notifications@github.com> wrote:
After thinking about this more I don't think we should provide a migration.
Alpha is alpha, and this was only in 3.6. The reason why serving certs
deserve a migration of some form is that we are using them in deployed code
and have been using them since 3.3. This feature has a smaller window, and
our general statement of alpha being unsupported and for preview stands.
How much more work is to provide the migration. I like precedents
(sometimes), but at the same time I'd like to be nice (at least try) for
our users and provide the with tooling for migration.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16226 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABG_pwPX1jwMXdXCmDpNFv7Upur3dPoYks5sjmqLgaJpZM4PQqxw>
.
|
OK, I think the last sentence convinced me more the the former 😉 |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, smarterclayton, soltysh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
Automatic merge from submit-queue |
Use the correct JSONPath syntax (this may be something to backport to
3.6.1).
@bparees @mfojtik @soltysh