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

[improve][bugfix]: fix AlertTemplateUtilTest test exception and update code style #1969

Merged
merged 11 commits into from
May 13, 2024

Conversation

yuluo-yx
Copy link
Contributor

@yuluo-yx yuluo-yx commented May 12, 2024

What's changed?

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

@yuluo-yx yuluo-yx changed the title [improve]: fix AlertTemplateUtilTest test exception and update code s… [improve][bugfix]: fix AlertTemplateUtilTest test exception and update code style May 12, 2024
@tomsun28
Copy link
Contributor

hi why remove the idea icon.png

@yuluo-yx
Copy link
Contributor Author

hi why remove the idea icon.png

sorry, my bad. I will restore it.

@crossoverJie
Copy link
Member

crossoverJie commented May 12, 2024

There are some errors about checkstyle.

Please execute this command before submission:

mvn checkstyle:checkstyle 

Maybe you can refer this link: #1818 (comment)

@yuluo-yx
Copy link
Contributor Author

There are some errors about checkstyle.

Please execute this command before submission:

mvn checkstyle:checkstyle 

Maybe you can refer this link: #1818 (comment)

tks, I'm dealing with this very difficult problem.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.314 s
[INFO] Finished at: 2024-05-12T23:33:54+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hertzbeat-warehouse: Could not resolve dependencies for project org.apache.hertzbeat:hertzbeat-warehouse:jar:2.0-SNAPSHOT: Could not find artifact org.apache.hertzbeat:hertzbeat-common:jar:2.0-SNAPSHOT -> [Help 1]
[ERROR]

I'm having this problem, and I'm guessing it's a problem with my local environment 🤔

@crossoverJie
Copy link
Member

I'm having this problem, and I'm guessing it's a problem with my local environment

Maybe you can run this cmd first:

mvn clean install

@yuluo-yx
Copy link
Contributor Author

yuluo-yx commented May 12, 2024

hi, @crossoverJie Does the community have an idea style file for this, something like this:

https://github.com/spring-cloud/spring-cloud-build/tree/main/spring-cloud-build-tools/src/main/resources/intellij

cc @tomsun28

@yuluo-yx
Copy link
Contributor Author

yuluo-yx commented May 12, 2024

I'm having this problem, and I'm guessing it's a problem with my local environment

Maybe you can run this cmd first:

mvn clean install

yep, I executed it.

$ maven clean install -Dmaven.test.skip=true

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project hertzbeat-common: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' -> [Help 1]

and I find :https://stackoverflow.com/questions/77171270/compilation-error-after-upgrading-to-jdk-21-nosuchfielderror-jcimport-does-n but it doesn't seem to work for me.

@crossoverJie
Copy link
Member

crossoverJie commented May 12, 2024

and I find :stackoverflow.com/questions/77171270/compilation-error-after-upgrading-to-jdk-21-nosuchfielderror-jcimport-does-n but it doesn't seem to work for me.

The current version is not compatible with JDK 21, please use JDK 17 for compilation.

https://github.com/apache/hertzbeat/blob/master/CONTRIBUTING.md#backend-start

@yuluo-yx
Copy link
Contributor Author

and I find :stackoverflow.com/questions/77171270/compilation-error-after-upgrading-to-jdk-21-nosuchfielderror-jcimport-does-n but it doesn't seem to work for me.

The current version is not compatible with JDK 21, please use JDK 17 for compilation.

https://github.com/apache/hertzbeat/blob/master/CONTRIBUTING.md#backend-start

image

@yuluo-yx
Copy link
Contributor Author

Maybe we should beat magic with magic. Let me try clearing my cache.

@crossoverJie
Copy link
Member

image
Please confirm that the JDK version used by your Maven is JDK 17?

mvn -version

@yuluo-yx
Copy link
Contributor Author

image Please confirm that the JDK version used by your Maven is JDK 17?

mvn -version
$ mvn -version
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: D:\environment\Java\apache-maven-3.9.0
Java version: 17.0.1, vendor: Oracle Corporation, runtime: D:\environment\Java\JDK\JKD17
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

@crossoverJie
Copy link
Member

image
This is a bit strange; I cannot reproduce the issue with your code unless I use JDK 21.

@yuluo-yx
Copy link
Contributor Author

Thank you for your help, after I cleared the cache of idea, it works fine! 🫡@crossoverJie

@tomsun28 tomsun28 added the good first pull request Good for newcomers label May 13, 2024
@tomsun28 tomsun28 merged commit 39a587f into apache:master May 13, 2024
3 checks passed
@yuluo-yx yuluo-yx deleted the 0512-yuluo/improve-alerter-module branch May 13, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

3 participants