Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly Test: Dependency Commmands Test Suite - Swift: Reset Package Dependencies - failed on Linux (main and 6.0 - jammy) #1316

Open
rbenegal opened this issue Jan 15, 2025 · 5 comments
Assignees
Labels
testing infrastructure Issues related to CI jobs or extension test cases

Comments

@rbenegal
Copy link
Contributor

Failed with:

      1) Swift: Reset Package Dependencies
Captured logs during Dependency Commmands Test Suite → Swift: Use Local Dependency → Swift: Reset Package Dependencies:
00:35:21: Activating Swift for Visual Studio Code...
00:35:21: Swift version 6.0.3-dev (LLVM 2e6139970eda445, Swift 7fb200b953a7343)
Platform: linux
Swift Path: /usr/bin
Toolchain Path: /usr
Runtime Library Path: /usr/lib/swift/linux
Default Target: x86_64-unknown-linux-gnu
00:35:21: SourceKit-LSP setup
00:35:21: focus: undefined
00:35:22: test/defaultPackage: add: /tmp/code/assets/test/defaultPackage
00:35:22: test/command-plugin: add: /tmp/code/assets/test/command-plugin
rejected promise not handled within 1 second: spawn git ENOENT {
  "gitErrorCode": "NotAGitRepository"
}Error: spawn git ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
stack trace: Error: spawn git ENOENT
    at ChildProcess.<anonymous> (/tmp/code/.vscode-test/vscode-linux-x64-1.96.3/resources/app/extensions/git/dist/main.js:2:922998)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:483:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
rejected promise not handled within 1 second: spawn git ENOENT {
  "gitErrorCode": "NotAGitRepository"
}Error: spawn git ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
stack trace: Error: spawn git ENOENT
    at ChildProcess.<anonymous> (/tmp/code/.vscode-test/vscode-linux-x64-1.96.3/resources/app/extensions/git/dist/main.js:2:922998)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:483:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Link to failed run: https://github.com/swiftlang/vscode-swift/actions/runs/12778956212/job/35622745761

@rbenegal rbenegal changed the title Nightly Test: Dependency Commmands Test Suite - failed on Linux (main and 6.0 - jammy) Nightly Test: Dependency Commmands Test Suite - Swift: Reset Package Dependencies - failed on Linux (main and 6.0 - jammy) Jan 15, 2025
@award999 award999 added the testing infrastructure Issues related to CI jobs or extension test cases label Jan 15, 2025
@award999 award999 moved this from Unscreened to In Progress in Swift Extension for Visual Studio Code Jan 16, 2025
@rbenegal
Copy link
Contributor Author

Another failure in https://github.com/swiftlang/vscode-swift/actions/runs/12848727861/job/35826445266 (Linux nightly-6.0 - jammy)

[File Watcher (node.js)] Watcher shutdown because watched path got deleted
[File Watcher (node.js)] Watcher shutdown because watched path got deleted
      1) Swift: Reset Package Dependencies
Captured logs during Dependency Commmands Test Suite → Swift: Use Local Dependency → Swift: Reset Package Dependencies:
00:37:36: Activating Swift for Visual Studio Code...
00:37:36: Swift version 6.0.3-dev (LLVM 2e6139970eda445, Swift 7fb200b953a7343)
Platform: linux
Swift Path: /usr/bin
Toolchain Path: /usr
Runtime Library Path: /usr/lib/swift/linux
Default Target: x86_64-unknown-linux-gnu
00:37:36: SourceKit-LSP setup
00:37:36: focus: undefined
00:37:36: test/defaultPackage: add: /tmp/code/assets/test/defaultPackage
00:37:36: test/command-plugin: add: /tmp/code/assets/test/command-plugin

@rbenegal
Copy link
Contributor Author

@rbenegal
Copy link
Contributor Author

Not in nightly but seems like this test can also possibly fail on Windows on 5.9 for PR runs: https://github.com/swiftlang/vscode-swift/actions/runs/12921336086/job/36062179512

    Swift: Use Local Dependency
      - Swift: Reset Package Dependencies
[File Watcher (node.js)] Failed to watch d:\a\vscode-swift\vscode-swift\assets\test\dependencies\.build\checkouts\swift-markdown\.git for changes using fs.watch() (Error: EPERM: operation not permitted, watch, undefined)
      ✔ Swift: Revert To Original Version (8255ms)
  206 passing (5m)
  27 pending
2 tests failed.
  2 failing
  1) PackageDependencyProvider Test Suite
       Includes local dependency:
     AssertionError: Expected to find defaultPackage, but instead items were swift-cmark,swift-markdown: expected undefined not to be undefined
      at Context.<anonymous> (d:\a\vscode-swift\vscode-swift\test\integration-tests\ui\PackageDependencyProvider.test.ts:66:20)

  2) PackageDependencyProvider Test Suite
       Lists local dependency file structure:
     AssertionError: Expected to find defaultPackage, but instead items were swift-cmark,swift-markdown: expected undefined not to be undefined
      at Context.<anonymous> (d:\a\vscode-swift\vscode-swift\test\integration-tests\ui\PackageDependencyProvider.test.ts:78:20)

@rbenegal
Copy link
Contributor Author

Managed to reproduce this with a Dev Container and export CI=1 and running the test a few times through xvfb-run -a npm test -- --label integrationTests. Seems like it works ok initially but then starts failing, possibly due to some file system/caching issues.

    1) Swift: Reset Package Dependencies
Captured logs during Dependency Commmands Test Suite → Swift: Use Local Dependency → Swift: Reset Package Dependencies:
No logs captured.
[28645:0127/222733.761635:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[28645:0127/222734.146826:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[File Watcher] Unexpected error: inotify_add_watch on '/workspaces/vscode-swift/assets/test/dependencies/.build/index-build/aarch64-unknown-linux-gnu/debug/index/store/v5/records/BA' failed: No such file or directory (EUNKNOWN) (path: /workspaces/vscode-swift/assets/test)
[File Watcher (universal)] inotify_add_watch on '/workspaces/vscode-swift/assets/test/dependencies/.build/index-build/aarch64-unknown-linux-gnu/debug/index/store/v5/records/BA' failed: No such file or directory
[28645:0127/222741.180219:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[28645:0127/222741.435535:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[28645:0127/222741.998557:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
      2) Swift: Revert To Original Version
Captured logs during Dependency Commmands Test Suite → Swift: Use Local Dependency → Swift: Revert To Original Version:
No logs captured.
[28645:0127/222744.999183:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
  2 passing (26s)
  2 failing
  1) Dependency Commmands Test Suite
       Swift: Use Local Dependency
         Swift: Reset Package Dependencies:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/integration-tests/commands/dependency.test.ts:105:33)

  2) Dependency Commmands Test Suite
       Swift: Use Local Dependency
         Swift: Revert To Original Version:
     TypeError: Cannot read properties of undefined (reading 'type')
      at assertUsingRemote (test/integration-tests/commands/dependency.test.ts:93:44)
      at Context.<anonymous> (test/integration-tests/commands/dependency.test.ts:119:13)

2 tests failed.
Extension host test runner error 2 tests failed.
Asking native host service to exit with code 1.

It seems like adding in a few retries does cause the test to succeed eventually, so maybe it's worth trying this so that the test only fails if it fails for all the attempts.

@rbenegal
Copy link
Contributor Author

Actually, seems like this should be fixed with the changes in #1339. Will take a look at this again after the PR is submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing infrastructure Issues related to CI jobs or extension test cases
Projects
Development

No branches or pull requests

2 participants