OneDev 16.9.4: Git Commit NullPointerException and Job Secret Validation Warning After Bitbucket Migration
#3196
-
Update: Job Secret Validation Warning Resolved
We identified the cause of the job secret validation warning.
The parent project (
leosys) had thejob-code-writersecret configured with the authorization rule:on branch "**"After clearing the authorization rule (allowing any job to access the secret), the warning disappeared.
This confirms that the warning was related to the job secret authorization rule during PR build trigger validation.
The job secret issue is now resolved and can be ignored.
The other reported issue,
NullPointerExceptioninLogCommit["committer"], remains separate and is not yet resolved.
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
16.9.4
|
| Labels |
No labels
|
Issue Votes (0)
Environment
leosys/xsq/leo-xsqleosysleosys/core/leo-ci-mvnv1Problem Description
After migrating our Git repository from Bitbucket to OneDev, we encountered two issues.
Both issues were observed on OneDev 16.8.6 and still occur after upgrading to 16.9.4.
1. NullPointerException when retrieving Git commit history
OneDev throws a
NullPointerExceptionwhile serializing Git commit information in a REST API response.Error log:
The exception occurs when accessing the
committerproperty ofLogCommitduring JSON serialization.Since the repository was migrated from Bitbucket, we suspect that certain historical Git commit metadata may be triggering this issue. However, we have not confirmed whether the root cause is invalid commit metadata or a OneDev parsing/serialization bug.
Expected behavior:
OneDev should correctly handle Git commit metadata and return commit history without throwing an unhandled exception.
2. Job secret validation warning despite correct parent-level configuration
OneDev periodically logs the following warning when checking automatic job triggers:
Existing configuration:
The
job-code-writersecret is already configured in the parent projectleosys.Its authorization rule is:
The child project
leosys/xsq/leo-xsqhas also completed builds successfully.However, automatic job-trigger validation still reports that no authorized secret can be found.
Expected behavior:
Child projects should correctly inherit authorized job secrets from their parent project, including during automatic build-trigger validation.
Questions
LogCommit["committer"]NullPointerException a known issue in OneDev 16.9.4, particularly for repositories migrated from Bitbucket?job-code-writersecret when builds can complete successfully?Additional Notes
Thank you for your assistance.