Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre committed Dec 11, 2024
1 parent fbe97ce commit 7fd649c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions gen3workflow/routes/s3.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
from datetime import datetime, timezone
import hashlib
import json
import os
import urllib.parse

import boto3
from fastapi import APIRouter, HTTPException, Request
from fastapi.security import HTTPAuthorizationCredentials
from botocore.credentials import Credentials
import hmac
import httpx
from starlette.datastructures import Headers
from starlette.responses import Response
from starlette.status import HTTP_401_UNAUTHORIZED
Expand All @@ -19,9 +16,6 @@
from gen3workflow.config import config


# TODO Generate a presigned URL if the request is a GET request, see https://cdis.slack.com/archives/D01DMJWKVB5/p1733169741227879 - is that required?


router = APIRouter(prefix="/s3")


Expand Down
4 changes: 2 additions & 2 deletions tests/test_s3_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def s3_client(client):
session = boto3.session.Session()
return session.client(
service_name="s3",
aws_access_key_id="test-key-id",
aws_secret_access_key="test-key",
aws_access_key_id=config["S3_ENDPOINTS_AWS_ACCESS_KEY_ID"],
aws_secret_access_key=config["S3_ENDPOINTS_AWS_SECRET_ACCESS_KEY"],
endpoint_url=f"{client}/s3",
# no retries; only try the call once:
config=Config(retries={"max_attempts": 0}),
Expand Down

0 comments on commit 7fd649c

Please sign in to comment.