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: migrate to new kafka spring cloud stream #20433

Closed

Conversation

codedsun
Copy link

@codedsun codedsun commented Nov 22, 2022

fix: #20297 migrate to new kafka spring cloud stream

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@codedsun
Copy link
Author

codedsun commented Nov 23, 2022

@mshima - how do i test this failing changes on my local.? Also when I am this branch - i cant run jhipster

@mshima
Copy link
Member

mshima commented Nov 23, 2022

@codedsun you need to remove the files from

{
path: `${SERVER_MAIN_SRC_DIR}package/`,
renameTo: moveToJavaPackageSrcDir,
templates: ['config/KafkaSseConsumer.java', 'config/KafkaSseProducer.java'],
},
],

@codedsun codedsun force-pushed the suneet/kafka_fix branch 2 times, most recently from 462b697 to 3aa1351 Compare November 23, 2022 14:30
@codedsun
Copy link
Author

Done @mshima .

@codedsun
Copy link
Author

@mshima dont know why these workflows are failing, but what steps u mentioned in the sample project were working fine. Can you help me next what should I do?

@codedsun
Copy link
Author

codedsun commented Nov 28, 2022

@mshima Thanks, I will push my changes by thursday.

@codedsun
Copy link
Author

codedsun commented Dec 1, 2022

@mshima done the changes, please check the jhipster version is correct or not in cleanup.mjs

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

You need to run

UPDATE_SNAPSHOT=all npx mocha generators/kafka

CI is failling:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project sample-mongo-kafka: Compilation failure: Compilation failure: 
[851](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:852)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[18,46] cannot find symbol
[852](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:853)
Error:    symbol:   variable MimeTypeUtils
[853](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:854)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[854](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:855)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[28,13] cannot find symbol
[855](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:856)
Error:    symbol:   variable log
[856](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:857)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[857](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:858)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[29,13] cannot find symbol
[858](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:859)
Error:    symbol:   variable emitters
[859](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:860)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[860](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:861)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[33,27] cannot find symbol
[861](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:862)
Error:    symbol:   class SseEmitter
[862](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:863)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[863](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:864)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[35,73] cannot find symbol
[864](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:865)
Error:    symbol:   variable MediaType
[865](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:866)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[866](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:867)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[35,38] cannot find symbol
[867](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:868)
Error:    symbol:   method event()
[868](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:869)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[869](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:870)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[36,30] cannot find symbol
[870](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:871)
Error:    symbol:   class IOException
[871](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:872)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[872](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:873)
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/KafkaConfiguration.java:[37,25] cannot find symbol
[873](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:874)
Error:    symbol:   variable log
[874](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:875)
Error:    location: class tech.jhipster.sample.config.KafkaConfiguration
[875](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:876)
Error:  -> [Help 1]
[876](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:877)
Error:  
[877](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:878)
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
[878](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:879)
Error:  Re-run Maven using the -X switch to enable full debug logging.
[879](https://github.com/jhipster/generator-jhipster/actions/runs/3597751065/jobs/6059838044#step:20:880)
Error:

@@ -40,4 +40,8 @@ export default function cleanupKafkaFilesTask({ application }) {
if (this.isJhipsterVersionLessThan('7.7.1')) {
this.removeFile(`${application.javaPackageSrcDir}config/KafkaProperties.java`);
}
if (this.isJhipsterVersionLessThan('7.9.3')) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (this.isJhipsterVersionLessThan('7.9.3')) {
if (this.isJhipsterVersionLessThan('7.10.0')) {

@codedsun
Copy link
Author

codedsun commented Dec 2, 2022

@mshima done the changes.

@codedsun
Copy link
Author

codedsun commented Dec 3, 2022

@mshima - i see some test are not able to found the files, though they were working fine for my created project and the steps u provided to test. Can you help me for the CI build to pass?

@codedsun
Copy link
Author

codedsun commented Dec 3, 2022

@mshima please run the tests..after ur changes 1 test was failing I fixed that. Thanks

@codedsun
Copy link
Author

codedsun commented Dec 4, 2022

Hey @mshima , am I doing something wrong in code? Please guide me from here.

@mshima
Copy link
Member

mshima commented Dec 4, 2022

Is missing a conversation somewhere.

expected: "value-produce"
[1541](https://github.com/jhipster/generator-jhipster/actions/runs/3614071130/jobs/6090381311#step:20:1542)
 but was: [118, 97, 108, 117, 101, 45, 112, 114, 111, 100, 117, 99, 101]

The got value is the char[] value of the expected

@DanielFran DanielFran deleted the branch jhipster:spring-boot-3.0-m4 December 9, 2022 20:50
@DanielFran DanielFran closed this Dec 9, 2022
@mshima
Copy link
Member

mshima commented Dec 10, 2022

@codedsun please reopen the PR against main.

@codedsun
Copy link
Author

@mshima this was closed, i though this got resolved by someone else, can i still work ?

@mshima
Copy link
Member

mshima commented Dec 12, 2022

@codedsun was closed because the target branch was merged to main.
Not sure why the target branch wasn't updated, I wasn't able to change manually either.
Go ahead and recreate the PR against main.

@mshima mshima mentioned this pull request Dec 13, 2022
6 tasks
@DanielFran
Copy link
Member

@codedsun Can you create a new PR based on main branch?

@DanielFran DanielFran added this to the 8.0.0-beta.1 milestone Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants