Skip to content

Commit d5786fc

Browse files
bio-borisXiangs18Borisdependabot[bot]
authored
D->M 0.0.14 (#482)
* 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>
1 parent 60557e6 commit d5786fc

21 files changed

Lines changed: 352 additions & 228 deletions

File tree

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
4+
# Docker
5+
- package-ecosystem: docker
6+
directory: "/"
7+
schedule:
8+
interval: "monthly"
9+
open-pull-requests-limit: 25
10+
11+
# Python
12+
- package-ecosystem: "pip" # See documentation for possible values
13+
directory: "/" # Location of package manifests
14+
schedule:
15+
interval: "monthly"
16+
open-pull-requests-limit: 25
17+
18+
# GitHub Actions
19+
- package-ecosystem: "github-actions"
20+
directory: ".github/workflows"
21+
schedule:
22+
interval: "monthly"
23+
open-pull-requests-limit: 25

.github/workflows/check_build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build EE2 Docker Image
2+
3+
on:
4+
pull_request
5+
6+
jobs:
7+
docker:
8+
runs-on: ubuntu-latest
9+
steps:
10+
-
11+
name: Set up QEMU
12+
uses: docker/setup-qemu-action@v3
13+
-
14+
name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v3
16+
-
17+
name: Build and push
18+
uses: docker/build-push-action@v6
19+
with:
20+
push: false
21+
tags: ee2/test:test

.github/workflows/ee2-tests.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# This workflow will install Python dependencies, run tests and lint
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
# To ssh into this build add the following:
5-
#- name: Start SSH session
6-
# uses: luchihoratiu/debug-via-ssh@main
7-
# with:
8-
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
9-
# SSH_PASS: ${{ secrets.SSH_PASS }}
104

115
name: Execution Engine 2 Test Suite
126

@@ -18,7 +12,7 @@ jobs:
1812
runs-on: ubuntu-latest
1913
name: Lint With Black
2014
steps:
21-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
2216
- uses: psf/black@stable
2317
with:
2418
options: "--check --verbose"
@@ -35,11 +29,11 @@ jobs:
3529
name: Lint With Flake8
3630
steps:
3731
- name: Check out source repository
38-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3933
- name: Set up Python environment
40-
uses: actions/setup-python@v4
34+
uses: actions/setup-python@v5
4135
with:
42-
python-version: "3.8"
36+
python-version: "3.10.14"
4337
- name: flake8 Lint Lib
4438
uses: py-actions/flake8@v2
4539
with:
@@ -50,22 +44,38 @@ jobs:
5044
path: "./test"
5145

5246

47+
5348
Build_and_Run_Tests_and_CodeCov:
5449
name: Build and Run Tests and CodeCov
5550
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
mongo-config:
54+
- version: "7.0"
55+
init-path: "./test/dockerfiles/mongo/docker-entrypoint-initdb.d-7.0/"
56+
- version: "3.6"
57+
init-path: "./test/dockerfiles/mongo/docker-entrypoint-initdb.d-3.6/"
5658
steps:
5759
- name: Check out source repository
58-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
61+
- name: Set up Python environment
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: "3.10.14"
5965
- name: Install dependencies
6066
run: |
6167
pip install -r requirements.txt
6268
git clone https://github.com/kbase/jars /opt/jars
63-
- name: Build Docker Image
69+
- name: Set MongoDB Version and Init Path
6470
run: |
65-
docker build . -t execution_engine2:test
66-
- name: Run Tests
71+
echo "MONGO_VERSION=${{ matrix.mongo-config.version }}" >> $GITHUB_ENV
72+
echo "INIT_PATH=${{ matrix.mongo-config.init-path }}" >> $GITHUB_ENV
73+
- name: Start Services and Run Tests
6774
run: |
68-
docker-compose up -d
75+
docker compose up -d
6976
cp test/env/test.travis.env test.env
7077
make test-coverage
71-
codecov
78+
codecov --token="${{ secrets.CODECOV_TOKEN }}"
79+
- name: Cleanup
80+
run: |
81+
docker compose down

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: black
66
exclude: ".*execution_engine2Impl.py"
7-
- repo: https://gitlab.com/pycqa/flake8
8-
rev: '3.9.2'
7+
- repo: https://github.com/PyCQA/flake8
8+
rev: 3.9.2
99
hooks:
1010
- id: flake8

Dockerfile

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,8 @@ RUN curl -o /tmp/dockerize.tgz https://raw.githubusercontent.com/kbase/dockerize
2626
rm /tmp/dockerize.tgz
2727

2828

29-
# install mongodb
30-
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
31-
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list \
32-
&& apt-get update \
33-
&& apt-get install -y --no-install-recommends mongodb-org=3.6.11 mongodb-org-server=3.6.11 mongodb-org-shell=3.6.11 mongodb-org-mongos=3.6.11 mongodb-org-tools=3.6.11 \
34-
&& apt-get install -y --no-install-recommends mongodb \
35-
&& apt-get clean \
36-
&& rm -rf /var/lib/apt/lists/*
37-
38-
RUN echo "mongodb-org hold" | dpkg --set-selections \
39-
&& echo "mongodb-org-server hold" | dpkg --set-selections \
40-
&& echo "mongodb-org-shell hold" | dpkg --set-selections \
41-
&& echo "mongodb-org-mongos hold" | dpkg --set-selections \
42-
&& echo "mongodb-org-tools hold" | dpkg --set-selections
43-
4429
#Install Python3 and Libraries (source /root/miniconda/bin/activate)
45-
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
30+
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_24.5.0-0-Linux-x86_64.sh -O ~/miniconda.sh \
4631
&& bash ~/miniconda.sh -b -p /miniconda-latest
4732

4833
# Setup Cron

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ setup-database:
3838
test-coverage:
3939
# Set up travis user in mongo
4040
@echo "Run tests for $(TESTS)"
41-
PYTHONPATH=.:lib:test pytest --cov-report=xml --cov lib/execution_engine2/ --verbose $(TESTS)
41+
PYTHONPATH=.:lib:test pytest --cov-report=xml --cov-report=term --cov lib/execution_engine2/ --verbose $(TESTS)
4242

4343
build-condor-test-image:
4444
cd test/dockerfiles/condor && echo `pwd` && docker build -f Dockerfile . -t $(CONDOR_DOCKER_IMAGE_TAG_NAME)

RELEASE_NOTES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# execution_engine2 (ee2) release notes
22
=========================================
33

4+
## 0.0.14
5+
- Update clients to work with mongo7 by updating pymongo and mongoengine
6+
- Fix linting issues from flake8 and black
7+
- Update outdated libraries that can no longer be pip installed
8+
- The latest Dockerfile build contains conda which installs python 3.12.4 so these changes will pin python to 3.10 and save us headache in the future
9+
- Speed up tests by moving docker build step out
10+
- Create matrix of tests to run against mongo3.6 and mongo7
11+
412
## 0.0.13
5-
* Bump version in impl file
13+
* Bump version in impl file and sync branches
614

715
## 0.0.12
816
* Forcing black to 22.1.0 to make sure that GHA doesn't suddenly fail

docker-compose.yml

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,58 @@ version: "3.1"
22

33
services:
44

5+
# For Local Dev
56
# Requires a ` docker build . -t execution_engine2:test `
67
# Requires a ` make database `
7-
ee2:
8-
image: execution_engine2:test
9-
command:
10-
- "-poll"
11-
- "-template"
12-
- "/kb/module/build/templates/condor_config.templ:/etc/condor/condor_config"
13-
- "-template"
14-
- "/kb/module/test/deploy.cfg:/kb/module/deploy.cfg"
15-
- "-timeout"
16-
- "120s"
17-
- "-wait"
18-
- "tcp://mongodb:27017"
19-
- "-stdout"
20-
- "/kb/deployment/jettybase/logs/request.log"
21-
- "./scripts/entrypoint.sh"
22-
entrypoint: [ "dockerize" ]
23-
depends_on: ["mongodb","condor"]
24-
environment:
25-
- POOL_PASSWORD=weakpassword
26-
env_file: test/deploy.cfg
27-
volumes:
28-
- ./:/ee2
29-
30-
ee2_with_ssh:
31-
image: execution_engine2:test
32-
command:
33-
- "-poll"
34-
- "-template"
35-
- "/kb/module/build/templates/condor_config.templ:/etc/condor/condor_config"
36-
- "-template"
37-
- "/kb/module/build/templates/deploy.docker.cfg.templ:/kb/module/deploy.cfg"
38-
- "-timeout"
39-
- "120s"
40-
- "-wait"
41-
- "tcp://mongodb:27017"
42-
- "-stdout"
43-
- "/kb/deployment/jettybase/logs/request.log"
44-
- "./scripts/entrypoint.sh"
45-
entrypoint: [ "dockerize" ]
46-
depends_on: ["mongodb","condor"]
47-
environment:
48-
- POOL_PASSWORD=weakpassword
49-
- LOCAL_DEV=1
50-
- KB_DEPLOYMENT_CONFIG=/kb/module/deploy.cfg
51-
env_file: test/deploy.cfg
52-
ports: ["23:22","5678:5678"]
53-
volumes:
54-
- ./:/ee2
55-
- /Users:/Users
8+
# ee2:
9+
# image: execution_engine2:test
10+
# command:
11+
# - "-poll"
12+
# - "-template"
13+
# - "/kb/module/build/templates/condor_config.templ:/etc/condor/condor_config"
14+
# - "-template"
15+
# - "/kb/module/test/deploy.cfg:/kb/module/deploy.cfg"
16+
# - "-timeout"
17+
# - "120s"
18+
# - "-wait"
19+
# - "tcp://mongodb:27017"
20+
# - "-stdout"
21+
# - "/kb/deployment/jettybase/logs/request.log"
22+
# - "./scripts/entrypoint.sh"
23+
# entrypoint: [ "dockerize" ]
24+
# depends_on: ["mongodb","condor"]
25+
# environment:
26+
# - POOL_PASSWORD=weakpassword
27+
# env_file: test/deploy.cfg
28+
# volumes:
29+
# - ./:/ee2
30+
#
31+
# ee2_with_ssh:
32+
# image: execution_engine2:test
33+
# command:
34+
# - "-poll"
35+
# - "-template"
36+
# - "/kb/module/build/templates/condor_config.templ:/etc/condor/condor_config"
37+
# - "-template"
38+
# - "/kb/module/build/templates/deploy.docker.cfg.templ:/kb/module/deploy.cfg"
39+
# - "-timeout"
40+
# - "120s"
41+
# - "-wait"
42+
# - "tcp://mongodb:27017"
43+
# - "-stdout"
44+
# - "/kb/deployment/jettybase/logs/request.log"
45+
# - "./scripts/entrypoint.sh"
46+
# entrypoint: [ "dockerize" ]
47+
# depends_on: ["mongodb","condor"]
48+
# environment:
49+
# - POOL_PASSWORD=weakpassword
50+
# - LOCAL_DEV=1
51+
# - KB_DEPLOYMENT_CONFIG=/kb/module/deploy.cfg
52+
# env_file: test/deploy.cfg
53+
# ports: ["23:22","5678:5678"]
54+
# volumes:
55+
# - ./:/ee2
56+
# - /Users:/Users
5657

5758

5859

@@ -146,13 +147,15 @@ services:
146147
ZOOKEEPER_SYNC_LIMIT: 2docker-compose rm
147148
ZOOKEEPER_SERVERS: zookeeper:12888:13888
148149

150+
149151
mongodb:
150-
image: mongo:3.2
152+
image: mongo:${MONGO_VERSION:-7.0} # Use 7.0 as the default if MONGO_VERSION is not set
151153
environment:
152-
# provide your credentials here
153154
- MONGO_INITDB_ROOT_USERNAME=travis
154155
- MONGO_INITDB_ROOT_PASSWORD=travis
155156
- MONGO_INITDB_DATABASE=ee2
156-
ports: ["27018:27017","27017:27017"]
157+
ports:
158+
- "27018:27017"
159+
- "27017:27017"
157160
volumes:
158-
- "./test/dockerfiles/mongo/docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/"
161+
- ${INIT_PATH:-./test/dockerfiles/mongo/docker-entrypoint-initdb.d-7.0/}:/docker-entrypoint-initdb.d/

kbase.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ service-language:
88
python
99

1010
module-version:
11-
0.0.13
11+
0.0.14
1212

1313
owners:
1414
[bsadkhin, tgu2, wjriehl, gaprice]

0 commit comments

Comments
 (0)