Skip to content

Commit

Permalink
chore: resolve changes from conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Aug 27, 2024
1 parent 1fe17ee commit 545b3c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 51 deletions.
48 changes: 1 addition & 47 deletions .github/workflows/test_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,53 +63,6 @@ jobs:
${{ steps.docker_image.outputs.image_repository }}:${{ steps.docker_image.outputs.image_tag }}
${{ steps.docker_image.outputs.image_repository }}:${{ env.DEVCONTAINER_IMAGE_TAG_MAIN }}
style-checks:
runs-on: ubuntu-latest
needs:
- build-devcontainer
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DEVCONTAINER_REGISTRY }}/${{ env.DEVCONTAINER_IMAGE_NAME }}
tags: |
type=ref,event=pr,prefix=cache-pr-,priority=600
type=ref,event=branch,prefix=cache-,priority=500
type=ref,event=tag,prefix=cache-,priority=500
flavor: |
latest=false
- name: Extract Docker image name
id: docker_image
env:
IMAGE_TAGS: ${{ steps.meta.outputs.tags }}
run: |
IMAGE=$(echo "$IMAGE_TAGS" | cut -d" " -f1)
IMAGE_REPOSITORY=$(echo "$IMAGE" | cut -d":" -f1)
IMAGE_TAG=$(echo "$IMAGE" | cut -d":" -f2)
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
echo "image_repository=$IMAGE_REPOSITORY" >> "$GITHUB_OUTPUT"
echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pre-build devcontainer
uses: devcontainers/[email protected]
continue-on-error: true
with:
push: always
skipContainerUserIdUpdate: false
imageName: ${{ steps.docker_image.outputs.image_repository }}
imageTag: ${{ steps.docker_image.outputs.image_tag }}
cacheFrom: |
${{ steps.docker_image.outputs.image_repository }}:${{ steps.docker_image.outputs.image_tag }}
${{ steps.docker_image.outputs.image_repository }}:${{ env.DEVCONTAINER_IMAGE_TAG_MAIN }}
style-checks:
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -142,6 +95,7 @@ jobs:
push: never
skipContainerUserIdUpdate: false
cacheFrom: ${{ needs.build-devcontainer.outputs.image_repository }}:${{ needs.build-devcontainer.outputs.image_tag }}

test-main:
runs-on: ubuntu-latest
needs:
Expand Down
4 changes: 1 addition & 3 deletions components/renku_data_services/session/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,7 @@ async def insert_launcher(
raise errors.UnauthorizedError(message="You do not have the required permissions for this operation.")

project_id = new_launcher.project_id
authorized = await self.project_authz.has_permission(
user, ResourceType.project, ULID.from_str(project_id), Scope.WRITE
)
authorized = await self.project_authz.has_permission(user, ResourceType.project, project_id, Scope.WRITE)
if not authorized:
raise errors.MissingResourceError(
message=f"Project with id '{project_id}' does not exist or you do not have access to it."
Expand Down
2 changes: 1 addition & 1 deletion components/renku_data_services/session/orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def dump(self) -> models.SessionLauncher:
"""Create a session launcher model from the SessionLauncherORM."""
return models.SessionLauncher(
id=self.id,
project_id=str(self.project_id),
project_id=self.project_id,
name=self.name,
created_by=self.created_by_id,
creation_date=self.creation_date,
Expand Down

0 comments on commit 545b3c6

Please sign in to comment.