Skip to content

Commit

Permalink
upgrade github actions (#477)
Browse files Browse the repository at this point in the history
* upgrade github actions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove yarl

* fix lint

* downgrade neuro-sdk to 23.2.0

* downgrade neuro-sdk to 23.2.0

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
zubenkoivan and pre-commit-ci[bot] authored Sep 16, 2024
1 parent 1db044f commit b033d36
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 27 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@ name: CI
on:
push:
branches: [master]
tags: [v*.*, v*.*.*]
tags: [v*]
pull_request:
branches: [master]
pull_request_target:
branches: [master]
schedule:
- cron: 0 4 * * *

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
if: |
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') ||
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]')
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_REGION: us-east-1
Expand All @@ -27,7 +22,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Cache packages
Expand Down Expand Up @@ -67,7 +62,7 @@ jobs:
- name: Build Docker image
run: make docker_build
- name: Upload image artifact
uses: neuro-inc/upload-image-action@v21.9.2
uses: neuro-inc/upload-image-action@v24.4.0
with:
image: platformneuroflowapi
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -76,15 +71,15 @@ jobs:
name: Create release
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: neuro-inc/reuse/.github/workflows/release-service.yaml@v0.0.31
uses: neuro-inc/reuse/.github/workflows/release-service.yaml@v24.9.0
with:
image: platformneuroflowapi
helm_charts: platform-neuro-flow

deploy_dev:
name: Deploy on dev
needs: release
uses: neuro-inc/reuse/.github/workflows/deploy-dev.yaml@v0.0.31
uses: neuro-inc/reuse/.github/workflows/deploy-dev.yaml@v24.9.0
with:
helm_charts: platform-neuro-flow
version: ${{ needs.release.outputs.version }}
2 changes: 1 addition & 1 deletion .github/workflows/setup-automerge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Enable auto-merge
on:
pull_request_target:
pull_request:
types: [opened]

permissions:
Expand Down
1 change: 1 addition & 0 deletions alembic/versions/0647beeadb7d_add_org_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-05-12 19:35:03.484368
"""

import sqlalchemy as sa

from alembic import op
Expand Down
1 change: 1 addition & 0 deletions alembic/versions/18e02ee52b12_add_bake_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-04-29 17:50:30.689500
"""

import sqlalchemy as sa

from alembic import op
Expand Down
1 change: 1 addition & 0 deletions alembic/versions/ae504a8e5860_add_project_name_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-03-22 09:55:16.375384
"""

import sqlalchemy as sa

from alembic import op
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-04-26 08:51:55.571516
"""

import sqlalchemy as sa

from alembic import op
Expand Down
1 change: 1 addition & 0 deletions alembic/versions/dd6533a83f29_enable_cascade_removal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-09-15 17:50:21.723475
"""

from typing import Any, Optional

from alembic import op
Expand Down
1 change: 1 addition & 0 deletions alembic/versions/f00badb90a87_create_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-02-24 18:08:13.764531
"""

import sqlalchemy as sa
import sqlalchemy.dialects.postgresql as sapg

Expand Down
1 change: 1 addition & 0 deletions alembic/versions/f2f6c4cf6930_add_bake_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-05-17 12:19:07.538465
"""

import sqlalchemy as sa
import sqlalchemy.dialects.postgresql as sapg

Expand Down
1 change: 1 addition & 0 deletions alembic/versions/f36b3465eb48_add_bake_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Create Date: 2021-04-28 18:46:19.425340
"""

import sqlalchemy as sa
import sqlalchemy.dialects.postgresql as sapg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-09-22 17:49:31.070060
"""

from typing import Any, Optional

from alembic import op
Expand Down
10 changes: 6 additions & 4 deletions platform_neuro_flow_api/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ def _decorator(handler: F) -> F:
@functools.wraps(handler)
async def _wrapped(self: Any, request: aiohttp.web.Request) -> Any:
query_data = {
key: request.query.getall(key)
if len(request.query.getall(key)) > 1
or isinstance(schema.fields.get(key), fields.List)
else request.query[key]
key: (
request.query.getall(key)
if len(request.query.getall(key)) > 1
or isinstance(schema.fields.get(key), fields.List)
else request.query[key]
)
for key in request.query.keys()
}
validated = schema.load(query_data)
Expand Down
16 changes: 9 additions & 7 deletions platform_neuro_flow_api/storage/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,15 @@ def _to_values(self, item: Bake) -> dict[str, Any]:
graphs[_full_id2str(key)] = subgr
payload["graphs"] = graphs
payload["meta"] = {
"git_info": {
"sha": item.meta.git_info.sha,
"branch": item.meta.git_info.branch,
"tags": item.meta.git_info.tags,
}
if item.meta.git_info
else None,
"git_info": (
{
"sha": item.meta.git_info.sha,
"branch": item.meta.git_info.branch,
"tags": item.meta.git_info.tags,
}
if item.meta.git_info
else None
),
}
return {
"id": payload.pop("id"),
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-e .
-r syntax.txt
docker==6.1.3
docker==7.1.0
pytest==7.4.3
pytest-asyncio==0.21.1
pytest-cov==4.1.0
5 changes: 1 addition & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install_requires =
aiohttp==3.8.6
neuro-auth-client==22.6.1
neuro-logging==21.12.2
neuro-sdk==23.10.0
neuro-sdk==23.2.0
aiohttp-cors==0.7.0
marshmallow==3.20.1
aiohttp-apispec==3.0.0b2
Expand All @@ -27,9 +27,6 @@ install_requires =
psycopg2-binary==2.9.9
asyncpg==0.28.0
sqlalchemy==1.4.25
# yarl is broken since 1.9.1:
# https://github.com/aio-libs/yarl/issues/854#issuecomment-1520182983
yarl==1.9.2

[options.entry_points]
console_scripts =
Expand Down

0 comments on commit b033d36

Please # to comment.