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

pants ci: add integration tests job #6273

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from
Draft

pants ci: add integration tests job #6273

wants to merge 44 commits into from

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Nov 2, 2024

Running integration tests requires making the tests parallel safe with RabbitMQ and Redis.

@cognifloyd cognifloyd added this to the pants milestone Nov 2, 2024
@cognifloyd cognifloyd self-assigned this Nov 2, 2024
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines. Requires some effort to review. label Nov 2, 2024
@cognifloyd cognifloyd force-pushed the pants-itests branch 10 times, most recently from 6575608 to 7f869b9 Compare November 3, 2024 06:23
@pull-request-size pull-request-size bot added size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review. and removed size/L PR that changes 100-499 lines. Requires some effort to review. labels Nov 6, 2024
@cognifloyd cognifloyd force-pushed the pants-itests branch 3 times, most recently from 1d377cb to 11b7e65 Compare November 7, 2024 03:04
@pull-request-size pull-request-size bot added size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several. and removed size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review. labels Nov 8, 2024
Only run them when ST2_CI==true to minimize requirements for local development.
Also fix a typo in a comment.
These changes were already made for MongoDB and RabbitMQ rules.
This removes a TODO comment and slightly refactors to follow the same convention.
pants `--tag=...` notes:
`--tags=abc,def` (a csv list):
    is an OR condition (either `abc` tag, or `def` tag, or both).
`--tags=abc --tag=def` (multiple entries):
    is an AND condition (Both `abc` tag AND `def` tag).

So, we use `--tag=integration --tag=-st2cluster` to select targets
that have the `integration` tag AND do NOT have the `st2cluster` tag.
pants `--tag=...` notes:
`--tags=abc,def` (a csv list):
    is an OR condition (either `abc` tag, or `def` tag, or both).
`--tags=abc --tag=def` (multiple entries):
    is an AND condition (Both `abc` tag AND `def` tag).

So, we use `--tag=integration --tag=st2cluster` to select targets
that have the `integration tag AND the `st2cluster` tag.
(The other integration test job excludes the st2cluster tagged targets).
@cognifloyd cognifloyd force-pushed the pants-itests branch 2 times, most recently from 6a4511d to ca2d42f Compare November 12, 2024 16:59
@cognifloyd
Copy link
Member Author

cognifloyd commented Nov 15, 2024

Planned sequence of PRs:

flowchart LR
    A("✅ #6275: BUILD metadata") ---> D("⏳ 6279: pants-plugins/uses_services st2cluster")
    D --> H("#6273: Add integration tests job")
    B("✅ #6276: Refactor CI scripts") ---> G("?: Add redis namespace + ST2_* ST2TESTS_* vars in launchdev.sh")
    G --> H
    C("✅ #6277: env var support") --> E("⏳ 6278: pants-plugins/uses_services refactor + mongo")
    E --> F("?: Add messaging.prefix option") & G
    F --> H
Loading

Copy link
Contributor

@winem winem left a comment

Choose a reason for hiding this comment

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

Well done!

This is btw the first time that I used the Explain feature of the GItHub Copilot which was quite helpful to double-check my own interpretation of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure: ci/cd pantsbuild size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants