Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

fix: do not use variable out of its scope #1231

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Jun 2, 2021

What does this PR do?

It avoids using the platform variable out of its Groovy scope.

Why is it important?

The pipeline will fail whenever the else branch of the isGitRegionMatch is false. This bug will appear whenever there is a replay in the pipeline, or there are no changes in the git-regions defined by the regex. Before these changes, the log entry in the else branch would try to print the platform, which was declared in the if branch of the evaluation.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests (make unit-test), and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

Related issues

Follows-up

Backport to 7.x and 7.13.x

@mdelapenya mdelapenya self-assigned this Jun 2, 2021
@mdelapenya mdelapenya requested a review from a team June 2, 2021 06:03
@mdelapenya mdelapenya added bug Something isn't working v7.13.0 v7.14.0 labels Jun 2, 2021
@mdelapenya mdelapenya marked this pull request as ready for review June 2, 2021 06:05
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1231 opened

  • Start Time: 2021-06-02T06:04:02.929+0000

  • Duration: 26 min 57 sec

  • Commit: 495c802

Test stats 🧪

Test Results
Failed 0
Passed 202
Skipped 0
Total 202

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 202
Skipped 0
Total 202

@mdelapenya mdelapenya merged commit 070e552 into elastic:master Jun 2, 2021
mergify bot pushed a commit that referenced this pull request Jun 2, 2021
mergify bot pushed a commit that referenced this pull request Jun 2, 2021
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Jun 2, 2021
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Jun 2, 2021
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working v7.13.0 v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants