这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@kou
Copy link
Member

@kou kou commented Jun 25, 2025

What's Changed

Creates synchronous methods and call it in defer to free resources.

Closes #55.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors resource shutdown to use synchronous helper methods in defer blocks and updates CI workflows for multiple Swift versions and adjusted timeouts.

  • Introduces syncShutdown() methods in FlightServerImpl and FlightClientTester and replaces inline shutdown calls with defer blocks
  • Removes the continue-on-error override from the test workflow
  • Adds a Swift version matrix and reduces the job timeout in the release candidate workflow

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ArrowFlight/Tests/ArrowFlightTests/FlightTest.swift Added syncShutdown helpers and updated test defer blocks for cleanup
.github/workflows/test.yaml Removed deprecated continue-on-error setting
.github/workflows/rc.yaml Reduced timeout-minutes and introduced Swift version matrix
Comments suppressed due to low confidence (1)

.github/workflows/rc.yaml:108

  • [nitpick] A 15-minute timeout may be insufficient for matrix builds on slower runners. Consider increasing the timeout to avoid CI flakiness.
    timeout-minutes: 15

try? group?.syncShutdownGracefully()
try? channel?.close().wait()
func syncShutdown() throws {
try group?.syncShutdownGracefully()
Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

The instance property 'group' is never assigned in the initializer, so group remains nil and this shutdown call is a no-op. Consider assigning self.group = group in init() to ensure proper shutdown.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

well this was not helpful, it is initialized on init at line 176
let group = PlatformSupport.makeEventLoopGroup(loopCount: 1)

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

LGTM, I don't know much about swift but it fixes the issue and it runs on the different versions. @dongjoon-hyun do you want to take a quick look?

try? group?.syncShutdownGracefully()
try? channel?.close().wait()
func syncShutdown() throws {
try group?.syncShutdownGracefully()
Copy link
Member

Choose a reason for hiding this comment

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

well this was not helpful, it is initialized on init at line 176
let group = PlatformSupport.makeEventLoopGroup(loopCount: 1)

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

@raulcd raulcd merged commit 672a48c into apache:main Jun 25, 2025
19 of 28 checks passed
@kou kou deleted the async branch June 25, 2025 20:51
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.

Swift 6: instance method 'syncShutdownGracefully' is unavailable from asynchronous contexts

3 participants