Skip to content

Allow for more than one deployment per test under cloud-qa #173

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

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

Conversation

lsierant
Copy link
Contributor

@lsierant lsierant commented Jun 3, 2025

Summary

This patch allows to deploy more than one database managed by cloud-qa in a single e2e test.
Currently it's only possible under Ops Manager tests which deploys it in the same test.

How does it work for OM?
Multiple mdb resources under OM are possible thanks to resource.confgure() function, which requires to pass MongoDBOpsManager resource. It creates -project config map and credentials secret by using api keys that are available because there is an OM instance deployed in the same test.

How it was for cloud-qa tests?
Our tests were able to use only one "my-project" config map and credentials, which is created before the test pod is scheduled (configure_operator.sh). It contains fixed project name, which equals to the current namespace (a random string in CI). Reusing this config map leads to attempting to deploy mdb resource in the same cloud-qa project, which then the operator rejects.

What this PR changes for cloud-qa tests?
We hook into configure function allowing for passing None as ops manager resource. In this case we clone my-project config map and overwrite projectId to '{namespace}-{resourceName}'. The operator will then create a new cloud-qa project with that name allowing for running multiple cloud-qa-managed resources in one test.

Proof of Work

TBD as CI has a fatal failure.

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you checked for release_note changes?

Reminder (Please remove this when merging)

  • Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible
  • Our Short Guide for PRs: Link
  • Remember the following Communication Standards - use comment prefixes for clarity:
    • blocking: Must be addressed before approval.
    • follow-up: Can be addressed in a later PR or ticket.
    • q: Clarifying question.
    • nit: Non-blocking suggestions.
    • note: Side-note, non-actionable. Example: Praise
    • --> no prefix is considered a question

@lsierant lsierant mentioned this pull request Jun 3, 2025
3 tasks
@lsierant lsierant force-pushed the lsierant/pytest-refactor branch from 043f6e7 to 93baf39 Compare June 3, 2025 11:29
@lsierant lsierant force-pushed the lsierant/multi-cloud-qa branch from 4ba55b0 to 8515b05 Compare June 3, 2025 11:30
@lsierant lsierant force-pushed the lsierant/pytest-refactor branch from 93baf39 to 35c3435 Compare June 4, 2025 06:38
@lsierant lsierant force-pushed the lsierant/multi-cloud-qa branch from 8515b05 to 5ee79b4 Compare June 4, 2025 06:38
@lsierant
Copy link
Contributor Author

lsierant commented Jun 4, 2025

evergreen retry

lsierant added a commit that referenced this pull request Jun 4, 2025
# Summary

This PR contains no functional changes - only moving functions around. 
It's extracting common bits imported from different places to their own
files which resolves *some* cyclic dependencies in the code.
It's by no means a complete refactor, it's an extracted refactor from
the followup change (#173) which triggered cyclic dependencies in the
first place.

## Proof of Work

[Green
EVG](https://spruce.mongodb.com/version/683fe9d44e8b7f0007877a9e/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC)

## Checklist
- [ ] Have you linked a jira ticket and/or is the ticket in the title?
- [ ] Have you checked whether your jira ticket required DOCSP changes?
- [ ] Have you checked for release_note changes?

## Reminder (Please remove this when merging)
- Please try to Approve or Reject Changes the PR, keep PRs in review as
short as possible
- Our Short Guide for PRs:
[Link](https://docs.google.com/document/d/1T93KUtdvONq43vfTfUt8l92uo4e4SEEvFbIEKOxGr44/edit?tab=t.0)
- Remember the following Communication Standards - use comment prefixes
for clarity:
  * **blocking**: Must be addressed before approval.
  * **follow-up**: Can be addressed in a later PR or ticket.
  * **q**: Clarifying question.
  * **nit**: Non-blocking suggestions.
  * **note**: Side-note, non-actionable. Example: Praise 
  * --> no prefix is considered a question
Base automatically changed from lsierant/pytest-refactor to master June 4, 2025 18:05
@lsierant lsierant force-pushed the lsierant/multi-cloud-qa branch from 5ee79b4 to 973fbda Compare June 4, 2025 18:06
@lsierant lsierant force-pushed the lsierant/multi-cloud-qa branch from 5bd8491 to 94a69a9 Compare June 9, 2025 21:55
@lsierant
Copy link
Contributor Author

evergreen refresh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant