Hi Team, We are working on Pact Kafka With Message...
# pact-net
d
Hi Team, We are working on Pact Kafka With Message Interactions. We have deployed Consumer and Provider test cases to GitLab CICD pipeline. Consumer test cases are executed successfully. But facing an issue with Provider test cases. Provider test cases are executing successfully in our local Visual Studio and the verification results are getting published to Pactflow with 'Success' status. We are getting the below error on running the Provider test cases in GitLab: System.PlatformNotSupportedException : The information requested is unavailable on the current platform. Can anyone help us in this regard.
m
So the obvious question is what platform is it running on? Do you know which component is throwing that error?
d
Below is the stack trace: System.PlatformNotSupportedException : The information requested is unavailable on the current platform. Stack Trace: at System.Net.NetworkInformation.StringParsingHelpers.ParseActiveTcpListenersFromFiles(String tcp4ConnectionsFile, String tcp6ConnectionsFile) at System.Net.NetworkInformation.LinuxIPGlobalProperties.GetActiveTcpListeners() at PactNet.Verifier.Messaging.MessagingProvider.FindUnusedPort() at PactNet.Verifier.Messaging.MessagingProvider.Start(JsonSerializerSettings settings) at PactNet.Verifier.PactVerifier.MessagingProvider(String providerName, JsonSerializerSettings settings)
y
what platform is it running on
d
We are trying to run it on GitLab and we have used .Net framework.
y
what operating system and processor
you’ve already told us the other bit
d
sorry. Its Windows 10 and Processor is 11th Gen Intel(R) Core
Hi Team, Can anyone help us with the above issue. We are really stuck here.
m
see howtoask. Ideally, a build (e.g. using GitHub actions) that demonstrates the problem would help. The Pact .NET project currently runs on all common OS/arch combinations, so something must be different about your setup. You need to help us understand this difference
s
Please see this page for some tips on how to ask for help to get the best response from the community https://docs.pact.io/help/how_to_ask_for_help
y
has it ever worked? have you spoken to whoever administers your gitlab instance. i assume gitlab isn’t running on the windows machine, as it’s a linux program
can you provide a basic repro of your test, or more logging output. If you can provide a repro codebase, and more details of the gitlab setup, on-prem/hosted, which runners/executors you are attempting to run the provider test on. You mentioned • locally on windows 10 - x86_64 ◦ consumer tests pass ◦ provider tests pass • on a gitlab executor ◦ consumer tests pass ◦ provider tests fail By sharing a repro it helps us understand the setup of your test and the versions of libraries you are using. without this it is very difficult to help, we aren’t a general support helpdesk so asking a good question will help incredibly.
Provider test cases are executing successfully in our local Visual Studio and the verification results are getting published to Pactflow with ‘Success’ status.
I assume this was just for testing purposes (publishing of verification results) as it isn’t recommend to do that from a local machine
d
Hi Team, We understand you would need the code to understand the issue. But there are a lot of things in that code that can't be elaborated/explained via chat. Also, any explanation on anything would require a lot of to and fro. Is there a way we can have a session via smart bear support team for this?
m
Best to reach out to your account manager directly to organise that.
Might I suggest starting with a super basic example code that doesn't have any commercial/sensitive info in it? That will be helpful no matter which support path you take. Once you can reproduce the issue there it will be easier to track down the root cause. Remember this workspace is monitored by non SmartBear community members also, and Pact .NET is a community maintained project.
y
I’ve taken the .NET PactFlow examples which aren’t message based ( REST based ) and got the basic workflow without webhooks working in SaaS GitLab https://gitlab.com/YOU54F/example-consumer-dotnet https://gitlab.com/YOU54F/example-provider-dotnet Feel free to use this as a basis to create a repro or see if you can get it working in your environment. It isn’t clear yet, as to your setup so some assumptions have been made 1. SaaS GitLab 2. SaaS GitLab provided runners a. Tested with Linux x86_64 runner 3. Messaging vs Rest isn’t the issue, as you have just mentioned provided test cases fail a. So we are using our tried and tested REST examples If any of these assumptions are incorrect, please clarify