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

Regression fix: refer multiple services in custom mapping templates #955

Merged
merged 1 commit into from Apr 22, 2021

Conversation

pedjak
Copy link
Contributor

@pedjak pedjak commented Apr 21, 2021

service structs are initialized inside a for range loop, and the loop variable is passed as a reference to each of service structs.
However, with each new iteration its value changes, but the reference remains the same, leading that the value of the last iteration
is passed to all service structs eventually.

  • do not pass loop variable to service structs
  • unit tests were extended to detect regressions in the future
  • Bind two backend services by creating 1 SBR to a single application acceptance test was modified to detect regressions in the future

Fixes #944

service structs are initialized inside a `for range` loop, and the loop variable is passed as a reference to each of service structs.
However, with each new iteration its value changes, but the reference remains the same, leading that the value of the last iteration
is passed to all service structs eventually.

* do not pass loop variable to service structs
* unit tests were extended to detect regressions in the future
* `Bind two backend services by creating 1 SBR to a single application` acceptance test was modified to detect regressions in the future

Signed-off-by: Predrag Knezevic <pknezevi@redhat.com>
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #955 (c05438d) into master (2c7ab9e) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #955      +/-   ##
==========================================
+ Coverage   53.69%   53.77%   +0.07%     
==========================================
  Files          23       23              
  Lines        1231     1233       +2     
==========================================
+ Hits          661      663       +2     
  Misses        480      480              
  Partials       90       90              
Impacted Files Coverage Δ
pkg/reconcile/pipeline/context/impl.go 67.76% <100.00%> (+0.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c7ab9e...c05438d. Read the comment docs.

@pmacik
Copy link
Contributor

pmacik commented Apr 22, 2021

/lgtm
/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pmacik

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:

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 7e3c8fd into redhat-developer:master Apr 22, 2021
@pedjak pedjak added this to the 0.8 milestone May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release 0.7.0 breaks selection of multiple services
4 participants