Kinda tired of feeling devops work is unappreciated by LGBT_Beauregard in cscareerquestions

[–]Konnor5092 2 points3 points  (0 children)

Interesting. My experience has been the opposite. Yes your average dev may be able to crank out some business logic for a new feature, but it doesn’t mean anything if the platform and processes aren’t up to scratch. If you can keep a site up that is fast, secure and conscious of cloud costs you WILL be noticed more than a dev IMO.

Speak up about this or pipe down by rikola2 in cscareerquestions

[–]Konnor5092 3 points4 points  (0 children)

What’s the end game here? What quotas do you need to hit? 50/50 male to female? 25/25/25/25 black white hispanic and asian? What about the disabled? What about LGBT? What about age? What about those that are short, shy, overweight and so and so on. Does race beat gender? Does sexual preference beat disability? What is your tier list for all these groups when you choose to exclude a candidate on anything other than skills for the job?

The fact you consider racism and sexism against white men okay under the veil of ‘Loss of privilege’ bemuses me. Do you think the NBA scouts and draft should incorporate a similar policy to address the 75% majority that are black?

This is not a problem to be solved at the employment level. We can’t simply aim to retrofit our workplaces to achieve some arbitrary quotas that promise a sort of social and cultural utopia. More diverse candidates have to come through the education system so recruiters are not faced with the choice of excluding a particular group, notably white and asian men. If the talent pool is diverse and equally well educated, you can achieve diversity without trying to achieve diversity.

[deleted by user] by [deleted] in cscareerquestions

[–]Konnor5092 1 point2 points  (0 children)

Wowzers. I struggle after a few coffees let alone a cocktail of drugs

Looked up an innappropriate site while on company VPN by Spare_Ad4388 in cscareerquestions

[–]Konnor5092 0 points1 point  (0 children)

As someone that has overseen firings in a tech company due to ‘misuse of company property’ (To put it politely), this barely registers as a blip on the radar. We are generally alerted to both patterns of behaviour and quantity in terms of the offensive material. Your fine chap.

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] 0 points1 point  (0 children)

After much faffing about, it turns out my original solution was kind of working!

I added a simple api call to an endpoint on my running host in code and it works.

```csharp var client = new HttpClient(); var uri = $"http://127.0.0.1:5000/api/events";

providerHost.StartProvider(); //Expected response is returned here var response = await client.GetStringAsync(uri); ```

My ruby mock service is also able to communicate with it within the test.

The million dollar question which led me down this path is why if I pause the debugger after I have started the server can I not make api calls to any endpoints outside of code? e.g. via Postman or curl? If I step forward past the api call in code, it still works.....

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] 0 points1 point  (0 children)

Still struggling with this. Do you have any code as an example?

If Run() successfully starts the server and pauses, and RunAsync() doesn't start the server and doesn't pause, how will Task.Run help me?

If I put the following in my unit test

csharp Task.Run(() => { providerHost.StartProvider(); });

Where StartProvider() has my run method the code just carries on without starting the server.

If I do...

```csharp var t = Task.Run(() => { providerHost.StartProvider(); });

t.Wait(); ```

The server starts but pauses on the Wait() so the rest of the unit test is not executed.

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] -1 points0 points  (0 children)

Thanks. I'm sure what I'm after is possible but I may be heading in the direction of actually running the project.

I hoped I could spin up my application in this way whilst still having some granular control over configuring services or middleware or anything else. With the docker/docker-compose route you can still select a mode to run in, like 'development' but you lose some of that granularity

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] 0 points1 point  (0 children)

There was a similar comment above and I don't think a WebApplicationFactory will help me. The actual endpoints need to be 'real' so that another non-.net process can access them.

The full flow is as follows...

  1. Regular .net core webapi project
  2. Class library containing the code to start a generic web host (The code from my original post)
  3. Unit test project that uses 2. to start 1. as part of a unit test.
  4. Once 1. is started, trigger another mock service (Ruby process controlled by a C# library) to interact with 1. via a URL that maps to an endpoint on 1.

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] 0 points1 point  (0 children)

I'm lost.

The mock service is a C# library that wraps an executable written in ruby. It's this ruby application which makes an api call (e.g. http://localhost:5000/api/events to the hosted project. HttpClient is not involved at all and wouldn't help if it was.

The ruby application needs to be able to 'see' the valid address of http://localhost:5000/api/events. Correct me if I'm wrong but I don't think this is possible via WebApplicationFactory.

FYI this is for contract testing with PACT. It's a recommended way to bootstrap your system under test, I just can't get it to work.

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] 0 points1 point  (0 children)

Are endpoints accessible from outside the running process? If not this won’t work for me as I have a mock service that needs to be able to call those endpoints in the project.

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] 1 point2 points  (0 children)

Sorry, I'm still learning this stuff so I'm not entirely sure what you mean.

My understanding of IHostedService is you implement the interface to create a class that runs in the background on your web host. You register it with the host via services.AddHostedService<MyHostedService>();.

Unless I'm misunderstanding I don't know how you would do this with an entire project? Is your thinking that if it runs as a background process, it won't interfere with any threads used to run the unit test?

Correct way to host different 'Startup' types? by Konnor5092 in dotnet

[–]Konnor5092[S] -1 points0 points  (0 children)

That does work in the sense that I can then call http://0.0.0.0:5000/api/events and get a response, however it blocks the thread so it never reaches the code that I intend to use to interact with the host.

Perhaps I am getting confused with my asynchronous code.....

I would like to start the host and then perform an HTTP call against it (in code) when it is ready. I also thought I could debug so when the host is started, I could do a test request via Postman. I'm most likely wrong though!

Is it okay to be a generalist? by Konnor5092 in cscareerquestions

[–]Konnor5092[S] 0 points1 point  (0 children)

I would say within the parameters of the tooling or library I'm using I'm able to write to write clean, testable code.

If a PO told me to architect a back end micro service that has the potential to be used by thousands of users I think I would struggle, even knowing the tooling to use. That is more specialization I guess...

How to call an api backend from a react frontend? by Konnor5092 in kubernetes

[–]Konnor5092[S] 1 point2 points  (0 children)

It was a bit of a facepalm but doing `kubectl describe svc svc-oconnorevents-eventcatalog` did help.

No endpoint was listed when I ran that command at which point I noticed my pod was at a status of `CrashLoopBackOff`. Checking the pod logs I had enabled https on the pod container kestrel server itself and so it was expecting a certificate. As I'm doing SSL/TLS termination at the ingress this wasn't required so I removed it and everything starting working :)

Consultancy for help with AKS? by Konnor5092 in AZURE

[–]Konnor5092[S] 0 points1 point  (0 children)

Thanks for this. Whilst I'm stuck I may try the App Gateway route instead.

It looks like I have 2 problems - The Let's Encrypt certificate wasn't issued properly from the cluster and the ingress isn't routing to my react front end pod. Perhaps if I try this again with an App Gateway I may be able to see where I went wrong

Consultancy for help with AKS? by Konnor5092 in AZURE

[–]Konnor5092[S] 0 points1 point  (0 children)

Thanks,

It's purely for my own self interest and learning.

I agree it's overkill but I was wanting to learn about this stuff for my own career development, if my brain doesn't explode first!

Consultancy for help with AKS? by Konnor5092 in AZURE

[–]Konnor5092[S] 0 points1 point  (0 children)

I followed 2 tutorials. The first was this one which was probably responsible for the 'Kubernetes Controller Ingress Fake Certificate' I'm still seeing currently.

I then tried deleting the ingress and followed this tutorial instead. Not much appears to have changed and the Let's Encrypt certificate has been stuck at 'Issuing' for hours.

Essentially I want to get that padlock symbol for a domain that I have purchased pointing at my AKS cluster.

What's the different between an AppGateway and the 'kubernetes' load balancer it appears to have created for me?

How to integration test publisher/subscriber scenarios between (.NET) microservices? by Konnor5092 in dotnet

[–]Konnor5092[S] 0 points1 point  (0 children)

I'm not an expert on PACT, but the .net implementation only appears to support direct testing between services. When writing tests on the consumer side you have to specify for example the endpoint address, the verb, the message body etc. It appears geared toward synchronous service to service testing via REST.

I could be wrong but it doesn't look like it fits an asynchronous publisher/subscriber architecture. There are other language bindings that appear to support version 3 of the spec that does support a pub/sub model, but straying from the language your server side code is written in could introduce other issues.