Skip to content

SECURITY-36 Mongo3.6/Mongo7 Matrix#484

Merged
bio-boris merged 14 commits into
SECURITY-36-2from
SECURITY-36-3
Aug 6, 2024
Merged

SECURITY-36 Mongo3.6/Mongo7 Matrix#484
bio-boris merged 14 commits into
SECURITY-36-2from
SECURITY-36-3

Conversation

@bio-boris

@bio-boris bio-boris commented Aug 3, 2024

Copy link
Copy Markdown
Collaborator

Description of PR purpose/changes

  • Update tests to run against mongo7 and mongo 3.6
  • Speed up tests by moving docker build step out

@bio-boris bio-boris changed the title Mongo3.6/Mongo3.7 Matrix SECURITY-36 Mongo3.6/Mongo3.7 Matrix Aug 3, 2024
@bio-boris bio-boris changed the title SECURITY-36 Mongo3.6/Mongo3.7 Matrix SECURITY-36 Mongo3.6/Mongo7 Matrix Aug 3, 2024
@bio-boris bio-boris requested a review from Xiangs18 August 5, 2024 17:11
@bio-boris bio-boris marked this pull request as ready for review August 5, 2024 17:11
Comment on lines +10 to +21
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: false
tags: ee2/test:test No newline at end of file

@Xiangs18 Xiangs18 Aug 5, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Is QEMU setup necessary?
  2. format each step with spacing to make it easier to read. (optional)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,14 @@
print("Adding travis username to ee2 database for mongo 7.0")
db = db.getSiblingDB('ee2')

@Xiangs18 Xiangs18 Aug 5, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't need this line db.auth('travis', 'travis') on mongo7

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Correct, it causes the init script to fail on mongo7

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Otherwise, I would be able to use the same script for mongo 3.6 and mongo 7, but I cannot. That's the whole point of using 2 different scripts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread docker-compose.yml
- "27017:27017"
volumes:
- "./test/dockerfiles/mongo/docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/"
- ${INIT_PATH:-./test/dockerfiles/mongo/docker-entrypoint-initdb.d-7.0/}:/docker-entrypoint-initdb.d/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

INIT_PATH got mapped from the host machine into the container. Where are the files inside docker-entrypoint-initdb.d used?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This allows you to use the docker-compose both locally and in github actions. In github actions, we set the INIT_PATH in the action. These files are used by mongo to create the proper users for testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@Xiangs18

Xiangs18 commented Aug 5, 2024

Copy link
Copy Markdown
Contributor

Also, is Codecov being run properly? Is not displayed in the CI check.

@codecov

codecov Bot commented Aug 6, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (SECURITY-36-2@13fce35). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             SECURITY-36-2     #484   +/-   ##
================================================
  Coverage                 ?   88.68%           
================================================
  Files                    ?       29           
  Lines                    ?     2740           
  Branches                 ?        0           
================================================
  Hits                     ?     2430           
  Misses                   ?      310           
  Partials                 ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bio-boris

Copy link
Copy Markdown
Collaborator Author

I added the codecov token @Xiangs18

@Xiangs18 Xiangs18 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@bio-boris bio-boris merged commit 07df69b into SECURITY-36-2 Aug 6, 2024
@bio-boris bio-boris deleted the SECURITY-36-3 branch August 6, 2024 16:15
bio-boris added a commit that referenced this pull request Aug 6, 2024
* Testing upgrades
* Update mongo version
* Update python to  3.10.10
* Update ee2-tests.yml
* SECURITY-36 Mongo3.6/Mongo7 Matrix (#484)
* Linting
* Bump version and release notes



---------

Co-authored-by: Boris <bio-boris@github.com>
bio-boris added a commit that referenced this pull request Aug 7, 2024
* Update RELEASE_NOTES.md

* add dependabot.yml && fix .pre-commit-config.yaml file (#478)

* add dependabot
* fix pre-comit config
* black format fix
* flake8 fix

* SECURITY-36 3.10.10 (#477)

* Testing upgrades
* Update mongo version
* Update python to  3.10.10
* Update ee2-tests.yml
* SECURITY-36 Mongo3.6/Mongo7 Matrix (#484)
* Linting
* Bump version and release notes



---------

Co-authored-by: Boris <bio-boris@github.com>

* Bump actions/setup-python from 4 to 5 in /.github/workflows (#481)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Sijie Xiang <xiangs18@bu.edu>
Co-authored-by: Boris <bio-boris@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

2 participants