Skip to content

azure-pipelines: use 10.14#6062

Closed
scpeters wants to merge 3 commits intoHomebrew:masterfrom
scpeters:azure_mojave_only
Closed

azure-pipelines: use 10.14#6062
scpeters wants to merge 3 commits intoHomebrew:masterfrom
scpeters:azure_mojave_only

Conversation

@scpeters
Copy link
Copy Markdown
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Alternative to #6061: there is now a macOS-10.14 image at Azure pipelines:

Per #6061 (comment), switch brew's azure script and the script generated by tap-new to use 10.14 instead of 10.13.

@scpeters
Copy link
Copy Markdown
Contributor Author

Finder got an error: AppleEvent timed out.
Failures:

  1) Cask::Artifact::Zap#zap_phase using :trash is supported
     Failure/Error:
       raise ErrorDuringExecution.new(command,
                                      status: @status,
                                      output: @output)

     ErrorDuringExecution:
       Failure while executing; `osascript -e on\ run\ argv'
       '\ \ repeat\ with\ i\ from\ 1\ to\ \(count\ argv\)'
       '\ \ \ \ set\ item\ i\ of\ argv\ to\ \(item\ i\ of\ argv\ as\ POSIX\ file\)'
Tests Failed
       '\ \ end\ repeat'
       ''
       '\ \ tell\ application\ \"Finder\"'
       '\ \ \ \ set\ trashedItems\ to\ \(move\ argv\ to\ trash\)'
       '\ \ \ \ set\ output\ to\ \"\"'
       ''
       '\ \ \ \ repeat\ with\ i\ from\ 1\ to\ \(count\ trashedItems\)'
       '\ \ \ \ \ \ set\ trashedItem\ to\ POSIX\ path\ of\ \(item\ i\ of\ trashedItems\ as\ string\)'
       '\ \ \ \ \ \ set\ output\ to\ output\ \&\ trashedItem'
       '\ \ \ \ \ \ if\ i\ \<\ count\ trashedItems\ then'
       '\ \ \ \ \ \ \ \ set\ output\ to\ output\ \&\ character\ id\ 0'
       '\ \ \ \ \ \ end\ if'
       '\ \ \ \ end\ repeat'
       ''
       '\ \ \ \ return\ output'
       '\ \ end\ tell'
       'end\ run'
       ' /tmp/homebrew-tests-20190425-54411-40tihd/absolute_path /tmp/homebrew-tests-20190425-54411-40tihd/path_with_tilde /tmp/homebrew-tests-20190425-54411-40tihd/glob_path2 /tmp/homebrew-tests-20190425-54411-40tihd/glob_path1` exited with 1. Here's the output:
       175:193: execution error: Finder got an error: AppleEvent timed out. (-1712)
     Shared Example Group: "#uninstall_phase or #zap_phase" called from ./test/cask/artifact/zap_spec.rb:7

@MikeMcQuaid
Copy link
Copy Markdown
Member

@scpeters I've rerun once and it failed again so trying one more time. I think this may be a legitimate failure as (if I recall correctly) this will block on the user clicking "accept" on a security pop-up. @Homebrew/cask @amyspark any thoughts on the best resolution if that's the case; remove the test?

@scpeters
Copy link
Copy Markdown
Contributor Author

It also failed in #6061

@amyspark
Copy link
Copy Markdown
Contributor

amyspark commented Apr 25, 2019

IIRC (here Homebrew/homebrew-cask@30bfaec) AppleScript can time out if the file cannot be moved (usually because it's locked or because it needs sudo).

It works in 10.13 here, so you may try editing the original script and make it run with a reasonable timeout.

@MikeMcQuaid
Copy link
Copy Markdown
Member

Any news on this @scpeters?

@scpeters
Copy link
Copy Markdown
Contributor Author

scpeters commented May 8, 2019

Any news on this @scpeters?

Sorry I hadn't been working on it because cask feels like it's out of my comfort zone, and I wasn't sure if someone else was going to fix it for me, but I'll try modifying the trash_paths function with some applescript timeouts as suggested by @amyspark and see what happens

def trash_paths(*paths, command: nil, **_)
result = command.run!("osascript", args: ["-e", <<~APPLESCRIPT, *paths])
on run argv
repeat with i from 1 to (count argv)
set item i of argv to (item i of argv as POSIX file)
end repeat
tell application "Finder"
set trashedItems to (move argv to trash)
set output to ""
repeat with i from 1 to (count trashedItems)
set trashedItem to POSIX path of (item i of trashedItems as string)
set output to output & trashedItem
if i < count trashedItems then
set output to output & character id 0
end if
end repeat
return output
end tell
end run
APPLESCRIPT

@amyspark
Copy link
Copy Markdown
Contributor

amyspark commented May 8, 2019

If you need it @scpeters, I can give you a hand 😉

If necessary, I could also try porting this to Swift, which supports file trashing -- but from my Gatekeeper experience, this may certainly be a rabbit hole...

@scpeters
Copy link
Copy Markdown
Contributor Author

scpeters commented May 8, 2019

Thanks @amyspark! I've just tried adding a 30 second timeout in 1f6c6ac, we'll see if that fixes anything

@MikeMcQuaid
Copy link
Copy Markdown
Member

It did not. The test could be deleted for now instead.

@amyspark
Copy link
Copy Markdown
Contributor

amyspark commented May 9, 2019

There are more failed tests, too: brew migrate migrates a renamed Formula, and a Xcode version issue (this one may need a ping to the Azure team?).

@scpeters
Copy link
Copy Markdown
Contributor Author

scpeters commented May 9, 2019

closed in favor of #6113

@scpeters scpeters closed this May 9, 2019
@lock lock bot added the outdated PR was locked due to age label Jan 2, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants