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

Don't modify the client gateway url struct in client methods #28

Merged
merged 1 commit into from
May 28, 2024

Conversation

welteki
Copy link
Member

@welteki welteki commented May 27, 2024

Description

The Client is not safe for concurrent use as each method modifies the gateway URL path.
This was fixed by creating a new URL struct from the base URL before manipulating the URL.

Motivation and Context

  • I have raised an issue to propose this change (required)
  • My issue has received approval from the maintainers or lead with the design/approved label

Make the client safe for concurrent use.

This issues was discovered while working on a new feature to invoke functions using the client.

How Has This Been Tested?

All unit tests passed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Approved

@alexellis alexellis merged commit faf4f56 into openfaas:master May 28, 2024
1 check passed
@welteki welteki deleted the fix-gateway-url-overwrite branch May 28, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants