-
Notifications
You must be signed in to change notification settings - Fork 12
Added publishing tasks to the build #124
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
Conversation
Changes include: - evergreen updates to support publishing tasks - github workflows to trigger the release - javadoc updates: - Configure links to linked sources - Set encoding to UTF-8 - Fix no comment warnings in the code HIBERNATE-81
|
||
bootstrap-mongo-orchestration: | ||
- command: subprocess.exec | ||
type: test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are evergreen validation fixes related to errors produced on line 96 and on line 110 & 124
.evergreen/publish.sh
Outdated
export ORG_GRADLE_PROJECT_signingPassword=${SIGNING_PASSWORD} | ||
|
||
if [ "$RELEASE" == "true" ]; then | ||
TASK="publishArchives closeSonatypeStagingRepository" # TODO - update to closeAndReleaseSonatypeStagingRepository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows for inspection in the maven central portal to manually release.
Eventually this should be updated to automatic close and release via the closeAndReleaseSonatypeStagingRepository
commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this TODO
is something we cannot do now, but should do in the future, then
- Let's create a corresponding Jira task, which explains what needs to be done, and addresses when it should be done, as "eventually" is unclear.
- Then, if, for example, there is a need to point to a specific line in the codebase, and say that the line is to be changed when working on the task, we should leave a note in the following format:
TODO-<HIBERNATE ticket ID> <the text of the note>
. Example:Line 95 in 1396799
// TODO-HIBERNATE-43 `LOGGER.debug("{} is not detected", ...)` - Leave a note in the description of the ticket, reminding the assignee about the related
TODO
notes in the code: "Addressing the source code notes tagged with TODO- is in scope of this ticket.". Example: see the description of https://jira.mongodb.org/browse/HIBERNATE-43.
The approach described above was agreed to previously, and is used consistently throughout this codebase and HIBERNATE tickets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - added HIBERNATE-128 to track.
@@ -0,0 +1,22 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy and paste from the java repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's decide to use either #!/usr/bin/env bash
or #!/bin/bash
, and use only one variant in all Bash scripts. I see claims that the first variant is more portable (https://stackoverflow.com/a/10383546/1285873), but also "poses a privilege escalation security threat "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opted to use #!/usr/bin/env bash
for portability.
The idea of a privilege escalation security threat when executing
a bash script with such a shebang, requires the user to manipulate
the PATH - so realistically the security of the system would have
already been compromised.
src/main/java/com/mongodb/hibernate/annotations/package-info.java
Outdated
Show resolved
Hide resolved
src/main/java/com/mongodb/hibernate/jdbc/MongoConnectionProvider.java
Outdated
Show resolved
Hide resolved
standardDocletOptions.apply { | ||
author(true) | ||
version(true) | ||
encoding = "UTF-8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added UTF-8 encoding as javadoc failed without it.
addBooleanOption("html5", true) | ||
addBooleanOption("-allow-script-in-comments", true) | ||
links = | ||
listOf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the inter-linking javadoc support
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
// Integration Test | ||
|
||
// Added `Action` explicitly due to an intellij 2025.2 false positive: https://youtrack.jetbrains.com/issue/KTIJ-34210 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to publishing but clears the intellij warning in the latest versions of intellij.
} | ||
|
||
// Gets the git version | ||
val gitVersion: String by lazy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added git versioning check for the version check in the publishArchives
task.
# limitations under the License. | ||
|
||
version=1.0.0-SNAPSHOT | ||
version=0.1.0-SNAPSHOT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to 0.1.0-SNAPSHOT
as I can plan & test the github action for a 0.1.0
test release.
Confirmation of the |
@@ -0,0 +1,22 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's decide to use either #!/usr/bin/env bash
or #!/bin/bash
, and use only one variant in all Bash scripts. I see claims that the first variant is more portable (https://stackoverflow.com/a/10383546/1285873), but also "poses a privilege escalation security threat "
.evergreen/publish.sh
Outdated
export ORG_GRADLE_PROJECT_signingPassword=${SIGNING_PASSWORD} | ||
|
||
if [ "$RELEASE" == "true" ]; then | ||
TASK="publishArchives closeSonatypeStagingRepository" # TODO - update to closeAndReleaseSonatypeStagingRepository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this TODO
is something we cannot do now, but should do in the future, then
- Let's create a corresponding Jira task, which explains what needs to be done, and addresses when it should be done, as "eventually" is unclear.
- Then, if, for example, there is a need to point to a specific line in the codebase, and say that the line is to be changed when working on the task, we should leave a note in the following format:
TODO-<HIBERNATE ticket ID> <the text of the note>
. Example:Line 95 in 1396799
// TODO-HIBERNATE-43 `LOGGER.debug("{} is not detected", ...)` - Leave a note in the description of the ticket, reminding the assignee about the related
TODO
notes in the code: "Addressing the source code notes tagged with TODO- is in scope of this ticket.". Example: see the description of https://jira.mongodb.org/browse/HIBERNATE-43.
The approach described above was agreed to previously, and is used consistently throughout this codebase and HIBERNATE tickets.
src/main/java/com/mongodb/hibernate/annotations/package-info.java
Outdated
Show resolved
Hide resolved
src/main/java/com/mongodb/hibernate/jdbc/MongoConnectionProvider.java
Outdated
Show resolved
Hide resolved
Using `#!/usr/bin/env bash` ensures portability. The idea of a privilege escalation security threat when executing a bash script with such a shebang, requires the user to manipulate the PATH - so realistically the security of the system would have already been compromised.
Co-authored-by: Valentin Kovalenko <valentin.male.kovalenko@gmail.com>
HIBERNATE-81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Ross. There is only one more thing to address, which I proposed a commit for.
The last reviewed commit is 142c5e4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last reviewed commit is 78acc90.
Changes include:
HIBERNATE-81