Skip to content

Conversation

@LeComptoirDesPharmacies
Copy link
Contributor

Can now overwrite request auth in request

Actually in current python codegen, authentification is managed in api configuration.
But when you instantiate a new configuration, a new thread poll is create with it, so each time you need to change your authentification key, you will create a thread poll which will pull down the performance of the application.

We could have a global configuration and change the authentification but it will not be thread safe.

The solution was already developed in python-legacy but it has not be migrated. ( In this PR #6569 )

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @arun-nalla (2019/11) @spacether (2019/11) ❤️

Thanks for the review

Can now overwrite request auth by request

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
…sent

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
@spacether spacether added this to the 5.4.0 milestone Jan 13, 2022
@spacether
Copy link
Contributor

Ce-running circleci tests

@LeComptoirDesPharmacies
Copy link
Contributor Author

Hi @spacether,

Is there something special to do to re-launch the circle ci pipeline ?
I tried to do it through the dashboard but it seems I do not have access rights (forbidden sign when hover the actions) :

image

Yours faithfully,
LCDP

Add None when _content_type is not set

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
@wing328 wing328 modified the milestones: 5.4.0, 6.0.0 Jan 31, 2022
Add _request_auth in sample

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
@LeComptoirDesPharmacies
Copy link
Contributor Author

Hi,

I have this error in the CI, I don't understand why.

Mar 01, 2022 10:26:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
Mar 01, 2022 10:26:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://repo.maven.apache.org:443
Mar 01, 2022 10:26:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
Mar 01, 2022 10:26:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://repo.maven.apache.org:443
Mar 01, 2022 10:26:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
Mar 01, 2022 10:26:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://repo.maven.apache.org:443
[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:2.5.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:2.5.5: Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:2.5.5 from/to central (https://repo.maven.apache.org/maven2): Connection reset -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Could you please help me out @spacether ?

@LeComptoirDesPharmacies LeComptoirDesPharmacies changed the title Migrate enable per request authentification in new python codegen [PYTHON] Migrate enable per request authentification in new python codegen Mar 1, 2022
@LeComptoirDesPharmacies LeComptoirDesPharmacies changed the title [PYTHON] Migrate enable per request authentification in new python codegen [Python] - Migrate enable per request authentification in new python codegen Mar 1, 2022
Request auth is now a list of dict

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
@spacether
Copy link
Contributor

Hi @LeComptoirDesPharmacies sorry for my delay in reviewing this here. Your PR generally looks good but one CI test is failing (test_test_endpoint_enums_length_one). Can you fix it?

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
@LeComptoirDesPharmacies
Copy link
Contributor Author

Hi,
Its all good now @spacether

Copy link
Contributor

@spacether spacether left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR. This looks good!

@spacether spacether merged commit 87a5182 into OpenAPITools:master Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants