Fix JDK matrix pipeline after configurable it split#17461
Fix JDK matrix pipeline after configurable it split#17461dliappis merged 2 commits intoelastic:mainfrom
Conversation
PR elastic#17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem.
|
This pull request does not have a backport label. Could you fix it @dliappis? 🙏
|
| def pq_integration_test_parts(self, parts) -> list[JobRetValues]: | ||
| return list(map(lambda idx: pq_integration_tests(self, idx+1, parts), range(parts)) | ||
| def pq_integration_test_parts(self, parts) -> list[partial[JobRetValues]]: | ||
| return [partial(self.pq_integration_tests, part=idx+1, parts=parts) for idx in range(parts)] |
There was a problem hiding this comment.
(links below are Elastic internal)
Linux tests using this PR: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/449
Windows tests using this PR: https://buildkite.com/elastic/logstash-windows-jdk-matrix-pipeline/builds/398
|
For reviewers: please advise regarding backport to 9.0, is this ok? |
Thanks @jsvd / @andsel for the quick comment! This purely boils down to preference/readability/more idiomatic Python; both as things are now after #17462 or my suggestion are identical in functionality. Personally I find list comprehensions more concise and readable (as mentioned in the above official Python docs) as well as partial functions also a very readable way to create a new function from an existing one with some parts of the arguments preset, but this is matter of personal preference. Therefore feel free to close this PR if you prefer. |
|
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @dliappis |
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0)
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0)
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0)
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0)
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0)
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0) Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0) Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0) Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0) Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link: https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444 reporting the following error ``` File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263 def integration_tests(self, part: int, parts: int) -> JobRetValues: ^^^ SyntaxError: invalid syntax There was a problem rendering the pipeline steps. Exiting now. ``` ) This commit fixes the above problem, which was already fixed in #17642, using a more idiomatic way. Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit b9469e0) Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>





Release notes
[rn:skip]
What does this PR do?
PR #17219 introduced configurable split quantities for IT tests, which resulted in broken JDK matrix pipelines (e.g. as seen via the elastic internal link:
https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444
reporting the following error
)
This PR fixes the above problem.
Why is it important/What is the impact to the user?
Restores the functionality of the JDK (Windows/Linux) matrix pipelines.
How to test this PR locally
Linux
BUILDKITE_PIPELINE_NAME="Logstash Linux JDK matrix pipeline" MATRIX_OSES="ubuntu-22.04" python3 scripts/jdk-matrix-tests/generate-steps.py | yq .produces:
Output from generate-steps for Linux
Windows
BUILDKITE_PIPELINE_NAME="Logstash Windows JDK matrix pipeline" MATRIX_OSES="windows-2025" MATRIX_JDKS="adoptiumjdk_21" python3 scripts/jdk-matrix-tests/generate-steps.py | yq .results in the following output:
Related issues
PR #17219