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

PR 2 for v1.15.0 (Changes Related to New Connector Development, Upstream Starter Project Changes, Etc.) #61

Merged
merged 12 commits into from
Sep 28, 2023

Conversation

alexjhawk
Copy link
Collaborator

This is PR 2 in a series of pull requests to bring in changes for v1.15.0. These are mostly related to the development of a new connector, staged changes that were previously untested, and other changes or enhancements, as described.

@alexjhawk alexjhawk self-assigned this Sep 27, 2023
@alexjhawk alexjhawk marked this pull request as ready for review September 27, 2023 18:14
Copy link
Contributor

@it-hms it-hms left a comment

Choose a reason for hiding this comment

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

I think I only had issues with some doc strings.

@@ -311,6 +311,34 @@ public static void LOG_DEBUG(String logString) {
LOG(LOG_LEVEL_DEBUG, logString);
}

/**
* Log a string and exception with the debug log level
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps is top-level comment is a sentence, it should end in period. Not sure if this looks better or worse for doc strings.
For params and returns, this is not necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added punctuation. I initially did not include these because it maintained consistency with the class, but I have added an additional commit to address this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the future, what do you think about documenting consistency concerns like this and then circling back after the PR?

  • It makes sense to address the punctuation directly added/modified/lack thereof in the pull request, but subsequent concerns about consistency could be more effectively addressed.
  • In the past, we've mostly addressed the consistency concern(s) in the PR, but this also introduces scope creep to PRs, making them larger and more cumbersome to review and modify.
  • Scope creep in PRs can also increase the time required to work with a PR because it can introduce unexpected modification/rebasing of content that was otherwise edited in other commits and could conflict with other staged commits in certain scenarios, depending on order.

* @param logString string to log
* @param logException exception to log
* @param elevateExceptionLogLevel elevates the log level used for the specified exception to
* debug
Copy link
Contributor

Choose a reason for hiding this comment

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

to info?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

* @param logString string to log
* @param logException exception to log
* @param elevateExceptionLogLevel elevates the log level used for the specified exception to
* debug
Copy link
Contributor

Choose a reason for hiding this comment

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

to warn?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

* @param logString string to log
* @param logException exception to log
* @param elevateExceptionLogLevel elevates the log level used for the specified exception to
* debug
Copy link
Contributor

Choose a reason for hiding this comment

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

to serious?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

* @param logString string to log
* @param logException exception to log
* @param elevateExceptionLogLevel elevates the log level used for the specified exception to
* debug
Copy link
Contributor

Choose a reason for hiding this comment

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

to critical?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will make these changes shortly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

starting-files/jvmrun Show resolved Hide resolved
Copy link
Collaborator

@TomKimsey TomKimsey left a comment

Choose a reason for hiding this comment

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

I dont have anything to add

Improved the exception logging capability of the
Logger.java class to allow for exceptions at other
log levels.

This is facilitating the upcoming changes to allow
combined exception logging with a standard log string.
Added combined logging methods in Logger.java which
allow for a log string to be passed alongside an
exception. There is the ability to both output an
exception at the same log level as the associated
string, or at the exception/trace log level.
Added punctuation to existing Javadocs in the
Logger.java class to ensure consistency with
the expected format.
Added non-null put methods to the JSONObject class which
can significantly improve the code structure in certain
scenarios. Many instances of building JSONObjects simply
use constants passed for the key, and a number of passed
in values frequently are already validated (whether from
another request, or a type-constrained source).

These additional methods allow for cleaner source code in
scenarios where we do not expect to ever encounter a null
or invalid key/value. Any exceptions resulting from the
usage of these methods would indicate that the method is
either being used improperly/shouldn't be used at all.
Fixed an improperly formatted Javadoc return
description in JSONObject.java.
This project previously did not have a jvmrun file,
but in an effort to better keep the starter project
and child project in sync, it is being added.
@alexjhawk alexjhawk merged commit b92973e into main Sep 28, 2023
4 checks passed
@alexjhawk alexjhawk deleted the dev/alha-pr2 branch September 28, 2023 13:53
@alexjhawk
Copy link
Collaborator Author

I expect to have PR 3 ready either later today or tomorrow. It should be the final PR and will mainly consist of web docs (how to use the library only, no detailed documentation...yet.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants