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

Upgrade to 0.4.2, update CI #55

Merged
merged 5 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@ jobs:

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v4
with:
context: kbatch-proxy
file: kbatch-proxy/docker/production/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = "Tom Augspurger"

# The full version, including alpha/beta/rc tags
release = "0.4.1"
release = "0.4.2"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion kbatch-proxy/kbatch_proxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async def get_current_user(request: Request) -> User:
user = None

if user:
return User(**user, api_token=token, authenticated=True)
return User(**user, api_token=token)
else:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
Expand Down
2 changes: 1 addition & 1 deletion kbatch-proxy/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ gunicorn==20.1.0
jupyterhub
escapism
rich
pydantic[dotenv]
pydantic[dotenv]<2.0.0
4 changes: 2 additions & 2 deletions kbatch-proxy/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[metadata]
name = kbatch-proxy
version = 0.4.1
version = 0.4.2
description = Proxy batch job requests to kubernetes.
long_description = file: README.md
long_description_content_type = text/markdown
Expand All @@ -20,7 +20,7 @@ install_requires =
httpx
jupyterhub
kubernetes
pydantic[dotenv]
pydantic[dotenv]<2.0.0

[options.extras_require]
all =
Expand Down
2 changes: 1 addition & 1 deletion kbatch/kbatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from ._backend import make_job, make_cronjob


__version__ = "0.4.1"
__version__ = "0.4.2"

__all__ = [
"__version__",
Expand Down
2 changes: 1 addition & 1 deletion kbatch/kbatch/_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _make_job_spec(
return V1JobSpec(template=template, backoff_limit=0, ttl_seconds_after_finished=300)


def _make_job_name(name: str, schedule: str = None):
def _make_job_name(name: str, schedule: Union[str, None] = None):
generate_name = name
if not name.endswith("-"):
generate_name = name + "-"
Expand Down
2 changes: 1 addition & 1 deletion kbatch/kbatch/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _request_action(
token: Optional[str],
method: str,
model: Union[V1Job, V1CronJob],
resource_name: str = None,
resource_name: Union[str, None] = None,
json_data: Optional[dict] = None,
):
client = httpx.Client(follow_redirects=True)
Expand Down
2 changes: 1 addition & 1 deletion kbatch/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[metadata]
name = kbatch
version = 0.4.1
version = 0.4.2
description = Submit batch jobs to Kubernetes.
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down