-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Migrate xpack packetbeat #38135
Migrate xpack packetbeat #38135
Conversation
mage build unitTest | ||
} | ||
} | ||
elseif ($testType -eq "systemtest") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the file .buildkite/scripts/win_unit_tests.ps1
is specific about unit_tests
while it also runs mage systemTest
.
What do you think about this proposal that can avoid maintaining the .buildkite/scripts/win_unit_tests.ps1
but the pipeline itself?
rename the file for buildkite/scripts/win_mage.ps1
, it's more generic and could accept different mage goals.
testType
to be renamed for mageGoals
and then simplify the script with the below snippet:
if ($mageGoals -eq "systemTest") {
google_cloud_auth
}
mage $mageGoals
Change the pipeline stages with:
# .buildkite/scripts/generate_xpack_packetbeat_pipeline.sh
- label: ":windows: Windows Unit Tests - {{matrix.image}}"
command: ".buildkite/scripts/win_mage.ps1 build unitTest"
...
## TODO: uncomment when the issue https://github.com/elastic/beats/issues/38142 is solved
# - label: ":windows: Windows 10 System Tests"
# key: "extended-win-10-system-tests"
#. command: ".buildkite/scripts/win_mage.ps1 systemTest"
# .buildkite/scripts/generate_xpack_ libbeat_pipeline.sh
- label: ":windows: Windows 11 Unit Tests"
command: ".buildkite/scripts/win_mage.ps1 -w reader/etw build goUnitTest"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you that it could be done as you suggest. There is only one remark. We gonna decline to use Windows scripts soon (I hope in 1 week). If it's possible to avoid additional changes right now, let's do that. @v1v WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the file .buildkite/scripts/win_unit_tests.ps1
will not be used anymore soon? I still think the name of the file is not correct for the nature of what it does, so .buildkite/scripts/win_tests.ps1
could be more meaningful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
We are going to use our own BK Windows images and @dliappis is working on it.
When it's ready we are going to use command steps with 1-3 commands without using PowerShell scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming this script requires a lot of changes in the already prepared dynamic pipelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll then wait for @dliappis 's feedback; if he has no concerns, I'm happy with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @v1v for the great feedback (as usual!) The custom Windows images are now ready, so I am good with letting this as is and get rid of many custom scripts and snippets, including the one discussed here, ASAP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks all for the great work and review discussions!
mage build unitTest | ||
} | ||
} | ||
elseif ($testType -eq "systemtest") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @v1v for the great feedback (as usual!) The custom Windows images are now ready, so I am good with letting this as is and get rid of many custom scripts and snippets, including the one discussed here, ASAP.
@@ -172,6 +172,13 @@ func SystemTest(ctx context.Context) error { | |||
return devtools.GoTest(ctx, args) | |||
} | |||
|
|||
func getBucketName() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sharbuz if we haven't it yet, let's create a post migration ticket in the usual repo and link it to https://github.com/elastic/ingest-dev/issues/2794 to remind us that the conditional behavior here should be removed once Jenkins has been sunset (I realize that it should be possible to run the tests locally by devs too but I believe they have access to it already).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nfritts @norrietaylor, your team approval is required here even though this is purely a CI change that we own. |
💔 Build Failed
Failed CI Steps
History
cc @sharbuz |
💔 Build Failed
Failed CI Steps
History
cc @sharbuz |
💚 Build Succeeded
History
cc @sharbuz |
💚 Build Succeeded
History
cc @sharbuz |
💚 Build Succeeded
History
cc @sharbuz |
💚 Build Succeeded
History
cc @sharbuz |
Force merging this as it is blocked due to unrelated problems, no MacOS workers are available to execute the job |
* migrate xpack-metricbeat --------- Co-authored-by: Victor Martinez <[email protected]> Co-authored-by: Julien Lind <[email protected]> (cherry picked from commit e0d5fe5) # Conflicts: # .buildkite/scripts/setenv.sh # x-pack/packetbeat/magefile.go
* migrate xpack-metricbeat --------- Co-authored-by: Victor Martinez <[email protected]> Co-authored-by: Julien Lind <[email protected]> (cherry picked from commit e0d5fe5)
* migrate xpack-metricbeat --------- Co-authored-by: Victor Martinez <[email protected]> Co-authored-by: Julien Lind <[email protected]> (cherry picked from commit e0d5fe5)
* migrate xpack-metricbeat --------- Co-authored-by: Victor Martinez <[email protected]> Co-authored-by: Julien Lind <[email protected]> (cherry picked from commit e0d5fe5) Co-authored-by: sharbuz <[email protected]>
* migrate xpack-metricbeat --------- Co-authored-by: Victor Martinez <[email protected]> Co-authored-by: Julien Lind <[email protected]> (cherry picked from commit e0d5fe5) Co-authored-by: sharbuz <[email protected]>
What is the problem this PR solves?
Jenkins->Buildkite pipelines migration
Migrate
x-pack packetbeat
pipelineExample of the pipelines:
beats-xpack-packetbeat
Examples of the affected pipelines:
beats-libbeat
beats-metricbeat
beats-packetbeat
beats-winlogbeat
beats-xpack-libbeat
beats-xpack-metricbeat
Related issues
https://github.com/elastic/ingest-dev/issues/1693
#38142 - related to commented-out Windows system tests