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

[#2150] Improvement : Arguments in incorrect order fixed with correct order #2297

Merged
merged 13 commits into from
Mar 1, 2024

Conversation

ajayl83
Copy link
Contributor

@ajayl83 ajayl83 commented Feb 21, 2024

What changes were proposed in this pull request?

  • Arguments in incorrect order fixed with correct order!

Why are the changes needed?

Does this PR introduce any user-facing change?

  • No

How was this patch tested?

  • ./gradlew test -PskipITs

@justinmclean
Copy link
Member

Hi it looks like you have more than one issue here can you revert the changes related to Distribution?

@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 22, 2024

Hi it looks like you have more than one issue here can you revert the changes related to Distribution?

oh yes , apologies i have reverted the commit

@justinmclean
Copy link
Member

Thanks for fixing that.

@jerryshao jerryshao requested a review from mchades February 26, 2024 12:55
@jerryshao
Copy link
Contributor

Would you please add a UT to cover this change? If you're not able to write a UT, @mchades can you please assist @ajayl83 to achieve this?

@jerryshao jerryshao added need backport Issues that need to backport to another branch branch-0.4 labels Feb 26, 2024
@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 26, 2024

Would you please add a UT to cover this change? If you're not able to write a UT, @mchades can you please assist @ajayl83 to achieve this?

@jerryshao thats not a problem , i will add the test for it

@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 26, 2024

@jerryshao i dont see existing test so can i add only for this method or all :)

@mchades
Copy link
Contributor

mchades commented Feb 26, 2024

It's better to add all tests for partitionDTO(IdentityPartitionDTO, RangePartitionDTO and ListPartitionDTO) in com.datastrato.gravitino.json.TestJsonUtils

@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 28, 2024

@jerryshao @mchades i added the necessary tests however while running the build against jdk17 i am coming across below error, can you kindly let me know how to fix this?
Task :rat FAILED
Files with unapproved licenses:

  • /Users/ajaylele/Downloads/gravitino/common/src/test/java/com/datastrato/gravitino/dto/util/DTOConvertersTest.java

@mchades
Copy link
Contributor

mchades commented Feb 28, 2024

You can push the codes, so that we can see detailed information from GitHub's CI.

@jerryshao
Copy link
Contributor

@jerryshao @mchades i added the necessary tests however while running the build against jdk17 i am coming across below error, can you kindly let me know how to fix this? Task :rat FAILED Files with unapproved licenses:

  • /Users/ajaylele/Downloads/gravitino/common/src/test/java/com/datastrato/gravitino/dto/util/DTOConvertersTest.java

Seems like the license header issue, did you add the license header to this DTOConvertersTest.java file?

@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 28, 2024

@jerryshao there is already license header, the other problem was i was using static import, i fixed it but still build fails with same problem :(

@justinmclean
Copy link
Member

If you push your changes we should be able to work out what the issue is.

@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 28, 2024

@jerryshao my bad i earlier wrote new UT for this, but have moved now to TestJsonUtils.java :) , its good now, will commit it

@jerryshao
Copy link
Contributor

@mchades would you please help to review.

@qqqttt123 qqqttt123 changed the title [#2150] Improvement : Arguments in incorrect order fixed with correct order! [#2150] Improvement : Arguments in incorrect order fixed with correct order Feb 28, 2024
@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 29, 2024

@mchades i am having weird issue with spotlessJava formatting , if i execute this all the imports are gone, can you kindly assist?

@ajayl83
Copy link
Contributor Author

ajayl83 commented Feb 29, 2024

@mchades its my IDE problem, do we have a settings file that can be imported for Intellij?

@mchades
Copy link
Contributor

mchades commented Mar 1, 2024

FYI:
settings -> Editor -> Code Style -> Java -> Imports

then modify:
Class count to use import with '*' to 99
Names count to use static import with '* to 99

@@ -0,0 +1,184 @@
/*
* Copyright 2023 Datastrato Pvt Ltd.
Copy link
Contributor

Choose a reason for hiding this comment

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

2023 -> 2024

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mchades done and thanks for settings!

Copy link
Contributor

@mchades mchades left a comment

Choose a reason for hiding this comment

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

LGTM

@mchades mchades merged commit 4dfd395 into apache:main Mar 1, 2024
12 checks passed
@mchades
Copy link
Contributor

mchades commented Mar 1, 2024

Merged, thanks for addressing the comments and improving the codebase!

github-actions bot pushed a commit that referenced this pull request Mar 1, 2024
… order (#2297)

What changes were proposed in this pull request?

- Arguments in incorrect order fixed with correct order!

Why are the changes needed?

- Fix: #2150 

Does this PR introduce any user-facing change?

- No

How was this patch tested?

- ./gradlew test -PskipITs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need backport Issues that need to backport to another branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] In DTOConverters.java arguments in incorect order?
4 participants