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

Do not depend on fabric8 extensions directly #1404

Closed
wants to merge 1 commit into from

Conversation

fedinskiy
Copy link
Contributor

@fedinskiy fedinskiy commented Nov 13, 2024

Summary

When we import fabric8 extensions directly (not via Quarkus boms), native compilation consumes too much memory.
The recommended solution is to use io.quarkus:openshift-client, but unfortunately, it doesn't contain KnativeClient which we use in io.quarkus.test.bootstrap.inject.OpenShiftClient, so we have to import quarkus-kubernetes-deployment, which provides knative classes.

Please check the relevant options

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Dependency update
  • Refactoring
  • Release (follows conventions described in the RELEASE.md)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)

Checklist:

  • Example scenarios has been updated / added
  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

When we import fabric8 extensions directly (not via Quarkus boms),
native compilation consumes too much memory.
The recommended solution is to use io.quarkus:openshift-client,
but unfortunately, it doesn't contain KnativeClient which we use in
io.quarkus.test.bootstrap.inject.OpenShiftClient, so we have to import
quarkus-kubernetes-deployment, which provides knative classes.
@fedinskiy
Copy link
Contributor Author

run tests

@fedinskiy fedinskiy changed the title Add fixes, so we can enable back tests in TS Do not depend on fabric8 extensions directly Nov 13, 2024
@fedinskiy fedinskiy marked this pull request as ready for review November 13, 2024 15:35
Copy link
Member

@michalvavrik michalvavrik left a comment

Choose a reason for hiding this comment

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

I don't really mind changes, but I don't understand how PR description can be true. You are changing Quarkus Qe Test OpenShift dependencies that are always in the test scope. Do you say that native imagine takes into consideration test scope dependencies?

@fedinskiy
Copy link
Contributor Author

@michalvavrik it seems so: quarkusio/quarkus#43360 (see comments).

Case in point: when I enable this test and run it without this change, it hangs, but when I do the same with this change, the test works. You can try it for yourself.

Maybe the dependencies somehow leak to production scope.

@michalvavrik
Copy link
Member

michalvavrik commented Nov 13, 2024

@michalvavrik it seems so: quarkusio/quarkus#43360 (see comments).

Dependencies changed in https://github.com/quarkus-qe/quarkus-test-suite/pull/2059/files were not in the test scope. Build steps shouldn't be executed for these test dependencies because in native mode because we build production application, so Quarkus build shouldn't be in a test mode. If they are there, it is a mistake.

Case in point: when I enable this test and run it without this change, it hangs, but when I do the same with this change, the test works. You can try it for yourself.

Maybe the dependencies somehow leak to production scope.

If you are not in a hurry, I'd like to test it later this week. Also I am preparing #1375 that I'd like to reduce changes in that PR and finish this week. That alone should completely remove these test scope dependencies from the native build.

I don't think changes in this PR are wrong, I just want to understand them better. @mjurc please feel free to review & approve.

@michalvavrik michalvavrik requested a review from mjurc November 13, 2024 16:32
@fedinskiy
Copy link
Contributor Author

fedinskiy commented Nov 13, 2024

If you are not in a hurry, I'd like to test it later this week

I definitely not in a hurry. If you consider #1375 to be in a good shape, I can test locally, whether it fixes CliProdModeNativeIT; if it does, we can drop this change and go forth with yours, since other tests are not affected

@michalvavrik
Copy link
Member

michalvavrik commented Nov 13, 2024

If you are not in a hurry, I'd like to test it later this week

I definitely not in a hurry. If you consider #1375 to be in a good shape, I can test locally, whether it fixes CliProdModeNativeIT; if it does, we can drop this change and go forth with yours, since other tests are not affected

I basically need to drop everything I did there for OpenShift (because identifying criteria when we can reuse native build in OCP is really hard) and re-check code. I'll prepare it and ask you for the review when it is ready. Thanks

@michalvavrik
Copy link
Member

michalvavrik commented Nov 13, 2024

@fedinskiy I had a look into CliProdModeNativeIT. #1375 has no effect over it because it doesn't deal with CLI tests. I tried to run this test in native mode and it succeeded without any Xmx adjustments:

20:02:03,045 INFO  [INFO] ------------------------------------------------------------------------
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 671.4 s -- in io.quarkus.ts.buildtimeanalytics.CliProdModeNativeIT

Could you try to enable it without any adjustments and see if GH CI pass, please?

I'll deal with #1375 separately as it cannot help for the CLI tests.

@michalvavrik
Copy link
Member

BTW I think it would be really interesting to report it as a bug to upstream if you can gather some numbers for upstream engineers.

@fedinskiy
Copy link
Contributor Author

@michalvavrik I run the tests a couple more times and it looks like the bug happens randomly and not related to openshift client. Therefore I will close the PR, thank you for the inquiry!

@fedinskiy fedinskiy closed this Nov 14, 2024
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