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

Devops 1367 #11

Merged
merged 41 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9670708
Create dependabot.yml
bio-boris Jun 9, 2023
3028fb7
Long overdue commit
Jul 24, 2023
aab0660
Long overdue commit
Jul 24, 2023
ea3feb8
update gitignore
Jul 24, 2023
d877637
update gitignore
Jul 24, 2023
4a9c3fb
Update
Jul 24, 2023
27f85f6
Merge branch 'main' into DEVOPS-1367
Jul 24, 2023
be8d009
Run black
Jul 24, 2023
47fe69f
updated getting servce info code
Jul 26, 2023
e794445
updated getting servce info code
Jul 26, 2023
d198b93
updated getting servce info code
Jul 26, 2023
2db80e4
updated getting servce info code
Jul 26, 2023
788440a
updated getting servce info code
Jul 26, 2023
468f857
Fixing some fixings
Jul 26, 2023
76fd2a7
Fixing some fixings
Jul 26, 2023
1b166d2
New changes
Jul 29, 2023
abf97ea
Continued refactoring
Jul 29, 2023
2a3f11b
Continued refactoring
Aug 1, 2023
12f166a
fixed ingress
Aug 1, 2023
f366a41
Fixed more stuff
Aug 1, 2023
44c646e
Fix imports
Aug 1, 2023
07f48e2
Fix ingress
Aug 2, 2023
3c1c524
Default catalog
Aug 2, 2023
4fdcde4
make ids stringable
Aug 2, 2023
e8a636a
Fix ids
Aug 2, 2023
b8cf797
Fix stop endpoint
Aug 7, 2023
b1736ca
Changed from async
Aug 8, 2023
d9526ff
Changed from async
Aug 8, 2023
c9fceb7
Changed from async
Aug 8, 2023
a05d622
Changed from async
Aug 9, 2023
cfc7457
Update precommit hook and stuff
Aug 9, 2023
dc58064
Update precommit hook and stuff
Aug 14, 2023
469b1e5
Update precommit hook and stuff
Aug 14, 2023
3ce470a
Update precommit hook and stuff
Aug 14, 2023
c2217ec
Update precommit hook and stuff
Aug 14, 2023
86e820f
Update precommit hook and stuff
Aug 14, 2023
1efe65d
Update precommit hook and stuff
Aug 14, 2023
9cdc002
Update check
Aug 14, 2023
dc0aa8e
Fix errors
Aug 16, 2023
e0b98e4
Fix errors
Aug 16, 2023
60ebab2
Fix errors
Aug 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .env
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

# Client URLS
AUTH_SERVICE_URL="https://ci.kbase.us/services/auth/api/V2/me"
CATALOG_URL="https://kbase.us/services/catalog"
AUTH_LEGACY_URL="https://ci.kbase.us/services/auth/api/legacy/KBase/Sessions/Login"
CATALOG_URL="https://ci.kbase.us/services/catalog"

# Service Wizard URLS
EXTERNAL_SW_URL="https://ci.kbase.us/services/service_wizard"
EXTERNAL_DS_URL="https://ci.kbase.us/dynamic_services"
KBASE_ENDPOINT="https://ci.kbase.us/services"
KBASE_SERVICES_ENDPOINT="https://ci.kbase.us/services"
KBASE_ROOT_ENDPOINT="https://ci.kbase.us"
ROOT_PATH="/"

# SW Admin Stuff
KBASE_ADMIN_ROLE="KBASE_ADMIN"
CATALOG_ADMIN_ROLE="CATALOG_ADMIN"
SERVICE_WIZARD_ROLE="SERVICE_WIZARD_ADMIN"
CATALOG_ADMIN_TOKEN="62IYPZGS7O773DBLZZCSE542BP4C2E7G"


SERVICE_WIZARD_ADMIN_ROLE="SERVICE_WIZARD_ADMIN"
CATALOG_ADMIN_TOKEN="REDACTED"

# Kubernetes configs
KUBECONFIG="~/.kube/config"
NAMESPACE="staging-dynamic-services"
NAMESPACE="staging-dynamic-services" # Note this also creates a toleration V1Toleration(effect="NoSchedule", key=namespace, operator="Exists")
USE_INCLUSTER_CONFIG="false"


TAINT_TOLERATION_EXPRESSIONS=""
# APP_AFFINITY_FILE="app-affinity.yaml" # path to files that force apps to run on specific nodes
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependecies
- name: Install dependencies
# tried VaultVulp/action-pipenv but pytest wasn't on the path post action
shell: bash
run: |
pip install pipenv
pipenv sync --system --dev

- name: Run pre-commit Hooks
shell: bash
run: pre-commit run --all-files

- name: Run tests
shell: bash
run: PYTHONPATH=. pytest --cov=src --cov-report=xml test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
sarif_file: 'trivy-results.sarif'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
*Pipfile
.env
.coverage
__pycache__
.idea
venv
coverage.xml
installed_clients/
*.pytest-kind*
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3.11

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [--config, pyproject.toml]
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ RUN echo $GIT_COMMIT


ENTRYPOINT ["scripts/entrypoint.sh"]

1 change: 0 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

6 changes: 4 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ name = "pypi"
fastapi = "==0.95.2"
uvicorn = {version = "==0.22.0", extras = ["standard"]}
sentry-sdk = "==1.25.0"
#{version = "==23.5.2", extras = ["fastapi"]}
PySocks = "==1.7.1"
requests = "==2.31.0"
prometheus-fastapi-instrumentator = "==6.0.0"
Expand All @@ -18,11 +17,14 @@ python-dotenv = "==0.19.1"
httpx = "==0.24.1"
kubernetes = "==26.1.0"


[dev-packages]
pytest = "==7.3.1"
pytest-cov = "==4.0.0"
requests_mock = "==1.9.3"
pre-commit = "==3.3.3"
black = "==23.7.0"
flake8 = "==6.1.0"
pytest_kind = "==22.11.1"

[requires]
python_version = "3.11"
Loading