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

Remove hardcoded module definitions in CI #39506

Merged
merged 2 commits into from May 13, 2024

Conversation

dliappis
Copy link
Contributor

@dliappis dliappis commented May 10, 2024

Proposed commit message

For reasons described in 1, we hard coded aws or kubernetes for the env var MODULE, when no file changes were detected under modules/ per project.

This commit reverts this and allows all module tests to run if no changesets apply. As discussed in 1, for the tests to run properly (and not go into an infinite loop)
if there are no module changes the MODULE env var should not be set, rather than set to an empty string.

This commit is an important fix as it covers a major delta in test coverage between Jenkins and Buildkite.

Related issues

Closes https://github.com/elastic/ingest-dev/issues/2993

Screenshots

Logs/Tests

Footnotes

  1. https://github.com/elastic/ingest-dev/issues/2993#issuecomment-2104741977 2

@dliappis dliappis self-assigned this May 10, 2024
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels May 10, 2024
Copy link
Contributor

mergify bot commented May 10, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @dliappis? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@dliappis dliappis force-pushed the remove-hardcoded-modules branch 3 times, most recently from 3e0ce27 to 8e14111 Compare May 10, 2024 16:43
@dliappis dliappis added backport-v7.17.0 Automated backport with mergify backport-v8.13.0 Automated backport with mergify backport-v8.14.0 Automated backport with mergify labels May 10, 2024
@dliappis dliappis force-pushed the remove-hardcoded-modules branch 4 times, most recently from f8a5d80 to d630e5b Compare May 10, 2024 18:25
For reasons described in [^1], we hard coded `aws` or `kubernetes` for
the env var `MODULE`, when no file changes were detected under
`modules/` per project.

This commit reverts this and brings back the default behavior which is
not to set the MODULE env var when nothing has changed.

[^1]: elastic/ingest-dev#2993
@dliappis dliappis added macOS Enable builds in the CI for darwin testing :Windows aws Enable builds in the CI for aws cloud testing labels May 11, 2024
@dliappis dliappis removed aws Enable builds in the CI for aws cloud testing :Windows macOS Enable builds in the CI for darwin testing labels May 12, 2024
@dliappis
Copy link
Contributor Author

/test

1 similar comment
@dliappis
Copy link
Contributor Author

/test

@dliappis dliappis marked this pull request as ready for review May 12, 2024 18:15
@dliappis dliappis requested a review from a team as a code owner May 12, 2024 18:15
@@ -57,7 +57,7 @@ steps:
# defines the MODULE env var based on what's changed in a PR
source .buildkite/scripts/changesets.sh
defineModuleFromTheChangeSet metricbeat
echo "~~~ Will run tests with env var MODULE=$$MODULE"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We remove references to the env var MODULE because if unset, it fails the command due to undefined variable checks (set -e)

Copy link
Contributor

@alexsapran alexsapran left a comment

Choose a reason for hiding this comment

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

Overall I am LGTM.
Only one question on the var changedModules where we set it?

@dliappis
Copy link
Contributor Author

Overall I am LGTM. Only one question on the var changedModules where we set it?

MODULE is defined/exported from within the function defineModuleFromTheChangeset (either the bash or powershell script)

@dliappis dliappis merged commit c91503b into elastic:main May 13, 2024
165 of 166 checks passed
mergify bot pushed a commit that referenced this pull request May 13, 2024
For reasons described in [^1], we hard coded `aws` or `kubernetes` for the env var `MODULE`, when no file changes were detected under `modules/` per project.

This commit reverts this and allows all module tests to run if no changesets apply. As discussed in [^1], for the tests to run properly (and not go into an infinite loop)
if there are no module changes the `MODULE` env var should **not** be set, rather than set to an empty string.

This commit is an important fix as it covers a major delta in test coverage between Jenkins and Buildkite.

Closes https://github.com/elastic/ingest-dev/issues/2993

[^1]: https://github.com/elastic/ingest-dev/issues/2993#issuecomment-2104741977

(cherry picked from commit c91503b)

# Conflicts:
#	.buildkite/metricbeat/pipeline.yml
mergify bot pushed a commit that referenced this pull request May 13, 2024
For reasons described in [^1], we hard coded `aws` or `kubernetes` for the env var `MODULE`, when no file changes were detected under `modules/` per project.

This commit reverts this and allows all module tests to run if no changesets apply. As discussed in [^1], for the tests to run properly (and not go into an infinite loop)
if there are no module changes the `MODULE` env var should **not** be set, rather than set to an empty string.

This commit is an important fix as it covers a major delta in test coverage between Jenkins and Buildkite.

Closes https://github.com/elastic/ingest-dev/issues/2993

[^1]: https://github.com/elastic/ingest-dev/issues/2993#issuecomment-2104741977

(cherry picked from commit c91503b)
mergify bot pushed a commit that referenced this pull request May 13, 2024
For reasons described in [^1], we hard coded `aws` or `kubernetes` for the env var `MODULE`, when no file changes were detected under `modules/` per project.

This commit reverts this and allows all module tests to run if no changesets apply. As discussed in [^1], for the tests to run properly (and not go into an infinite loop)
if there are no module changes the `MODULE` env var should **not** be set, rather than set to an empty string.

This commit is an important fix as it covers a major delta in test coverage between Jenkins and Buildkite.

Closes https://github.com/elastic/ingest-dev/issues/2993

[^1]: https://github.com/elastic/ingest-dev/issues/2993#issuecomment-2104741977

(cherry picked from commit c91503b)
dliappis added a commit that referenced this pull request May 13, 2024
…9527)

For reasons described in [^1], we hard coded `aws` or `kubernetes` for the env var `MODULE`, when no file changes were detected under `modules/` per project.

This commit reverts this and allows all module tests to run if no changesets apply. As discussed in [^1], for the tests to run properly (and not go into an infinite loop)
if there are no module changes the `MODULE` env var should **not** be set, rather than set to an empty string.

This commit is an important fix as it covers a major delta in test coverage between Jenkins and Buildkite.

Closes https://github.com/elastic/ingest-dev/issues/2993

[^1]: https://github.com/elastic/ingest-dev/issues/2993#issuecomment-2104741977

(cherry picked from commit c91503b)

---------

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
dliappis added a commit that referenced this pull request May 13, 2024
For reasons described in [^1], we hard coded `aws` or `kubernetes` for the env var `MODULE`, when no file changes were detected under `modules/` per project.

This commit reverts this and allows all module tests to run if no changesets apply. As discussed in [^1], for the tests to run properly (and not go into an infinite loop)
if there are no module changes the `MODULE` env var should **not** be set, rather than set to an empty string.

This commit is an important fix as it covers a major delta in test coverage between Jenkins and Buildkite.

Closes https://github.com/elastic/ingest-dev/issues/2993

[^1]: https://github.com/elastic/ingest-dev/issues/2993#issuecomment-2104741977

(cherry picked from commit c91503b)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
dliappis added a commit that referenced this pull request May 13, 2024
For reasons described in [^1], we hard coded `aws` or `kubernetes` for the env var `MODULE`, when no file changes were detected under `modules/` per project.

This commit reverts this and allows all module tests to run if no changesets apply. As discussed in [^1], for the tests to run properly (and not go into an infinite loop)
if there are no module changes the `MODULE` env var should **not** be set, rather than set to an empty string.

This commit is an important fix as it covers a major delta in test coverage between Jenkins and Buildkite.

Closes https://github.com/elastic/ingest-dev/issues/2993

[^1]: https://github.com/elastic/ingest-dev/issues/2993#issuecomment-2104741977

(cherry picked from commit c91503b)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
v1v added a commit to v1v/beats that referenced this pull request May 15, 2024
…-actions

* upstream/main: (313 commits)
  github-action: delete opentelemetry workflow (elastic#39559)
  updatecli: move to the .github folder and support for signed commits (elastic#39472)
  Osquerybeat: Add action responses data stream (elastic#39143)
  [winlogbeat] performance improvment; avoid rendering event message twice (elastic#39544)
  Fix the AWS SDK dependencies issue causing the "not found, ResolveEndpointV2" error (elastic#39454)
  x-pack/filebeat/input/cel: add http metrics collection (elastic#39503)
  build(deps): bump github.com/elastic/elastic-agent-libs from 0.9.4 to 0.9.7 (elastic#39424)
  Remove unused env vars from pipelines (elastic#39534)
  [BK] - Remove osx steps from branch execution (elastic#39552)
  [BK] - Remove certain steps from running for Branches (elastic#39533)
  Allow dependabot report BK status checks (elastic#39540)
  Remove hardcoded module definitions in CI (elastic#39506)
  Explicitly set DOCKER_PULL, RACE_DETECTOR and TEST_COVERAGE for pipelines (elastic#39510)
  Fixed pipelines formatting (elastic#39513)
  Update filebeat pipeline to match Jenkins steps (elastic#39261)
  Add error check to groupToEvents so we don't blindly add error values (elastic#39404)
  Remove fields not needed for session view in add_session_view processor (elastic#39500)
  `aws-s3` input: Split S3 poller and SQS reader into explicit input objects (elastic#39353)
  ci(jenkins): remove post-build notifications (elastic#39483)
  [DOCS] Add the `read_pipeline` cluster privilege for winlogbeat and the `auto_configure` index privilege to beats documentation (elastic#38534)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.17.0 Automated backport with mergify backport-v8.13.0 Automated backport with mergify backport-v8.14.0 Automated backport with mergify ci Team:Ingest-EngProd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants