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

Add OperatorOpenShiftInfinispan anotation to setup Infinispan/datagrid on OpenShift #1468

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

jedla97
Copy link
Member

@jedla97 jedla97 commented Jan 13, 2025

Summary

This moving the logic from setting up the datagrid in testsuite to framework. In testsuite this was created in prestart phase of initialization of RestService which caused not cleaning up datagrid from openshift when the error occured while initialization of RestService.

This is mainly to use it with quarkus-qe/quarkus-test-suite#2269

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

@rsvoboda rsvoboda requested a review from michalvavrik January 13, 2025 08:54
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 left comments, but I don't think any of that is important. What matters is - https://github.com/quarkus-qe/quarkus-test-suite/pull/2269/files makes changes to test with motivation described in the description of this PR:

In testsuite this was created in prestart phase of initialization of RestService which caused not cleaning up datagrid from openshift when the error occured while initialization of RestService.

honestly I have no means to verify this, I didn't see past runs nor I saw one run with changes in here that would prove it one way or another. I checked the code here one by line and it seems fine to me. I suggest we just merge it when you deal with my comments and test results will confirm @jedla97 conclusions then.

@michalvavrik
Copy link
Member

@jedla97 and PR title is also not good, please try something more explanatory

This moving the logic from setting up the datagrid in testsuite to framework.
In testsuite this was created in prestart phase of initialization of RestService which caused
not cleaning up datagrid from openshift when the error occured while initialization of RestService.

Usage

```
@DataGridInfinispan(clusterSecret = CLUSTER_SECRET, clusterConfig = CLUSTER_CONFIG, clusterConfigMap = CLUSTER_CONFIGMAP, connectSecret = CONNECT_SECRET, tlsSecret = TLS_SECRET)
static DataGridInfinispanInstance dataGridInfinispan = new DataGridInfinispanInstance();
```

Where `DataGridInfinispan` parameters mentioned above are mandatory. For real usage examle you can look at https://github.com/quarkus-qe/quarkus-test-suite/tree/main/infinispan-client
@jedla97 jedla97 force-pushed the datagrid-infinispan branch from c4ebf1b to c847cfb Compare January 15, 2025 13:01
@jedla97 jedla97 changed the title Introducing datagrid instance Add OperatorOpenShiftInfinispan anotation to setup Infinispan/datagrid on OpenShift Jan 15, 2025
@jedla97
Copy link
Member Author

jedla97 commented Jan 15, 2025

I resolve comments. As I found that I need either change back the modified file or copy and modife them I choose later. With this it should be possible to run concurrently multiple infinispan cluster in one namespace.

Also added the info about this "service" to wiki https://github.com/quarkus-qe/quarkus-test-framework/wiki/6.-Openshift#infinispandatagrid

@jedla97 jedla97 requested a review from michalvavrik January 15, 2025 13:27
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.

Looks nice and useful, thanks!

@michalvavrik michalvavrik merged commit d991463 into quarkus-qe:main Jan 15, 2025
4 checks passed
@jedla97 jedla97 deleted the datagrid-infinispan branch January 15, 2025 14:39
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