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

GUIDs generated by WireMock.NET differ between instances when deployed to Azure with multiple instances. #1096

Open
fenildesai opened this issue May 2, 2024 · 3 comments
Assignees
Labels

Comments

@fenildesai
Copy link

Describe the bug

When deploying an application using WireMock.NET to Azure with multiple instances, we've observed that the GUIDs generated by WireMock.NET differ between instances. This inconsistency leads to requests not matching the expected stub mappings, resulting in unexpected behavior such as 404 errors.

Expected behavior:

We expect WireMock.NET to generate consistent GUIDs for stub mappings across all instances, ensuring that requests are properly matched to the appropriate stub responses regardless of the instance handling the request.

Test to reproduce

  1. Deploy an application using WireMock.NET to Azure with multiple instances.
  2. Send requests to the deployed application.
  3. Observe that the GUIDs generated by WireMock.NET differ between instances.
  4. Notice that requests do not match the expected stub mappings, leading to 404 errors.

Other related info

We have session affinity enabled in the Azure App Service configuration to ensure that requests from the same client are consistently routed to the same instance.

@fenildesai fenildesai added the bug label May 2, 2024
@StefH StefH self-assigned this May 3, 2024
@StefH
Copy link
Collaborator

StefH commented May 3, 2024

Note that each WireMock.Net instance saves the mappings in memory from that instance. And if a GUID is generated by WireMock.Net, it's just a random GUID.

However I'm not sure I understand why you have issues with GUIDs? Do you run WireMock.Net in proxy mode or in normal mode?

Because when adding stub-mappings via C# code, mapping file or admin interface, you can provide a guid. If the guid is not provided, a random guid is used.

@StefH
Copy link
Collaborator

StefH commented May 9, 2024

@fenildesai
Is my explanation clear?

@StefH
Copy link
Collaborator

StefH commented May 22, 2024

@fenildesai
Is my explanation clear?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants