Skip to content

Conversation

lsierant
Copy link
Contributor

Summary

This patch adds dumping standard log artifacts in code snippets runs.

mongodb-kubernetes-gh-app bot and others added 6 commits May 19, 2025 10:09
# Summary

Release MCK `1.1.0`

## Proof of Work

Passing CI checks is enough.

## 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

---------

Co-authored-by: mongodb-kubernetes-gh-app[bot] <208647083+mongodb-kubernetes-gh-app[bot]@users.noreply.github.com>
Co-authored-by: Maciej Karaś <[email protected]>
# Summary

Cherry-pick/backport of #136
…137) (#145)

# Summary
`configure_docker_auth.sh` should only try to skip logging in when not
running on Evergreen, according to its comments, but the shell script
condition was inverted to only enable the early exit on Evergreen, not
locally.

This now causes issues on Evergreen where preceding runs might have left
stale quay.io registry credentials. Always configuring docker auth on CI
ensures that our credentials override any stale ones.

## Proof of Work
No CI tasks output `Docker credentials are up to date - not performing
the new login!`.

## 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

# Summary

<!-- Enter your issue summary here.-->

## Proof of Work

<!-- Enter your proof that it works here.-->

## 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

Co-authored-by: Yavor Georgiev <[email protected]>
# Summary

All our init images have been renamed from mongodb-enterprise- to
mongodb-kubernetes-
There was a mistake in
`controllers/operator/construct/appdb_construction.go`

---------

# Summary

<!-- Enter your issue summary here.-->

## Proof of Work

<!-- Enter your proof that it works here.-->

## 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

Co-authored-by: Julien-Ben <[email protected]>
Co-authored-by: Maciej Karaś <[email protected]>
Co-authored-by: Maciej Karaś <[email protected]>
Co-authored-by: Anand <[email protected]>
# Summary

The EVG `quay_login` step is overriding the credentials required for
building the bundle with all the images.

## Proof of Work

Successful patch:
https://spruce.mongodb.com/version/682ebab0a50ac10007169b43

## 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
# Summary
This PR is republished #140. 

This patch contains:
- changes to `docs/community-search/quick-start` code snippets
- added prerelease and public variants variants
- handle auto-commit of snippets output from docs/

## Proof of Work

[Automatic output update
PR](#139)
[Passing snippets
test](https://spruce.mongodb.com/task/mongodb_kubernetes_prerelease_kind_code_snippets_task_kind_community_search_snippets_patch_28bf6726999bd11ca62f3a90c0b939746dbf2285_682d56a7bf693400079e59fa_25_05_21_04_29_30/logs?execution=0)
@lsierant lsierant requested a review from a team as a code owner May 22, 2025 11:27
nammn and others added 2 commits May 22, 2025 12:08
# Summary

<!-- Enter your issue summary here.-->

## Proof of Work

<!-- Enter your proof that it works here.-->

## 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
@lsierant lsierant force-pushed the lsierant/dump-diagnostic-logs-from-snippets branch from 1aecbb6 to 0c79eeb Compare May 22, 2025 12:49
@lsierant
Copy link
Contributor Author

evergreen refresh

# Summary

Cherry-picked commits created by the snippet tests from [snippets test
run](https://spruce.mongodb.com/version/682f2df6e1745e000788a1d5/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC)
```
  origin/meko-snippets-update-20250522141139
  origin/meko-snippets-update-20250522150715
  origin/meko-snippets-update-20250522151200
```

---------

Co-authored-by: Evergreen <[email protected]>
@lsierant lsierant changed the base branch from release-1.1 to master May 26, 2025 08:12
@lsierant
Copy link
Contributor Author

lsierant commented Aug 26, 2025

closing as #366 will include changes from this PR

@lsierant lsierant closed this Aug 26, 2025
lsierant added a commit that referenced this pull request Sep 11, 2025
# Summary

This PR refactors how we generate and manage outputs from snippet tests.

Before, every snippet module has its own output/ directory. But because
snippet modules were reused across different tests we had no way of
storing the outputs from different test runs (the files were
overwritten).

Changes were needed to accommodate upcoming Search snippets, but due to
the large scale of this refactoring it was extracted onto master.

**Only changes to public/architectures has been made performed in this
PR. Existing search snippets are left intact and will be refactored on
the search feature branch**. After this PR is approved, a followup PR in
the docs repo will be created adjusting for the new include paths.

This PR incorporated changes from #150 to fix diagnostic dumps from GKE
clusters.

# What this change will help
* committing back snippet output will be easy as adding changes from one
directory `scripts/code_snippets/tests/outputs/test_*` instead of
traversing the tree and dealing with the conflicts pushed from different
test runs.
* more clarity what snippets and outputs we're using in docs
* ability to share snippet modules and gather different outputs from the
same snippet module for different testing scenarios.

## Glossary
* `Snippet module` - directory containing `test.sh` and scripts in a
`code_snippets` sub directory. It's a reusable set of scripts, e.g.
`public/architectures/setup-multi-cluster/ra-01-setup-gke`.
* Snippet test - automated test running in evg that runs multiple
snippet modules. It's a top level entrypoint that runs all the snippet
modules. Examples:
`scripts/code_snippets/tests/test_gke_multi_cluster_no_mesh_snippets.sh`,
`scripts/code_snippets/test_gke_multi_cluster_snippets.sh`. 
* Previously we named these files a "task" and they were directly in
`scripts/code_snippets` dir (e.g.
`scripts/code_snippets/task_gke_multi_cluster_no_mesh_snippets_test.sh`).
* `Snippet outputs` - output files (.out) gathered from a `Snippet
test`.

## Changes 
* Snippet modules don't store their outputs in the snippet directory
now, but in `scripts/code_snippets/tests/outputs/<test name>` directory,
which is gathering *all* outputs from a given snippet test.
* Every file name in any of the code_snippets directories in the
codebase must have a globally unique name. Existing file names has been
refactored to match the new convention (in public/architecture).
* Validation/linter has been added
(`scripts/code_snippets/validate_snippets.py`) added to `pre-commit`
that enforces this convention.
*  The naming convention is the following: 
* Snippet module directory must be prefixed by some arbitrary prefix.
Snippet modules in reference architectures has been prefixed with
"ra-NN`, e.g. `ra-02-setup-operator`. Every snippet file belonging to
this module should be also prefixed (e.g.
`ra-02_0046_create_image_pull_secrets.sh`)
* This allows for storing all the snippets outputs in a flat directory,
guaranteeing we won't overwrite outputs.
* This also helps quickly verifying the paths that will be used in the
docs to include snippets and outputs. Having those prefixes will help
identifying if any included file is coming from a correct snippet test
and module.
* Improved diagnostic gathering from the test runs
     * GKE clusters are correctly handled now
* Every file name is prefixed with the kube context name and the
namespace from which the files were downloaded. *This will impact all
the e2e test runs*, but it will improve diagnostic archive in cases
where we dump more than one namespace or k8s cluster.
* All evergreen yamls related to snippets have been moved into
.evergreen-snippets.yml (included from the main .evergreen-snippets.yml)

Here is the fragment of the current directory structure: 
```
public/architectures
├── ra-06-ops-manager-multi-cluster
│   ├── code_snippets
│   │   ├── ra-06_0250_generate_certs.sh
│   │   ├── ra-06_0300_ops_manager_create_admin_credentials.sh
            [...]
│   │   ├── ra-06_9100_delete_backup_namespaces.sh
│   │   └── ra-06_9200_delete_om.sh
│   ├── env_variables.sh
│   ├── teardown.sh
│   └── test.sh
├── ra-07-mongodb-replicaset-multi-cluster
│   ├── code_snippets
│   │   ├── ra-07_1050_generate_certs.sh
│   │   ├── ra-07_1100_mongodb_replicaset_multi_cluster.sh
            [...]
│   │   └── ra-07_9000_delete_resources.sh
│   ├── env_variables.sh
│   ├── teardown.sh
│   └── test.sh
```

```
scripts/code_snippets
├── tests
│   ├── outputs
│   │   ├── test_gke_multi_cluster_no_mesh_snippets
│   │   ├── test_gke_multi_cluster_snippets
│   │   │   ├── ra-01_0030_verify_access_to_clusters.out
│   │   │   ├── ra-02_0200_kubectl_mongodb_configure_multi_cluster.out
│   │   │   ├── ra-02_0205_helm_configure_repo.out
            [...]
│   │   │   ├── ra-06_0321_ops_manager_wait_for_pending_state.out
│   │   │   ├── ra-06_0322_ops_manager_wait_for_running_state.out
│   │   │   └── ra-06_0522_ops_manager_wait_for_running_state.out
│   │   └── test_kind_search_community_snippets
│   │       ├── 01_0090_helm_add_mogodb_repo.out
│   │       ├── 01_0100_install_operator.out
            [...]
│   │       ├── 03_0450_execute_search_query.out
│   │       └── 03_0455_execute_vector_search_query.out
│   ├── test_gke_multi_cluster_no_mesh_snippets.sh
│   ├── test_gke_multi_cluster_snippets.sh
│   └── test_kind_search_community_snippets.sh

```

## Proof of Work

[Green EVG
run](https://spruce.mongodb.com/version/68ae250c41ef2800073ac896/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC)
for all snippets.

## 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 added changelog file?
    - use `skip-changelog` label if not needed
- refer to [Changelog files and Release
Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes)
section in CONTRIBUTING.md for more details
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.

5 participants