Skip to content

Fix errors in update-spring-dependencies.yml#51

Merged
rujche merged 5 commits into
mainfrom
rujche/main/fix-error-in-update-spring-dependencies.yml
Jun 15, 2026
Merged

Fix errors in update-spring-dependencies.yml#51
rujche merged 5 commits into
mainfrom
rujche/main/fix-error-in-update-spring-dependencies.yml

Conversation

@rujche

@rujche rujche commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Return Optional from getCurrentVersion instead of calling Optional.get() on a possibly-empty stream, and guard the update logic with availability flags so an absent prerelease version no longer crashes the runner.\
  • Fix error about failed to adding comments in related PRs in GitHub action.

Related Pipelines

rujche added 2 commits June 15, 2026 09:42
Return Optional from getCurrentVersion instead of calling Optional.get() on a possibly-empty stream, and guard the update logic with availability flags so an absent prerelease version no longer crashes the runner.
…rkflow

Close old superseded PRs before creating the new one, and comment /azp run only on the newly created PR.
@rujche rujche changed the title Fix NoSuchElementException when no matching Spring Boot version exists Fix errors in update-spring-dependencies.yml Jun 15, 2026
@rujche rujche self-assigned this Jun 15, 2026
@rujche rujche added the bug Something isn't working label Jun 15, 2026
@rujche rujche added this to the 2026-07 milestone Jun 15, 2026
@rujche rujche moved this from Todo to In Progress in Spring Cloud Azure Jun 15, 2026
@rujche rujche requested a review from Netyyyy June 15, 2026 02:01
git commit -m "Upgrade external dependencies to align with Spring Boot ${{ env.spring_boot_version }}"
git push "https://${{ secrets.USER }}:${{ secrets.ACCESS_TOKEN }}@github.com/${{ secrets.USER }}/azure-sdk-for-java.git" "HEAD:${{ env.update_branch }}"
- name: Close Old Pull Requests
if: ${{ env.need_update_version == 'true' }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it will close the working PR: Azure/azure-sdk-for-java#49501

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not it will skip other steps if there is any PR with specific title prefix. Here are test pipelines:

  1. https://github.com/Azure/spring-cloud-azure-tools/actions/runs/27528316282
    image
  2. https://github.com/Azure/spring-cloud-azure-tools/actions/runs/27528329850
    image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can remove this step now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed

owner: 'Azure',
repo: 'azure-sdk-for-java',
issue_number: prNumber,
body: comment1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As the comment said, it's caused by adding new commits after adding this comment, it's not caused by the error of current file, we can ignore it.

rujche added 3 commits June 15, 2026 14:17
Add a dedicated check job that detects open PRs titled 'External dependencies upgrade - Spring Boot' and gates the update job via needs/if. Reuse the PR title prefix via env and rename jobs to reflect their purpose.
The check job already skips the pipeline when a matching open PR exists, so no old PR can remain when this step would run.
@rujche rujche requested a review from Netyyyy June 15, 2026 07:21

@Netyyyy Netyyyy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@rujche rujche merged commit 0cdc07f into main Jun 15, 2026
2 checks passed
@rujche rujche deleted the rujche/main/fix-error-in-update-spring-dependencies.yml branch June 15, 2026 07:39
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Spring Cloud Azure Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants