Open dbwiddis opened 3 weeks ago
Hello ! I am new to open-source projects. I am working as junior dev in c#/React, also have 3 year experience with Java. Can I work on this issue? Can you give me some more info? Thanks ! :)
Hi @boooby19! Welcome! If you have some experience in Java, this should generally be straightforward code-wise, as I've outlined the needed changes in the first comment.
Creating your first GitHub PR is a bit more of a challenge. I messed up my first GitHub PR, so I hope you don't follow in my footsteps! :D I linked the steps in another issue but I'll recreate them here. They're also in the CONTRIBUTING document on the main repo page.
We use a triangle workflow (you can google that) but basically:
main
branch (git pull upstream main
)git checkout -b pick-a-name-here
)Signed-off-by: Your Name <yourname@example.com>
line to your commit message). If using git command line, use the -s
switch (lowercase). Most IDEs have a "signoff" button to click../gradlew spotlessApply
./gradlew javadoc
./gradlew test
(In this specific case, you're refactoring existing lines so there shouldn't be any new tests needed (item 6) nor javadocs (item 9) so those can be skipped.)
If all that works, push (git push
) to upload the code to your fork. The response from GitHub will give you a URL you can go to, OR you can go to the main repo and there's usually a pop up showing you recently updated a branch, OR you can go to your fork and look for the "contribute" button. Follow that dialogue to open a PR.
To respond to PR review comments, just edit your code, commit, and push (to your fork) and the PR will automatically get updated.
Hello ! I am also new to open-source projects. I would like to try to work on this issue. I am a student at the University and I have some experience with Java, Python, C# and React. Can I work on this issue?
Hello @dbwiddis , @KirrTap is my friend and I agree to re-assign this issue to @KirrTap , is it possible please? :) thanks !
@boooby19 @KirrTap there are several classes that include this pattern so you could both participate!
Hey @boooby19 and @KirrTap need any help on this? Let us know, we're happy to help.
The DEVELOPER_GUIDE should give you commands you can run to fork/clone, build, and test.
Yes, I found it
Is your feature request related to a problem?
Log4j includes parameter substitution which improves readability of log messages and has improved performance and stability over similar
String.format()
:This works well when we are only logging a message. However, we have many cases in our Transport Action exception handling where we use the same message in both the log and exception message (I know because I wrote them!). One such example: https://github.com/opensearch-project/flow-framework/blob/7a93d6c543738c7250313b0f66f3f794f42f5f1b/src/main/java/org/opensearch/flowframework/transport/ProvisionWorkflowTransportAction.java#L140-L144
Log4J's
ParameterizedMessage
class provides a way to construct the message the same way for both cases.What solution would you like?
Example commit inspiring this issue: https://github.com/opensearch-project/flow-framework/pull/898/commits/86ac8ea862ba59abcbdf036fd637159e751e3be4
What alternatives have you considered?
StringBuilder
implementation (less readable)String.format()
(performance, can throw exceptions, locale concerns)Do you have any additional context?
There are lots of these. As a good first issue, doing any one of them, or perhaps a class at a time, would be a welcome contribution!
In addition, since most of them follow the same pattern, a new method (per class) of
handleException(Exception e, String formatString, Object... args)
would probably be useful.