Skip to content

Conversation

rozza
Copy link
Member

@rozza rozza commented Sep 4, 2025

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

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
@rozza rozza requested a review from a team as a code owner September 4, 2025 11:08
@rozza rozza requested review from stIncMale and removed request for a team September 4, 2025 11:08

bootstrap-mongo-orchestration:
- command: subprocess.exec
type: test
Copy link
Member Author

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

export ORG_GRADLE_PROJECT_signingPassword=${SIGNING_PASSWORD}

if [ "$RELEASE" == "true" ]; then
TASK="publishArchives closeSonatypeStagingRepository" # TODO - update to closeAndReleaseSonatypeStagingRepository
Copy link
Member Author

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.

Copy link
Member

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

  1. 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.
  2. 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: .
  3. 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.

Copy link
Member Author

@rozza rozza Sep 29, 2025

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
Copy link
Member Author

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

Copy link
Member

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 "

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member Author

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.

standardDocletOptions.apply {
author(true)
version(true)
encoding = "UTF-8"
Copy link
Member Author

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(
Copy link
Member Author

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
Copy link
Member Author

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 {
Copy link
Member Author

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
Copy link
Member Author

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.

@rozza
Copy link
Member Author

rozza commented Sep 4, 2025

Confirmation of the publish-snapshot task publishing to the maven central snapshots repo:
mongodb-hibernate/0.1.0-SNAPSHOT

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
Copy link
Member

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 "

export ORG_GRADLE_PROJECT_signingPassword=${SIGNING_PASSWORD}

if [ "$RELEASE" == "true" ]; then
TASK="publishArchives closeSonatypeStagingRepository" # TODO - update to closeAndReleaseSonatypeStagingRepository
Copy link
Member

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

  1. 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.
  2. 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: .
  3. 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.

rozza and others added 7 commits September 29, 2025 10:54
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>
@rozza rozza requested a review from stIncMale September 29, 2025 10:18
Copy link
Member

@stIncMale stIncMale left a 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.

@stIncMale
Copy link
Member

The last reviewed commit is 142c5e4.

@rozza rozza requested a review from stIncMale October 16, 2025 10:56
Copy link
Member

@stIncMale stIncMale left a 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.

@rozza rozza merged commit dc8f6af into mongodb:main Oct 16, 2025
7 checks passed
@rozza rozza deleted the H81 branch October 16, 2025 15:09
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.

2 participants