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

[ci] speed builds for module specific changes #18592

Merged
merged 10 commits into from
May 20, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented May 15, 2020

What does this PR do?

Use the step to gather what's the module that has been changed when the changes are related to a specific module only. This will help to skip certain tests that are not related to the module that has been changes.

Why is it important?

Fast builds with the tests that required to be tested rather than everything else.

How to test this PR locally

In the CI, touch certain files for the same module and see whether it does what's expected or the other way around, touch a few files and see if it works.

6b65f05 caused

[2020-05-16T09:39:25.049Z] [INFO] getBeatsModule: apache with regex [a-z0-9]+beat\/module\/([^\/]+)\/.*

See the very last line in the log

@v1v v1v self-assigned this May 15, 2020
@v1v v1v added the automation label May 15, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 15, 2020
@v1v v1v force-pushed the feature/ci-for-single-modules branch from 1cb0924 to f22c835 Compare May 15, 2020 17:33
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 15, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 1
Passed 9214
Skipped 1541
Total 10756

Test errors

Expand to view the tests failures

  • Name: Build and Test / Metricbeat OSS Integration tests / TestData – heap

    • Status: FAILED
    • Age: 11
    • Duration: 16.63
    • Error Details: Failed

Steps errors

Expand to view the steps failures

  • Name: Install docker-compose 1.21.0

    • Description: .ci/scripts/install-docker-compose.sh

    • Result: FAILURE

    • Duration: 1 min 33 sec

    • Start Time: 2020-05-19T10:48:54.448+0000

    • log

  • Name: Mage goIntegTest

    • Description: mage goIntegTest

    • Result: FAILURE

    • Duration: 33 min 36 sec

    • Start Time: 2020-05-19T10:49:02.681+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-05-19T11:50:27.043Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-19T11:50:27.043Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-19T11:50:27.043Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-19T11:50:27.043Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-19T11:50:27.043Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-19T11:50:27.594Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats
[2020-05-19T11:50:27.906Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-19T11:50:27.919Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Lint
[2020-05-19T11:50:28.009Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-05-19T11:50:28.087Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-19T11:50:28.162Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-19T11:50:28.242Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-19T11:50:28.349Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-19T11:50:28.456Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-19T11:50:28.537Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-19T11:50:28.620Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-05-19T11:50:28.695Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-05-19T11:50:28.778Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-19T11:50:28.856Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-05-19T11:50:28.929Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-19T11:50:29.007Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-05-19T11:50:29.084Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-19T11:50:29.153Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-19T11:50:29.219Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-19T11:50:29.289Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-19T11:50:29.360Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-05-19T11:50:29.430Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-19T11:50:29.499Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-05-19T11:50:29.566Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-19T11:50:29.631Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-19T11:50:29.701Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-19T11:50:29.770Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-05-19T11:50:29.841Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-19T11:50:29.927Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-19T11:50:29.995Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-19T11:50:30.066Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-05-19T11:50:30.132Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-19T11:50:30.202Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-19T11:50:30.272Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Auditbeat-Mac-OS-X
[2020-05-19T11:50:30.337Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Filebeat-oss
[2020-05-19T11:50:30.408Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-19T11:50:30.476Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-19T11:50:30.544Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-19T11:50:30.612Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-19T11:50:30.694Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-05-19T11:50:30.764Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-19T11:50:30.840Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-05-19T11:50:30.909Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Libbeat-oss
[2020-05-19T11:50:30.979Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-05-19T11:50:31.046Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-05-19T11:50:31.117Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-19T11:50:31.473Z] + cat
[2020-05-19T11:50:31.473Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-19T11:50:31.473Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-19T11:50:38.062Z] runbld>>> runbld started
[2020-05-19T11:50:38.062Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-19T11:50:39.990Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-18592' in order of occurrence in the config (last value wins).
[2020-05-19T11:50:41.374Z] runbld>>> Debug logging enabled.
[2020-05-19T11:50:41.374Z] runbld>>> Storing result
[2020-05-19T11:50:41.374Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-19T11:50:41.374Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200519115040-3E473772
[2020-05-19T11:50:41.374Z] runbld>>> Adding system facts.
[2020-05-19T11:50:42.316Z] runbld>>> Adding vcs info for the latest commit:  6b3920bdc55d8106aeb0c5d50e0d69b4d70d17e3
[2020-05-19T11:50:42.316Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-19T11:50:42.316Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-19T11:50:42.316Z] Processing JUnit reports with runbld...
[2020-05-19T11:50:42.316Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-19T11:50:42.890Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-19T11:50:42.890Z] runbld>>> DURATION: 17ms
[2020-05-19T11:50:42.890Z] runbld>>> STDOUT: 40 bytes
[2020-05-19T11:50:42.890Z] runbld>>> STDERR: 49 bytes
[2020-05-19T11:50:42.890Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-19T11:50:42.890Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats
[2020-05-19T11:50:44.274Z] runbld>>> Storing build metadata: 
[2020-05-19T11:50:44.274Z] runbld>>> Adding test report.
[2020-05-19T11:50:44.274Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats
[2020-05-19T11:50:45.216Z] runbld>>> Found 111 test output files
[2020-05-19T11:50:46.161Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-19T11:50:46.161Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-19T11:50:46.161Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-19T11:50:46.161Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-19T11:50:46.161Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-19T11:50:46.161Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-19T11:50:47.106Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-19T11:50:47.107Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-19T11:50:47.369Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 10606 Skipped: 1304
[2020-05-19T11:50:47.629Z] runbld>>> Storing result
[2020-05-19T11:50:47.629Z] runbld>>> FAILURES: 1
[2020-05-19T11:50:48.199Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-19T11:50:48.199Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200519115040-3E473772
[2020-05-19T11:50:48.199Z] runbld>>> Email notification disabled by environment variable.
[2020-05-19T11:50:48.199Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-19T11:50:54.783Z] Running on worker-395930 in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18592
[2020-05-19T11:50:55.041Z] [INFO] getVaultSecret: Getting secrets
[2020-05-19T11:50:55.097Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-19T11:50:57.066Z] + chmod 755 generate-build-data.sh
[2020-05-19T11:50:57.066Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18592/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18592/runs/10 FAILURE 5030047
[2020-05-19T11:50:57.066Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18592/runs/10/steps/?limit=10000 -o steps-info.json
[2020-05-19T11:50:59.545Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18592/runs/10/tests/?status=FAILED -o tests-errors.json
[2020-05-19T11:51:00.246Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18592/runs/10/log/ -o pipeline-log.txt

Jenkinsfile Outdated
@@ -1,6 +1,6 @@
#!/usr/bin/env groovy

@Library('apm@current') _
@Library('apm@test/single-module') _
Copy link
Member Author

Choose a reason for hiding this comment

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

For testing purposes

@andresrc andresrc added the Team:Automation Label for the Observability productivity team label May 18, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 18, 2020
@v1v
Copy link
Member Author

v1v commented May 18, 2020

jenkins run the tests please

@v1v v1v marked this pull request as ready for review May 18, 2020 11:29
@ycombinator
Copy link
Contributor

Hi @v1v, question about the commit you made to test this PR: 6b65f05. The changeset for that commit was:

metricbeat/module/apache/test.txt

Given that, I'd expect only the Metricbeat stages to have run, but looking at https://beats-ci.elastic.co/blue/organizations/jenkins/Beats%2Fbeats-beats-mbp/detail/PR-18592/6/pipeline it looks like all stages (Auditbeat, Agent, etc.) were run.

// Run the ITs by running only if the changeset affects a specific module.
// For such, it's required to look for changes under the module folder and exclude anything else
// such as ascidoc and png files.
env.MODULE = getGitMatchingGroup(pattern: '[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*', exclude: '^(((?!\\/module\\/).)*$|.*\\.asciidoc|.*\\.png)')
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that we're now excluding anything that's not under /module/, do we also need the .*\.asciidoc and .*\.png patterns in the exclude list?

Copy link
Member Author

@v1v v1v May 20, 2020

Choose a reason for hiding this comment

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

Yes, we do, otherwise all those PRs that change the top-level CHANGELOG.next.asciidoc will not match the pattern, besides, the exclude does include the png files similar to the pattern that it is used for whether the PR is only related to docs changes. We could potentially remove the png if required, although I don't know all the cases, but the asciidoc is needed.

For instance:

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, lets keep this for now and optimize later.

@v1v
Copy link
Member Author

v1v commented May 20, 2020

Given that, I'd expect only the Metricbeat stages to have run, but looking at https://beats-ci.elastic.co/blue/organizations/jenkins/Beats%2Fbeats-beats-mbp/detail/PR-18592/6/pipeline it looks like all stages (Auditbeat, Agent, etc.) were run.

Expected behaviour, in this PR there are changes in the Jenkinsfile and if so, it will run all the stages:

Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

LGTM. This is going to make a huge impact in speeding up builds! <3

@v1v v1v merged commit 01bee98 into elastic:master May 20, 2020
@v1v v1v changed the title ci: speed builds for module specific changes [ci] speed builds for module specific changes May 20, 2020
@v1v v1v deleted the feature/ci-for-single-modules branch May 20, 2020 08:42
v1v added a commit to v1v/beats that referenced this pull request May 20, 2020
v1v added a commit to v1v/beats that referenced this pull request May 20, 2020
@jsoriano
Copy link
Member

There is one issue with this change in some builds. Some of the current mage targets fail if the module specified by MODULE doesn't exist. This happens at least with mage goIntegTest in Metricbeat. This can be an issue if a change triggers builds for multiple beats, because not all of them are going to have all the modules.
For example in this build MODULE seems to be set to kafka, what is correct because a test is modified in the kafka module in OSS metricbeat, but x-pack metricbeat build fails because it doesn't have a kafka module.
This can be locally reproduced with MODULE=kafka mage goIntegTest from the x-pack/metricbeat directory.
I guess that one option to solve this is to use MODULE only as a filter, so it only executes tests for the module in MODULE.

This makes me wonder what happens if multiple modules are modified, what is the result of the call to getGitMatchingGroup?
In principle current mage targets that make use of MODULE expect a single module, but it could be interesting to support multiple modules.

@ycombinator
Copy link
Contributor

ycombinator commented May 25, 2020 via email

@v1v
Copy link
Member Author

v1v commented May 26, 2020

This makes me wonder what happens if multiple modules are modified, what is the result of the call to getGitMatchingGroup?

An empty value, so far it does only look for all the changes in PRs with only one module. In other words, if there are PRs with multiple changes in multiple modules then the MODULE env variable will be set to empty.

  1. Move the setting of the MODULE env var from the global scope into each
    relevant build stage (Filebeat OSS, Metricbeat OSS, Filebeat X-Pack, etc.)
    and adjust the patterns to fit each stage.

Would you mind raising an issue with those requirements?

@ycombinator
Copy link
Contributor

Would you mind raising an issue with those requirements?

Done: #18741

@jsoriano
Copy link
Member

An empty value, so far it does only look for all the changes in PRs with only one module. In other words, if there are PRs with multiple changes in multiple modules then the MODULE env variable will be set to empty.

Good. Then I guess that the only urgent thing to do would be #18741.

Thanks @v1v and @ycombinator for the explanations and creating the issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants