Skip to content

ci: fix unit test#6418

Open
JoeWang1127 wants to merge 4 commits into
antique-librarianfrom
ci/fix-ci
Open

ci: fix unit test#6418
JoeWang1127 wants to merge 4 commits into
antique-librarianfrom
ci/fix-ci

Conversation

@JoeWang1127

@JoeWang1127 JoeWang1127 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Update dependencies and fix unit test CI.

Fixes #6388

@JoeWang1127 JoeWang1127 changed the base branch from main to antique-librarian June 13, 2026 14:25
@JoeWang1127 JoeWang1127 changed the title Ci/fix ci ci: fix unit test Jun 13, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates Go to version 1.26.1, upgrades multiple dependencies, refactors string builder operations to use fmt.Fprintf, and introduces a state rollback mechanism in createreleasepr.go when library release preparation, building, or testing fails. It also adds logic to ignore skipped checks when waiting for pull request readiness. However, the code review points out a critical issue: while the library state is restored in memory upon failure, the rollback is never persisted to disk because savePipelineState is not called, which could leave incorrect state on disk.

I am having trouble creating individual review comments. Click here to see my feedback.

internal/librarian/createreleasepr.go (276)

high

When a library release preparation fails, the in-memory state is restored to originalLib, but this rollback is never persisted to disk because savePipelineState(state) is not called. If this is the last library or the only library being processed, the incorrect/modified state will remain on disk.

Please save the pipeline state after restoring the original library state.

			libraries[i] = originalLib
			if err := savePipelineState(state); err != nil {
				return nil, err
			}

internal/librarian/createreleasepr.go (285)

high

When the library build fails, the in-memory state is restored to originalLib, but this rollback is never persisted to disk because savePipelineState(state) is not called. If this is the last library or the only library being processed, the incorrect/modified state will remain on disk.

Please save the pipeline state after restoring the original library state.

			libraries[i] = originalLib
			if err := savePipelineState(state); err != nil {
				return nil, err
			}

internal/librarian/createreleasepr.go (296)

high

When the library integration tests fail, the in-memory state is restored to originalLib, but this rollback is never persisted to disk because savePipelineState(state) is not called. If this is the last library or the only library being processed, the incorrect/modified state will remain on disk.

Please save the pipeline state after restoring the original library state.

			libraries[i] = originalLib
			if err := savePipelineState(state); err != nil {
				return nil, err
			}

@JoeWang1127 JoeWang1127 marked this pull request as ready for review June 13, 2026 14:34
@JoeWang1127 JoeWang1127 requested a review from jskeet June 13, 2026 14:34
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