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

Fix flaky mongo devservices on windows #26590

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Fix flaky mongo devservices on windows #26590

merged 1 commit into from
Jul 19, 2022

Conversation

evanchooly
Copy link
Member

No description provided.

@evanchooly evanchooly requested a review from geoand July 6, 2022 17:09
@evanchooly
Copy link
Member Author

one of these days, i'll actually see these failures on a PR and catch them before main breaks. "but that is not this day!"

gsmet
gsmet previously requested changes Jul 6, 2022
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Can you elaborate on what's going on here?
Because all these tests were passing before? Why do they suddenly fail? Or did we miss something before?

@evanchooly
Copy link
Member Author

I fixed an issue to enable dev services on all named (and unnamed) mongodb client definitions. Seemed a simple enough fix but it's turned in a forest fire for no discernable reason.

@evanchooly
Copy link
Member Author

ok to merge then @gsmet? I'd really like these failures to stop but when the PRs keep getting all greens it creates an annoying cycle. :)

@gsmet
Copy link
Member

gsmet commented Jul 8, 2022

Frankly, I'm unhappy about it. You added a dev service feature and significantly reduced our code coverage on Windows for MongoDB in general. I don't see how that's acceptable?

We have dev services tests that are in a specific module. For instance: redis-devservices. That would allow you to test things without breaking everything.
But TBH, I haven't understood how your work would suddently make things fail everywhere. I would have expected them to have default connection that would enable dev services anyway if it was enabled.

And you could disable dev services for the modules where we don't want it enabled via configuration (i.e. for all the other MongoDB modules).
And that includes the change you made here: https://github.com/quarkusio/quarkus/pull/26011/files#diff-035b738235c0bd33125ae45363854ca4291ecb6ce4cbf7c8344490bc505d90f6 .

So I would say either you can get this sorted out in a reasonable timeline or I'm going to revert this set of patches until you are able to make things work without reducing our coverage and we could then merge the change again.

Let me know what you prefer. You would be less pressured with the latter but you might not like it.

@evanchooly
Copy link
Member Author

I'm closing in on what I think is the issue. But reproducing it locally has proven difficult and even CI runs have all been green for me. But I think I have it properly isolated now (and I'm moving the devservice check off to its own IT). We'll see how CI treats but it hasn't been very helpful to me with this so fingers crossed.

@n1hility
Copy link
Member

n1hility commented Jul 8, 2022

I share the desire of a deterministic, reproducible, and reliable CI. IMO Disabling tests and working the bug and later reenabling is a good strategy keep that up. In some cases I agree it's better just to revert the change, in particular if we know the change is causing side effects in other areas, or if we are close to tagging and the chances of having a solution in time are low. On the other hand, If it's a contained problem being worked on by a component/extension lead, I think it's totally reasonable to do the former approach, particularly if they are committed to resolving the underlying problem. They are most likely the best equipped to assess whether the problem is real or whether it's just flaky tests triggered by a timing change. I really think we should defer to Justin on how to best proceed here in recovering the situation. Correct me if I am wrong Justin, but I suspect you would gladly revert the change if you determined it was about to be shipped and break a bunch of people?

@quarkus-bot quarkus-bot bot added the area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure label Jul 8, 2022
@evanchooly evanchooly changed the title Disable more tests on Windows Fix flaky mongo devservices on windows Jul 8, 2022
@quarkus-bot

This comment has been minimized.

@gsmet
Copy link
Member

gsmet commented Jul 11, 2022

@n1hility well, my problem is that it was never mentioned that it was a temporary fix. And I'm not sure it was designed to be.

I have no problem to merge a temporary fix to fix CI. But it has to be clear. I won't accept the MongoDB tests to be fully disabled on Windows forever for the sake of adding a dev service feature.

But I think I will have a look at it myself because it has been too long already.

@gsmet
Copy link
Member

gsmet commented Jul 11, 2022

I'm having a look at this one.

@gsmet
Copy link
Member

gsmet commented Jul 11, 2022

Let's wait for CI to pass but I think it should be as simple as: #26649 so that we don't start a Docker container for the default connection in the newly added tests (given the default connection is not defined, one is created when dev services are enabled).
I'll report back here once CI has passed in the other PR.

@gsmet
Copy link
Member

gsmet commented Jul 11, 2022

#26649 has been merged.

Let's close this one.

@gsmet gsmet closed this Jul 11, 2022
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Jul 11, 2022
@evanchooly
Copy link
Member Author

sigh i had this.

@evanchooly evanchooly reopened this Jul 11, 2022
@quarkus-bot quarkus-bot bot removed the triage/invalid This doesn't seem right label Jul 11, 2022
@gsmet
Copy link
Member

gsmet commented Jul 11, 2022

Not sure what exactly you had but your PR introduced a lot more failures so it was nowhere near ready.
My PR fixed CI without changing anything to what you originally did. Which is what we originally wanted.

Now, if you want to introduce a new module to test MongoDB dev services specifically as I originally suggested, it's very welcome but please:

  • don't adjust other modules as I don't think it's needed now - or let's discuss it before you do
  • I don't think you need to add this module to the native testing as you are testing dev mode and we don't care about native

@evanchooly
Copy link
Member Author

I have those tests reenabled with updated configurations where necessary. there was one odd failure in an unexpected place that i'm tracking (with fix like the one you pushed, ironically). I said i was working on. Please respect my effort and give me the time you offered. At a minimum, stop closing PRs without consulting with the requester.

@gsmet
Copy link
Member

gsmet commented Jul 11, 2022

CI is fixed so you have all the time you want.

@gsmet
Copy link
Member

gsmet commented Jul 11, 2022

And no, there was not "one odd failure": the initial problem was not fixed, and there were a ton of other failures. See the report here: #26590 (comment) .

So yes, I decided to get a quick fix in (it was just one line) given the initial issue was simple to fix and it was failing for ages now.

What you were working on here was unclear so sorry if I missed your intention and you wanted to go further than simply fixing the original issue.

@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@evanchooly
Copy link
Member Author

i finally have the devservices test isolated and excluded and fixed the mongodb tests that had been relying on the default connection getting picked up by the mongodb test resources infra.

@evanchooly evanchooly requested review from geoand and gsmet July 13, 2022 14:06
@evanchooly evanchooly dismissed gsmet’s stale review July 13, 2022 14:38

code updated

@evanchooly
Copy link
Member Author

@geoand @gsmet is this good to merge? i think this is finally the full, correct fix but i'd rather not have the build break on me again.

@geoand
Copy link
Contributor

geoand commented Jul 14, 2022

I'll let Guillaume decide

@evanchooly
Copy link
Member Author

final call ... ?

@evanchooly evanchooly merged commit d7ec3d6 into quarkusio:main Jul 19, 2022
@quarkus-bot quarkus-bot bot added this to the 2.12 - main milestone Jul 19, 2022
@evanchooly evanchooly deleted the mongoNoWindows branch July 19, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/mongodb
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants