-
Notifications
You must be signed in to change notification settings - Fork 23
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
Batch custom scopes activation #123
Conversation
@luca-bassoricci Thanks for the PR. Maybe we can implement some of the changes in JBeret directly (change method visibilities), so we can use them here directly without requiring reflection. I had to do some of that work when we first wrote the extension. I'm sure @chengfang will help. If this is a major blocker for you, I'm fine if we move with the reflection based approach while we do the work in JBeret, but we do need tests :) Thanks! |
@luca-bassoricci please file JBeret JIRA issues for changes needed from JBeret, and we'll evaluate if it's suitable to include it. |
I'm not in rush to resolve this issue (we're currently using job and step contexts to move data around job) but I'm doing this in my spare time, so in this period my time is limited.
|
JIRA issue: https://issues.redhat.com/browse/JBERET-561 |
@luca-bassoricci @radcortez all 3 ScopedContextImpl classes have a static |
After reading more about this PR, I'd like to suggest something slightly different: Can Is the only purpose of accessing Will the above work? |
As my personal flavor I prefer to access private
Yep, for now the solely usage is that. |
Okay, based on the above discussion, here is my plan for jberet-side changes:
|
For me is fine. |
jberet/jsr352#232 is the jberet PR. Please review and let me know if anything else is needed. Note that a single Also note that the latest quarkus |
I've seen your PR and LGTM, but I have also seen |
@chengfang |
Any progress here? I stumbled over the same issue with JobScoped beans. |
Unsure. This PR has been stale for some time. @luca-bassoricci do you intend to keep working on this? Thanks! |
I'll be happy to work on it but on my (short) spare time because I am a bit busy at work, sorry. |
Sure. |
I'll check this. |
6a03497
to
6c5eb95
Compare
I have aligned with latest extension codebase and JBeret 2.2.0-SNAPSHOT (current main) where chengfang PR will be merged later |
One technique that I use is to add a step into the ci builder to clone and build locally the snapshot dependency until we have a stable release. |
That's fine. |
6c5eb95
to
3e924f0
Compare
@radcortez I'm currently use the main branch of Jberet to build locally, but what about using chengfang:scope-impl-public-JBERET-561 instead? This should avoid @liweinan to merge the PR until we decide to remove the draft to this PR. |
.github/workflows/build.yml
Outdated
- uses: actions/checkout@v4 | ||
name: checkout jberet snapshot | ||
with: | ||
repository: jberet/jsr352 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luca-bassoricci Maybe you can directly use cheng's fork repo here.
Yes, it's fine. |
@luca-bassoricci Cool! :-) I'll finish doing TCK tests today but I guess do the release need sometime, anyway I'll finish working on this before next weekend(most probably before next Monday). In addition, just to confirm that you don't need the PR for JBeret To be concise: If Quarkus side has no specific requirement, and if you can just use the jberet/jsr352#432 (comment), I'll do a release |
Confirmed
IDK if Quarkus has specific requirements, maybe @radcortez can answer. |
@luca-bassoricci Thanks for the confirmation! Okay I'll do the |
@luca-bassoricci I have released |
26a0f6c
to
0f976d5
Compare
About tests: @radcortez WDYT? |
Sounds good. |
0f976d5
to
4a7a042
Compare
Tests added. |
@radcortez any comment? |
Yes, it is fine. Thank you. So, is this complete? Or are we still missing something? |
From my POV all seems to be fine; for me a big concern was about the tests but after JBeret's tests passed I'm more confident. |
btw JBeret |
4a7a042
to
4a6ce36
Compare
@@ -99,28 +110,37 @@ public class JBeretProcessor { | |||
private static final DotName JOB = DotName.createSimple(Job.class); | |||
|
|||
@BuildStep | |||
public void registerExtension(BuildProducer<FeatureBuildItem> feature, BuildProducer<CapabilityBuildItem> capability) { | |||
public void registerExtension(BuildProducer<FeatureBuildItem> feature, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that in this class, there are a bunch of changes that are only code style changes and not related to the actual feature. Any chance we can revert these and keep only the relevant changes?
4a6ce36
to
e97e5e6
Compare
Added job/step/partition scope management Add IT tests copied from https://github.com/jberet/jsr352/tree/main/test-apps/cdiScopes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the work. Really appreciate it :)
Added job/step/partition scope management
I've added Quarkus specific implementation for batch scopes in runtime module and registered them in
JBeretProcessor
.I marked PR as draft mainly because: