Skip to content

Refactor CI workflows and update dependencies#212

Merged
mercyblitz merged 16 commits intorelease-1.xfrom
dev-1.x
Apr 13, 2026
Merged

Refactor CI workflows and update dependencies#212
mercyblitz merged 16 commits intorelease-1.xfrom
dev-1.x

Conversation

@mercyblitz
Copy link
Copy Markdown
Contributor

This pull request introduces automated release notes generation using GitHub Copilot in the Maven publish workflow, updates dependency versions, and includes minor improvements to logging and configuration annotations. The main focus is on streamlining the release process and improving code clarity.

CI/CD & Release Automation:

  • Adds a step in .github/workflows/maven-publish.yml to automatically generate release notes using GitHub Copilot and the Models API, formats them as markdown, and attaches them to GitHub releases instead of using auto-generated notes. Also ensures these notes are committed to release-notes.md for future reference. [1] [2]
  • Updates workflow permissions to allow reading from the models API.

Dependency Version Updates:

  • Bumps microsphere-java to version 0.2.8 and microsphere-logging to 0.1.6 in microsphere-spring-parent/pom.xml.
  • Updates the parent build version to 0.2.7 in the root pom.xml.

Code Quality & Logging Improvements:

  • Changes logging in LoggingSmartLifecycle from debug to info level for lifecycle events, making startup and shutdown more visible in logs.
  • Ensures error logs in BeanListeners are only written if error logging is enabled, preventing unnecessary log output.

Configuration Annotation Enhancement:

  • Adds the source attribute to the @ConfigurationProperty annotation for RESET_BEAN_NAME_PROPERTY_NAME, improving configuration metadata. [1] [2]

github-actions Bot and others added 16 commits April 5, 2026 11:00
Remove the -Dsurefire.useSystemClassLoader=false JVM property from the GitHub Actions Maven build workflow. This change drops the explicit Surefire system classloader override, relying on the plugin's default behavior and avoiding potential classloader-related issues in CI.
Add -Dsurefire.useSystemClassLoader=false to the Maven invocation in .github/workflows/maven-build.yml. This forces Surefire to not use the system classloader during test runs, addressing potential classloader-related test failures or environment issues in the CI workflow.
Add a GitHub Actions workflow that periodically (every 5 minutes) syncs branches from the upstream repository into a fork. The job detects whether the repo is a fork (using gh api + jq) and only runs for forks; it fetches upstream and origin refs, skips branches that don't exist upstream or are already up to date, and pushes upstream/<branch> to origin/<branch> using --force-with-lease. Uses actions/checkout@v5, write permissions for contents, concurrency to cancel in-progress runs, and exits with failure if any branch push fails.
Delete .github/workflows/sync-branches-from-upstream.yml which provided an automated workflow to sync fork branches from the upstream parent. The workflow ran on a 5-minute cron (and via manual dispatch), checked whether the repository was a fork, added the upstream remote, fetched refs, and iterated origin branches to update those that existed in upstream (pushing with force-with-lease). Removing this file disables the frequent automated branch synchronization that the workflow performed.
Update the parent artifact io.github.microsphere-projects:microsphere-build in pom.xml from version 0.2.6 to 0.2.7 to pick up upstream fixes/updates.
Update microsphere-spring-parent/pom.xml to set <microsphere-java.version> from 0.2.6 to 0.2.8, ensuring the project uses the newer microsphere-java release with its fixes/updates.
Update microsphere-logging.version in microsphere-spring-parent/pom.xml from 0.1.5 to 0.1.6 to pick up the newer microsphere-logging release across the project.
Normalize spacing in the GitHub Actions matrix for Java versions and remove the stray leading space from the '25' entry. This ensures the matrix values are consistent and prevents accidental inclusion of a malformed ' 25' string that could cause mismatched runner configuration.
Add a new workflow step that generates release notes using the GitHub Models API (gpt-4o) via a Python script. The step determines the previous tag, collects commits, requests a concise markdown summary, appends a versioned section to release-notes.md, and writes the current notes to /tmp/current-release-notes.md for the release creation step. Also: grant workflows models: read permission, switch the release creation to use --notes-file /tmp/current-release-notes.md (instead of --generate-notes), and include release-notes.md in the post-publish commit so generated notes are persisted. The script falls back to including raw commits if the model call fails.
Wrap the logger.error call in BeanListeners with an if (logger.isErrorEnabled()) guard. This avoids unnecessary evaluation/side-effects of logging arguments during exception handling and reduces logging overhead in the error path.
Minor formatting change in DependencyAnalysisBeanFactoryListener: add a space between 'if' and '(' when checking logger.isTraceEnabled(). No functional change; improves code readability.
Add a source attribute to the @ConfigurationProperty on RESET_BEAN_NAME_PROPERTY_NAME by importing APPLICATION_SOURCE and setting source = APPLICATION_SOURCE. This provides metadata about the configuration property's origin and includes a minor annotation formatting adjustment.
Change LoggingSmartLifecycle to log lifecycle events at INFO level by replacing logger.isDebugEnabled()/logger.debug(...) with logger.isInfoEnabled()/logger.info(...) in doStart() and doStop(), ensuring start/stop messages are visible at INFO level.
Refactor CI workflows and update dependencies
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...icrosphere/spring/context/event/BeanListeners.java 0.00% 2 Missing ⚠️
...t/event/DependencyAnalysisBeanFactoryListener.java 0.00% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ Complexity Δ
.../InterceptingApplicationEventMulticasterProxy.java 86.76% <ø> (-10.30%) 29.00 <0.00> (-1.00)
...pring/context/lifecycle/LoggingSmartLifecycle.java 100.00% <100.00%> (ø) 6.00 <4.00> (ø)
...t/event/DependencyAnalysisBeanFactoryListener.java 77.20% <0.00%> (-0.52%) 48.00 <0.00> (-1.00)
...icrosphere/spring/context/event/BeanListeners.java 90.62% <0.00%> (-1.44%) 25.00 <0.00> (ø)

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link
Copy Markdown

@mercyblitz mercyblitz merged commit 761fbda into release-1.x Apr 13, 2026
1 of 52 checks passed
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.

1 participant