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

feat(doNoEval): default doNotEval SPeL expression to On #1028

Closed

Conversation

ciurescuraul
Copy link
Contributor

@ciurescuraul ciurescuraul commented Mar 21, 2023

This turns "doNotEval" expression to ON by default.

References PR #978

1.30 release notes documentation

Copy link
Contributor

@ovidiupopa07 ovidiupopa07 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@dbyron-sf dbyron-sf left a comment

Choose a reason for hiding this comment

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

Please update the PR description and commit message to feat(doNoEval) since this is a behavior change. But then also, what's the reasoning behind this change? Please include that as well in the PR description + commit message.

And then finally, I don't think it's quite time to do this. This release note says the flag is new for 1.30, but 1.30 hasn't been released yet. Let's wait until it has before merging this.

@ovidiupopa07
Copy link
Contributor

ovidiupopa07 commented Mar 21, 2023

Please update the PR description and commit message to feat(doNoEval) since this is a behavior change. But then also, what's the reasoning behind this change? Please include that as well in the PR description + commit message.

And then finally, I don't think it's quite time to do this. This release note says the flag is new for 1.30, but 1.30 hasn't been released yet. Let's wait until it has before merging this.

hi @dbyron-sf . The initial PR was back-ported to 1.28 and 1.29. The intention here is to enable this feature by default in 1.30 instead of manually opting in for it. As per the RFC we should enable a feature in the next LTS (since it was back-ported to previous LTS releases)

@ciurescuraul ciurescuraul changed the title chore(feature-flag): default doNotEval SPeL expression to On feat(doNoEval): default doNotEval SPeL expression to On Mar 21, 2023
@dbyron-sf
Copy link
Contributor

Please update the PR description and commit message to feat(doNoEval) since this is a behavior change. But then also, what's the reasoning behind this change? Please include that as well in the PR description + commit message.
And then finally, I don't think it's quite time to do this. This release note says the flag is new for 1.30, but 1.30 hasn't been released yet. Let's wait until it has before merging this.

hi @dbyron-sf . The initial PR was back-ported to 1.28 and 1.29. The intention here is to enable this feature by default in 1.30 instead of manually opting in for it. As per the RFC we should enable a feature in the next LTS (since it was back-ported to previous LTS releases)

OK, it helps to know the feature has already been released. I don't see where spinnaker/governance#303 says "we should enable a feature in the next LTS", but even if it does, I'd still like to know the specific reason for doing it for this flag. Like, what are the consequences for changing this flag on existing spinnaker users/installations/pipelines/etc. ? Who is it going to break vs. who is it going to help. Or perhaps put another way, I'd like to see the release note describing this change.

As a bit of an aside, spinnaker/governance#303 does say

We propose that this change take effect immediately in the backport
policy and relevant contributor documentation be updated to describe
the facilities for feature flagging in the project.

but I don't think https://spinnaker.io/docs/community/contributing/code/releasing/#release-branch-patch-criteria has been updated.

I would like the “doNotEval” SPeL
expression feature flag on, so that I can more accurately control the processing of SPeL expression (particularly when processing Terraform output data).
…on, so that we can more accurately control the processing of SPeL expression (particularly when processing Terraform output data).

* This feature is disabled only when the flag is set explicitly to false.

*The "doNotEval" SpEL helper makes it possible to skip SpEL evaluation in other SpEL helpers e.g. toJson

* One reason is that a SpEL expression failure appears while using Terraformer to serialize data from a Terraform Plan execution. The execution creates a JSON object instead of a JSON string.

* The cause is that the SpEL processor in Spinnaker throws a null value if the SpEL expression has ${ in it

* Also, if the users are using an older Terraform version (<= 0.12), then it is also using the template provider from Terraform.

* HashiCorp has deprecated the template provider since v0.12

* Users should use the template file function instead
@dbyron-sf
Copy link
Contributor

Thanks for all the updates. I'm still curious what, if anything, could break as a result of this default changing.

…on, so that we can more accurately control the processing of SPeL expression (particularly when processing Terraform output data).

* This feature is disabled only when the flag is set explicitly to false.

* The "doNotEval" SpEL helper makes it possible to skip SpEL evaluation in other SpEL helpers e.g. toJson

* One reason is that a SpEL expression failure appears while using Terraformer to serialize data from a Terraform Plan execution. The execution creates a JSON object instead of a JSON string.

* The cause is that the SpEL processor in Spinnaker throws a null value if the SpEL expression has ${ in it

* Also, if the users are using an older Terraform version (<= 0.12), then it is also using the template provider from Terraform.

* HashiCorp has deprecated the template provider since v0.12

* Users should use the template file function instead
@ciurescuraul
Copy link
Contributor Author

ciurescuraul commented Mar 23, 2023

Thanks for all the updates. I'm still curious what, if anything, could break as a result of this default changing.

@dbyron-sf it's complex to say what can be broken because it's a part of SpEL. Our customers may write on SpEL everything. My task was to enable this feature and I guess Armory product managers are fine with possible issues caused by this change. I guess the worst issue that could happen is the pipeline will not work as expected.

@dbyron-sf
Copy link
Contributor

I guess the worst issue that could happen is the pipeline will not work as expected.

This is a bit of an unsatisfying answer, but with SpEL expressions it may be the best we can do. It does look like https://spinnaker.io/docs/releases/next-release-preview/#donoteval-spel-helper could use a tweak when this PR goes in. Would you mind putting up a PR with those changes? At that point I'm OK with this going in, though I still think it may not make 1.30.0.

@ovidiupopa07
Copy link
Contributor

I guess the worst issue that could happen is the pipeline will not work as expected.

This is a bit of an unsatisfying answer, but with SpEL expressions it may be the best we can do. It does look like https://spinnaker.io/docs/releases/next-release-preview/#donoteval-spel-helper could use a tweak when this PR goes in. Would you mind putting up a PR with those changes? At that point I'm OK with this going in, though I still think it may not make 1.30.0.

spinnaker/spinnaker.io#317 -> PR for the docs

@ciurescuraul ciurescuraul requested review from dbyron-sf and ovidiupopa07 and removed request for dbyron-sf and ovidiupopa07 March 27, 2023 08:54
@dbyron-sf
Copy link
Contributor

Now that 1.30.0 is out, spinnaker/spinnaker.io#317 could use an update @ovidiupopa07 , and I think this is good to go.

@ciurescuraul
Copy link
Contributor Author

Created new PR with updated docs for Release 1.31 -> spinnaker/spinnaker.io#324

@dbyron-sf
Copy link
Contributor

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Mar 30, 2023

update

❌ Pull request can't be updated with latest base branch changes

Mergify needs the author permission to update the base branch of the pull request.
@armory-io needs to authorize modification on its head branch.
err-code: AE990

@dbyron-sf
Copy link
Contributor

Looks like this needs a rebase, but otherwise it looks good to go to me. You agree @ovidiupopa07 ? I pushed the button too fast and merged spinnaker/spinnaker.io#324 already...

I would like the “doNotEval” SPeL
expression feature flag on, so that I can more accurately control the processing of SPeL expression (particularly when processing Terraform output data).
…on, so that we can more accurately control the processing of SPeL expression (particularly when processing Terraform output data).

* This feature is disabled only when the flag is set explicitly to false.

*The "doNotEval" SpEL helper makes it possible to skip SpEL evaluation in other SpEL helpers e.g. toJson

* One reason is that a SpEL expression failure appears while using Terraformer to serialize data from a Terraform Plan execution. The execution creates a JSON object instead of a JSON string.

* The cause is that the SpEL processor in Spinnaker throws a null value if the SpEL expression has ${ in it

* Also, if the users are using an older Terraform version (<= 0.12), then it is also using the template provider from Terraform.

* HashiCorp has deprecated the template provider since v0.12

* Users should use the template file function instead
…on, so that we can more accurately control the processing of SPeL expression (particularly when processing Terraform output data).

* This feature is disabled only when the flag is set explicitly to false.

* The "doNotEval" SpEL helper makes it possible to skip SpEL evaluation in other SpEL helpers e.g. toJson

* One reason is that a SpEL expression failure appears while using Terraformer to serialize data from a Terraform Plan execution. The execution creates a JSON object instead of a JSON string.

* The cause is that the SpEL processor in Spinnaker throws a null value if the SpEL expression has ${ in it

* Also, if the users are using an older Terraform version (<= 0.12), then it is also using the template provider from Terraform.

* HashiCorp has deprecated the template provider since v0.12

* Users should use the template file function instead
@@ -1,5 +1,5 @@
kotlinVersion=1.4.32
org.gradle.parallel=true
spinnakerGradleVersion=8.25.0
spinnakerGradleVersion=8.26.0
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems fishy as the HEAD of master is already using 8.26.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems fishy as the HEAD of master is already using 8.26.0.

Created new PR to eliminate any doubt -> #1030

Copy link
Contributor

Choose a reason for hiding this comment

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

Bummer...then we lose all the context. Sure there's no way to bring this back to life?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't realize at the moment what the impact would be.
It doesn't seem to let me reopen this one, the new PR #1030 has a reference to the old PR #1028. I hope this helps

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