Skip to content

Connection uri does not allow foward slash #14569

@ConstantinoSchillebeeckx

Description

Apache Airflow version: 2.0.1

What happened:

I've configured remote logging to AWS S3 and have configured AIRFLOW__LOGGING__REMOTE_LOG_CONN_ID through an ENV like:

AIRFLOW_CONN_S3_LOG_CONN_ID=s3://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@${AWS_S3_BUCKET_NAME}

When AWS_SECRET_ACCESS_KEY has a forward slash in it, the class constructor fails.

How to reproduce it:

from airflow.models.connection import Connection
uri = "s3://some_aws_access_key:secret_key123/321asdf@bucket_name"
c = Connection(uri=uri)

Results in

ValueError: invalid literal for int() with base 10: 'secret_key123'

Anything else we need to know:

Looks like this may have been previously identified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions