Throw a custom exit code for (or "properly handle") ITMS-90732 error
tduffield opened this issue · comments
ERROR ITMS-90732
is what the notarization service throws when you attempt to re-notarize a package that has already been notarized. When running gon
in a CI environment, is can happen with some frequency that some non-gon
related part of the job (e.g. uploading to your artifact store) fails and you need to retry.
In the short term, it would be useful if gon
was able to detect ITMS-90732 errors and exit with a code other than 1
. That way we can (in theory) detect this exit code in our caller scripts and choose not to fail our notarization jobs.
In the longer term, it would be amazing if gon
could "pick up" the notarization and exit "as normal" depending on the success or failure of the notarization.
Sample gon
output
{
"@level": "info",
"@message": "notarization submission complete",
"@module": "notarize",
"@timestamp": "2021-05-05T06:30:24.065847-07:00",
"err": "exit status 1",
"output": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>os-version</key>\n\t<string>10.15.7</string>\n\t<key>product-errors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>code</key>\n\t\t\t<integer>-18000</integer>\n\t\t\t<key>message</key>\n\t\t\t<string>ERROR ITMS-90732: \"The software asset has already been uploaded. The upload ID is bcaa06a2-11a1-4821-8340-80a35eae35a2\" at SoftwareAssets/EnigmaSoftwareAsset</string>\n\t\t\t<key>userInfo</key>\n\t\t\t<dict>\n\t\t\t\t<key>NSLocalizedDescription</key>\n\t\t\t\t<string>ERROR ITMS-90732: \"The software asset has already been uploaded. The upload ID is bcaa06a2-11a1-4821-8340-80a35eae35a2\" at SoftwareAssets/EnigmaSoftwareAsset</string>\n\t\t\t\t<key>NSLocalizedFailureReason</key>\n\t\t\t\t<string>ERROR ITMS-90732: \"The software asset has already been uploaded. The upload ID is bcaa06a2-11a1-4821-8340-80a35eae35a2\" at SoftwareAssets/EnigmaSoftwareAsset</string>\n\t\t\t\t<key>NSLocalizedRecoverySuggestion</key>\n\t\t\t\t<string>ERROR ITMS-90732: \"The software asset has already been uploaded. The upload ID is bcaa06a2-11a1-4821-8340-80a35eae35a2\" at SoftwareAssets/EnigmaSoftwareAsset</string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>tool-path</key>\n\t<string>/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework</string>\n\t<key>tool-version</key>\n\t<string>4.029.1194</string>\n</dict>\n</plist>\n\n"
}