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

[CODE-874] New uploader is unable to find and upload coverage reports from Xcode #223

Closed
chris-araman opened this issue Jul 20, 2021 · 24 comments
Labels
selected for development Used for issues that the codecov team is/will be actively working on

Comments

@chris-araman
Copy link

chris-araman commented Jul 20, 2021

Describe the bug
The new uploader fails to find coverage reports from Xcode.

To Reproduce

  1. git clone https://github.com/chris-araman/CombineCloudKit.git
  2. cd CombineCloudKit
  3. swift package generate-xcodeproj
  4. xcodebuild test -enableCodeCoverage YES -scheme CombineCloudKit-Package
  5. bin/codecov -n -Q github-action-2.0.1 -Z

Expected behavior
The coverage report is found and uploaded successfully.

Additional context
codecov-action@v2 uses the new uploader. codecov-action@v1 used the old bash uploader. The new uploader fails to find coverage reports from Xcode when the bash uploader found them successfully. I encountered this issue when attempting to migrate from codecov-action@v1 to @v2.

It seems this functionality was implemented in the bash uploader here:
https://github.com/codecov/codecov-bash/blob/ae76691c8554334bc1ddc355f6667fd36d6890f5/codecov#L1148

There are notes in #15 about wanting to keep this project a "pure uploader". I think separating the concerns of the uploader from the concerns of something processing reports is admirable. However, I think this sort of boilerplate logic is useful to users of the uploader. Perhaps it can be ported to a more coverage-friendly environment (Node.js, Typescript) alongside the uploader functionality, even if it's in a separate module?

This issue is preventing me from migrating to the new uploader via codecov-action@v2.

@drazisil-codecov
Copy link
Contributor

I wonder if writing the llvm-cov commands as a Fastlane plugin would be an option.

I'm not an Apple programmer, so I don't know the % of XCode programers that use Fastlane as well.

@chris-araman
Copy link
Author

chris-araman commented Jul 20, 2021

It's a good idea. It might be useful to use a small part of Fastlane or another plug-in in this way. It's just odd that the Codecov action used to offer this functionality and no longer does.

Fastlane is great for projects that build iOS apps. I don't think it's commonly used for macOS or other apps. And in the case of CombineCloudKit, it's just a Swift package (something like a library or framework), not an app at all. I don't think Fastlane is commonly used for things that aren't iOS apps.

@ffried
Copy link

ffried commented Jul 21, 2021

I wonder if writing the llvm-cov commands as a Fastlane plugin would be an option.

It would help some, but certainly not enough developers. We're not using fastlane for example and we have a ton of swift packages that are now failing to produce coverage reports.

To mitigate the issue temporarily, I've written an swift-coverage-action that performs the tasks previously done by the bash uploader. There are certain features missing (e.g. the -J parameter), but it should do the trick most of the time.

An example of how to use it can be found here.

I still hope to retire that action in the near future, though. 😉

@drazisil-codecov
Copy link
Contributor

I still hope to retire that action in the near future, though.

This is great from a GutHub Actions standpoint. Is your desire to retire it due to being an extra action, or due to maintenance or some other cause?

@drazisil-codecov
Copy link
Contributor

t's just odd that the Codecov action used to offer this functionality and no longer does.

I agree that we could do more in this regard. You saw my notes on wanting to seperate it, but I agree that we need to do better at a replacement.

Fastlane is great for projects that build iOS apps. I don't think it's commonly used for macOS or other apps.

That's a great point. As a non-Apple dev, I wasn't thinking that Fastlane was IOS only. Does XCode in general have something similar in it's ecosystem? IS Cocoapods also mainly IOS?

@ffried
Copy link

ffried commented Jul 21, 2021

This is great from a GitHub Actions standpoint. Is your desire to retire it due to being an extra action, or due to maintenance or some other cause?

Currently, it's mostly because the actions is (in its current state) a rather quick re-write of the swiftcov function and its call-site in the bash uploader.

It's now a separate action with a rather limited use-case (I doubt it'll work with anything else other than Codecov tbh).
Of course I could extend it to cover more use-cases. Like also converting files on linux or converting the results of a swift test run inside a swift package. Or supporting more formats (e.g. lcov). I might even do so in the future (especially since we're having the swift test case in our actions).

It being a separate action means that those features will (sooner or later) be requested. That's something that is less likely to occur if the Codecov action "simply works" - since (until now) no one really cared about what more it could do - swift test being maybe the only exception.

@ffried
Copy link

ffried commented Jul 21, 2021

That's a great point. As a non-Apple dev, I wasn't thinking that Fastlane was IOS only. Does XCode in general have something similar in it's ecosystem? IS Cocoapods also mainly IOS?

CocoaPods is "just" one of three major dependency management systems inside the Apple ecosystem: Swift Package Manager (being the youngest), Carthage and CocoaPods (being the oldest).
I think Swift Package Manager will eventually supersede the others, but that's just my two cents.

There are (binary) xcresult bundles since Xcode 11. I haven't spent too much time with them so far, but AFAIK they also contain coverage information. There's also a developer tool xcresulttool that can be used to interact with them.
The advantage of those bundles is, that you can open them in Xcode and see the results there as well.

@chris-araman
Copy link
Author

To mitigate the issue temporarily, I've written an xcode-coverage-action that performs the tasks previously done by the bash uploader.

@ffried, would it be possible to create a PR on codecov/uploader with your code?

@ffried
Copy link

ffried commented Jul 23, 2021

@ffried, would it be possible to create a PR on codecov/uploader with your code?

I just had a brief look at the code base of the uploader. One thing I noticed is that it's pure JavaScript, while the action is written in TypeScript. I could probably start with the compiled version of it and adjust it to look a bit more "natural"...
The other thing I'm not sure about is the extra arguments that come with it:

  • derived data directory (previously -D)
  • app name regex (previously -J)

@drazisil-codecov
Copy link
Contributor

As an action, I'm thinking it may fit better at https://github.com/codecov/codecov-action, though I don't want to speak for @thomasrockhu

💡 goes off to create some feature dreams issues

@ncreated
Copy link

ncreated commented Oct 6, 2021

👋 Stepping across this issue, as I'm trying to integrate codecov into our iOS SDK repository 🙂. As I understand, the current situation is:

I'm testing the new uploader 0.1.4(latest, macos) and it doesn't support Xcode coverage. What I read in this thread is that it will rather not support it - as described in #15 the Xcode functionality was removed.

  • Is there any new / recommended approach for sending Xcode coverage file or do I need pre-process it by my own as other folks did in this thread?

Lack of Xcode coverage support seems to be a stalemate situation, as the official codecov-bitrise depends on the new uploader now (cc @thomasrockhu-codecov) and in this thread I read that it will not work.

Am I missing any puzzle 🧩🙂?

@drazisil-codecov
Copy link
Contributor

Providing a update: I do not have an exact timeline, but we have identified this functionality is required in the new uploader, and are trying to determine the best way to add it.

As a temporary workaround, if any of you have node and would be able to try https://github.com/codecov/xcode-poc, I would be happy to know if this provides the report conversation needed. (please send the output though the new uploader, not bash)

If the xcode-poc repo code works, we may be able to drop that code into the uploader and get things running again faster.

@chris-araman
Copy link
Author

Doesn't seem to work, or I'm doing something wrong.

caraman@mac ~/s/CombineCloudKit (main)> xcodebuild -scheme CombineCloudKit -destination 'id=529F3FC8-EB55-4644-A1B3-01FF1DA6A2BA' -derivedDataPath Build/ -enableCodeCoverage=YES test 
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -scheme CombineCloudKit -destination id=529F3FC8-EB55-4644-A1B3-01FF1DA6A2BA -derivedDataPath Build/ -enableCodeCoverage=YES test

User defaults from command line:
    enableCodeCoverage = YES
    IDEDerivedDataPathOverride = /Users/caraman/src/CombineCloudKit/Build
    IDEPackageSupportUseBuiltinSCM = YES

Resolve Package Graph

Resolved source packages:
  CombineCloudKit: /Users/caraman/src/CombineCloudKit
  SwiftSyntax: https://github.com/apple/swift-syntax @ 0.50500.0
  swift-argument-parser: https://github.com/apple/swift-argument-parser.git @ 1.0.1
  swift-format: https://github.com/apple/swift-format.git @ swift-5.5-branch


note: Using new build system
note: Planning
Analyze workspace

Create build description
Testing started
Build description signature: a06348880afb0ef5fe271e913a8694a7
Build description path: /Users/caraman/src/CombineCloudKit/Build/Build/Intermediates.noindex/XCBuildData/a06348880afb0ef5fe271e913a8694a7-desc.xcbuild

note: Build preparation complete
note: Building targets in parallel
Test Suite 'All tests' started at 2021-10-27 15:22:17.023
Test Suite 'CombineCloudKitTests.xctest' started at 2021-10-27 15:22:17.024
Test Suite 'CKContainerTests' started at 2021-10-27 15:22:17.024
Test Case '-[CombineCloudKitTests.CKContainerTests testAccountStatusIsAvailable]' started.
Test Case '-[CombineCloudKitTests.CKContainerTests testAccountStatusIsAvailable]' passed (0.003 seconds).
Test Suite 'CKContainerTests' passed at 2021-10-27 15:22:17.027.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.003 (0.003) seconds
Test Suite 'CKDatabaseTests' started at 2021-10-27 15:22:17.028
Test Case '-[CombineCloudKitTests.CKDatabaseTests testCKOperationFactory]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testCKOperationFactory]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordAtBackgroundPriorityFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordAtBackgroundPriorityFailsWhenDoesNotExist]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordZoneAtBackgroundPriorityFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordZoneAtBackgroundPriorityFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordZoneFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteRecordZoneFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteSubscriptionAtBackgroundPriorityFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteSubscriptionAtBackgroundPriorityFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteSubscriptionFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testDeleteSubscriptionFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllRecordZones]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllRecordZones]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllRecordZonesAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllRecordZonesAtBackgroundPriority]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllSubscriptions]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllSubscriptions]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllSubscriptionsAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchAllSubscriptionsAtBackgroundPriority]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchCurrentUserRecord]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchCurrentUserRecord]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordAtBackgroundPriorityFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordAtBackgroundPriorityFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordsIncludesOnlyRequestedRecords]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordsIncludesOnlyRequestedRecords]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordWithProgressFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordWithProgressFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordZoneAtBackgroundPriorityFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordZoneAtBackgroundPriorityFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordZoneFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordZoneFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordZonesIncludesOnlyRequestedRecordZones]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchRecordZonesIncludesOnlyRequestedRecordZones]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchSubscriptionAtBackgroundPriorityFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchSubscriptionAtBackgroundPriorityFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchSubscriptionFailsWhenDoesNotExist]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchSubscriptionFailsWhenDoesNotExist]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchSubscriptionsIncludesOnlyRequestedSubscriptions]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testFetchSubscriptionsIncludesOnlyRequestedSubscriptions]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryAfterCancellationReturnsNoRecords]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryAfterCancellationReturnsNoRecords]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryForZeroRecordsReturnsNoRecords]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryForZeroRecordsReturnsNoRecords]' passed (0.000 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryReturnsExpectedResults]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryReturnsExpectedResults]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryWithNoMatchingRecordsReturnsNoResults]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryWithNoMatchingRecordsReturnsNoResults]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryWithNoRecordsReturnsNoResults]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryWithNoRecordsReturnsNoResults]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryWithPaginationReturnsExpectedResults]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testQueryWithPaginationReturnsExpectedResults]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecord]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecord]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordAtBackgroundPriority]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordWithProgress]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordWithProgress]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordZone]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordZone]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordZoneAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteRecordZoneAtBackgroundPriority]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteSubscription]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteSubscription]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteSubscriptionAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.CKDatabaseTests testSaveFetchAndDeleteSubscriptionAtBackgroundPriority]' passed (0.001 seconds).
Test Suite 'CKDatabaseTests' passed at 2021-10-27 15:22:17.072.
	 Executed 35 tests, with 0 failures (0 unexpected) in 0.039 (0.044) seconds
Test Suite 'ErrorInjectionTests' started at 2021-10-27 15:22:17.072
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testAccountStatusPropagatesErrors]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testAccountStatusPropagatesErrors]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllRecordZones]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllRecordZones]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllRecordZonesAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllRecordZonesAtBackgroundPriority]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllSubscriptions]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllSubscriptions]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllSubscriptionsAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchAllSubscriptionsAtBackgroundPriority]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchCurrentUserRecord]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testFetchCurrentUserRecord]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testQueryPropagatesErrors]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testQueryPropagatesErrors]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecords]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecords]' passed (0.003 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecordsAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecordsAtBackgroundPriority]' passed (0.002 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecordZones]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecordZones]' passed (0.003 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecordZonesAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteRecordZonesAtBackgroundPriority]' passed (0.003 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteSubscriptions]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteSubscriptions]' passed (0.003 seconds).
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteSubscriptionsAtBackgroundPriority]' started.
Test Case '-[CombineCloudKitTests.ErrorInjectionTests testSaveFetchAndDeleteSubscriptionsAtBackgroundPriority]' passed (0.003 seconds).
Test Suite 'ErrorInjectionTests' passed at 2021-10-27 15:22:17.100.
	 Executed 13 tests, with 0 failures (0 unexpected) in 0.027 (0.028) seconds
Test Suite 'ProgressTests' started at 2021-10-27 15:22:17.101
Test Case '-[CombineCloudKitTests.ProgressTests testCompleteIsNotLessThanIncomplete]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testCompleteIsNotLessThanIncomplete]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ProgressTests testCompleteIsNotLessThanItself]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testCompleteIsNotLessThanItself]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ProgressTests testIncompleteIsLessThanComplete]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testIncompleteIsLessThanComplete]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ProgressTests testIncompleteWithLessProgressIsLessThanItself]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testIncompleteWithLessProgressIsLessThanItself]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ProgressTests testIncompleteWithSameProgressIsNotLessThanItself]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testIncompleteWithSameProgressIsNotLessThanItself]' passed (0.000 seconds).
Test Case '-[CombineCloudKitTests.ProgressTests testLessThanZeroPercentEqualsZeroPercent]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testLessThanZeroPercentEqualsZeroPercent]' passed (0.000 seconds).
Test Case '-[CombineCloudKitTests.ProgressTests testMoreThanOneHundredPercentEqualsComplete]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testMoreThanOneHundredPercentEqualsComplete]' passed (0.001 seconds).
Test Case '-[CombineCloudKitTests.ProgressTests testOneHundredPercentEqualsComplete]' started.
Test Case '-[CombineCloudKitTests.ProgressTests testOneHundredPercentEqualsComplete]' passed (0.000 seconds).
Test Suite 'ProgressTests' passed at 2021-10-27 15:22:17.106.
	 Executed 8 tests, with 0 failures (0 unexpected) in 0.005 (0.006) seconds
Test Suite 'CombineCloudKitTests.xctest' passed at 2021-10-27 15:22:17.107.
	 Executed 57 tests, with 0 failures (0 unexpected) in 0.074 (0.083) seconds
Test Suite 'All tests' passed at 2021-10-27 15:22:17.107.
	 Executed 57 tests, with 0 failures (0 unexpected) in 0.074 (0.084) seconds
2021-10-27 15:22:17.370 xcodebuild[6154:54719] [MT] IDETestOperationsObserverDebug: 7.482 elapsed -- Testing started completed.
2021-10-27 15:22:17.370 xcodebuild[6154:54719] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2021-10-27 15:22:17.370 xcodebuild[6154:54719] [MT] IDETestOperationsObserverDebug: 7.482 sec, +7.482 sec -- end

Test session results, code coverage, and logs:
	/Users/caraman/src/CombineCloudKit/Build/Logs/Test/Test-CombineCloudKit-2021.10.27_15-22-09--0700.xcresult

** TEST SUCCEEDED **

caraman@mac ~/s/CombineCloudKit (main)> find . -iname "*.xcresult"
./Build/Logs/Test/Test-CombineCloudKit-2021.10.27_15-22-09--0700.xcresult
caraman@mac ~/s/CombineCloudKit (main)> cd ../xcode-poc/
caraman@mac ~/s/xcode-poc (master)> node generate-codecov-json.js --archive-path ../CombineCloudKit/Build/Logs/Test/Test-CombineCloudKit-2021.10.27_15-22-09--0700.xcresult/
node:child_process:903
    throw err;
    ^

Error: Command failed: xcrun xccov view --file-list --archive ../CombineCloudKit/Build/Logs/Test/Test-CombineCloudKit-2021.10.27_15-22-09--0700.xcresult/
objc[6349]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x1e64e3130) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x109d202c8). One of the two will be used. Which one is undefined.
objc[6349]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x1e64e3180) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x109d20318). One of the two will be used. Which one is undefined.
2021-10-27 15:24:40.966 xccov[6349:57206] Requested but did not find extension point with identifier Xcode.IDEFoundation.IDEResultKitSerializationConverter
Error: Error Domain=XCCovErrorDomain Code=0 "No coverage data in result bundle" UserInfo={NSLocalizedDescription=No coverage data in result bundle}

    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at getFileList (/Users/caraman/src/xcode-poc/generate-codecov-json.js:37:23)
    at Object.<anonymous> (/Users/caraman/src/xcode-poc/generate-codecov-json.js:22:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(855) [Uint8Array] [
      111,  98, 106,  99,  91,  54,  51,  52,  57,  93,  58,  32,
       67, 108,  97, 115, 115,  32,  65,  77,  83, 117, 112, 112,
      111, 114, 116,  85,  82,  76,  67, 111, 110, 110, 101,  99,
      116, 105, 111, 110,  68, 101, 108, 101, 103,  97, 116, 101,
       32, 105, 115,  32, 105, 109, 112, 108, 101, 109, 101, 110,
      116, 101, 100,  32, 105, 110,  32,  98, 111, 116, 104,  32,
       47, 117, 115, 114,  47, 108, 105,  98,  47, 108, 105,  98,
       97, 109, 115, 117, 112, 112, 111, 114, 116,  46, 100, 121,
      108, 105,  98,  32,
      ... 755 more items
    ]
  ],
  pid: 6349,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(855) [Uint8Array] [
    111,  98, 106,  99,  91,  54,  51,  52,  57,  93,  58,  32,
     67, 108,  97, 115, 115,  32,  65,  77,  83, 117, 112, 112,
    111, 114, 116,  85,  82,  76,  67, 111, 110, 110, 101,  99,
    116, 105, 111, 110,  68, 101, 108, 101, 103,  97, 116, 101,
     32, 105, 115,  32, 105, 109, 112, 108, 101, 109, 101, 110,
    116, 101, 100,  32, 105, 110,  32,  98, 111, 116, 104,  32,
     47, 117, 115, 114,  47, 108, 105,  98,  47, 108, 105,  98,
     97, 109, 115, 117, 112, 112, 111, 114, 116,  46, 100, 121,
    108, 105,  98,  32,
    ... 755 more items
  ]
}

Node.js v17.0.1

Xcode 13.1, macOS 12.0.1 (arm64). I've tried iOS, macOS, tvOS, and watchOS destinations.

@drazisil-codecov
Copy link
Contributor

@chris-araman It's very possible Apple changed the file formats again, they seem to do that fairly often. Does the file/directory ../CombineCloudKit/Build/Logs/Test/Test-CombineCloudKit-2021.10.27_15-22-09--0700.xcresult/ exist, at least ?

@chris-araman
Copy link
Author

The directory exists. Is there any particular file pattern I should search for within it?

@drazisil-codecov
Copy link
Contributor

I had to dive back into the rabbit hole we got lost in when we made that 2 years ago. Based on https://developer.apple.com/forums/thread/124329 I think you are looking for a file named result_bundle.xcresult

However, in your case (keep in mind these errors are going from Apple tools, not us) you appear to have a different error.

Error: Error Domain=XCCovErrorDomain Code=0 "No coverage data in result bundle" UserInfo={NSLocalizedDescription=No coverage data in result bundle}

This leads me to believe that it found the files it wanted, but not the content. Stack overflow indicates that you are missing a coverage enabling checkbox somewhere https://stackoverflow.com/questions/33270033/xcode-7-code-coverage-no-coverage-data

Based on the answers it seems there might be 3 different ones.

@chris-araman
Copy link
Author

Doesn't seem to work, or I'm doing something wrong.

😏 I was doing something wrong. This got me on the right track:

swift package generate-xcodeproj
xcodebuild -scheme CombineCloudKit-Package -destination 'id=529F3FC8-EB55-4644-A1B3-01FF1DA6A2BA' -resultBundlePath foo.xcresult -enableCodeCoverage YES test
cd ../xcode-poc/
node generate-codecov-json.js --archive-path ../CombineCloudKit/foo.xcresult/

This generates coverage-report-.json, which seems to show valid file names and line numbers.

abhinavsingh added a commit to abhinavsingh/proxy.py that referenced this issue Nov 4, 2021
* Remove autopep8, is redundant now after recent CI changes

* Add pyenv .python-version to .gitignore

* Update year

* Add lib-pytest target so that pytest can run in isolation

* Add git-push hook which will also run the lint.

By default now git-pre-commit hook will only run pytest.

* Update outdated sections of README

* Update requirement to match setup.cfg install_requires

* Deprecate proxy.start and TestCase.PROXY_PORT

Proxy port during test is now available as self.PROXY.pool.flags.port.
Also now TestCase utilize ephemeral port strategy instead of
calling get_available_port utility method.

* Rename to git-pre-push

* Ideally public repo dont require CODECOV_TOKEN but codecov integration is broken since introduction of codecov-action@v2 (instead of codecov binary invocation)

* Issue is possibly with codecov@v2 action, fallback to codecov.  See https://github.com/abhinavsingh/proxy.py/runs/4110423084\?check_suite_focus\=true and codecov/uploader#223

* Revert back to v2
abhinavsingh added a commit to abhinavsingh/proxy.py that referenced this issue Nov 28, 2021
* Add proxy auth test coverage (#496)

* Cover all proxy auth scenarios

* Add test_proxy_auth_works_with_mixed_case_basic_string

* Update tox from 3.21.3 to 3.21.4 (#497)

* Update autopep8 from 1.5.4 to 1.5.5 (#499)

* Update pylint from 2.6.0 to 2.6.2 (#501)

* Fix mypy errors (#504)

* Update tox from 3.21.4 to 3.22.0 (#502)

Co-authored-by: Abhinav Singh <[email protected]>

* Update mypy from 0.790 to 0.812 (#503)

Co-authored-by: Abhinav Singh <[email protected]>

* Update pylint from 2.6.2 to 2.7.1 (#506)

* Update coverage from 5.4 to 5.5 (#508)

* Update pylint from 2.7.1 to 2.7.2 (#509)

* Update tox from 3.22.0 to 3.23.0 (#510)

* Update twine from 3.3.0 to 3.4.1 (#517)

* Update flake8 from 3.8.4 to 3.9.0 (#514)

* Update autopep8 from 1.5.5 to 1.5.6 (#516)

Co-authored-by: Abhinav Singh <[email protected]>

* Update py-spy from 0.3.3 to 0.3.5 (#522)

* DeepSource: Code quality issues (#523)

* Update pylint from 2.7.2 to 2.7.3 (#524)

* Bump y18n from 3.2.1 to 3.2.2 in /dashboard (#526)

Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pylint from 2.7.3 to 2.7.4 (#527)

* Move wheel package to testing (#531)

* Update pytest from 6.2.2 to 6.2.3 (#532)

* Update flake8 from 3.9.0 to 3.9.1 (#538)

* Update rope from 0.18.0 to 0.19.0 (#539)

* Update pylint from 2.7.4 to 2.8.0 (#540)

* Update pylint from 2.8.0 to 2.8.1 (#541)

* Update pylint from 2.8.1 to 2.8.2 (#542)

* Update autopep8 from 1.5.6 to 1.5.7 (#543)

* Update typing-extensions from 3.7.4.3 to 3.10.0.0 (#544)

* Update pytest from 6.2.3 to 6.2.4 (#545)

* Update tox from 3.23.0 to 3.23.1 (#546)

* Update py-spy from 0.3.5 to 0.3.6 (#547)

* Update flake8 from 3.9.1 to 3.9.2 (#549)

* Bump hosted-git-info from 2.8.5 to 2.8.9 in /dashboard (#548)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.5 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](npm/hosted-git-info@v2.8.5...v2.8.9)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <[email protected]>

* Bump lodash from 4.17.19 to 4.17.21 in /dashboard (#550)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <[email protected]>

* Update pytest-cov from 2.11.1 to 2.12.0 (#552)

* Update py-spy from 0.3.6 to 0.3.7 (#555)

* Bump ws from 7.4.0 to 7.4.6 in /dashboard (#556)

Bumps [ws](https://github.com/websockets/ws) from 7.4.0 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@7.4.0...7.4.6)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pylint from 2.8.2 to 2.8.3 (#558)

* Update pytest-cov from 2.12.0 to 2.12.1 (#561)

* Bump glob-parent from 5.1.1 to 5.1.2 in /dashboard (#564)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](gulpjs/glob-parent@v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pylint from 2.8.3 to 2.9.3 (#573)

* Update tox from 3.23.1 to 3.24.0 (#575)

* Update twine from 3.4.1 to 3.4.2 (#576)

* Update pylint from 2.9.3 to 2.9.5 (#577)

Co-authored-by: Abhinav Singh <[email protected]>

* Update wheel from 0.36.2 to 0.37.0 (#585)

* Update codecov from 2.1.11 to 2.1.12 (#582)

Co-authored-by: Abhinav Singh <[email protected]>

* Update typing-extensions from 3.10.0.0 to 3.10.0.2 (#599)

* Update pytest from 6.2.4 to 6.2.5 (#598)

Co-authored-by: Abhinav Singh <[email protected]>

* Update tox from 3.24.0 to 3.24.3 (#592)

Co-authored-by: Abhinav Singh <[email protected]>

* Update pylint from 2.9.5 to 2.10.2 (#591)

Co-authored-by: Abhinav Singh <[email protected]>

* Bump path-parse from 1.0.6 to 1.0.7 in /dashboard (#586)

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <[email protected]>

* Update py-spy from 0.3.7 to 0.3.9 (#604)

* Update rope from 0.19.0 to 0.20.1 (#611)

* Update pylint from 2.10.2 to 2.11.1 (#609)

Co-authored-by: Abhinav Singh <[email protected]>

* Update tox from 3.24.3 to 3.24.4 (#607)

Co-authored-by: Abhinav Singh <[email protected]>

* add paramiko types for mypy compliance (#613)

* Update py-spy from 0.3.9 to 0.3.10 (#616)

* Update coverage from 5.5 to 6.0 (#618)

* Update pytest-cov from 2.12.1 to 3.0.0 (#619)

* Update types-paramiko from 2.7.0 to 2.7.1 (#620)

* Update coverage from 6.0 to 6.0.1 (#623)

* Update paramiko from 2.7.2 to 2.8.0 (#624)

* Update coverage from 6.0.1 to 6.0.2 (#628)

* Update types-paramiko from 2.7.1 to 2.7.2 (#629)

* Update types-paramiko from 2.7.2 to 2.7.3 (#630)

* Update rope from 0.20.1 to 0.21.0 (#631)

* Update flake8 from 3.9.2 to 4.0.1 (#627)

Co-authored-by: Abhinav Singh <[email protected]>

* Add support for 3.10 (#637)

* Add support for 3.10

* Upgrade to v2 actions

* v3.4.0 (#638)

* Build docker from 3.10-alpine

* Bump version to 3.4.0

* Add instructions for how to run dashboard

* Order of menu

* Override dashboard png path until submitted

* Add some doc string for top-level Proxy class.  Also some TODOs and warnings regarding PID file overwrite

* Allow HttpProxyBasePlugin implementations to register custom descriptors for read/write events

* Remove hardcoded adblock regex into json config. Update upstream filter to block facebook, not google

* ProxyPoolPlugin and ReverseProxyPlugin must now be updated to use get/read/write descriptor APIs

* Add get/read/write descriptor API for HttpWebServerBasePlugin too

* Surface actual listening port via flags.port

* Update autopep8 from 1.5.7 to 1.6.0 (#632)

Co-authored-by: Abhinav Singh <[email protected]>

* Fix the `typing_extensions` runtime dependency version (#641)

* Only use `typing_extensions` below Python 3.8

* Rely on unconstrained `typing-extensions` version

* Update coverage from 6.0.2 to 6.1 (#640)

Co-authored-by: Abhinav Singh <[email protected]>

* Fix path to dashboard.png (#643)

* [ImgBot] Optimize images (#644)

*Total -- 1,253.27kb -> 774.20kb (38.23%)

/Dashboard.png -- 1,072.21kb -> 617.66kb (42.39%)
/ProxyPy.png -- 56.83kb -> 38.15kb (32.86%)
/shortlink.gif -- 124.23kb -> 118.39kb (4.7%)

Signed-off-by: ImgBotApp <[email protected]>

Co-authored-by: ImgBotApp <[email protected]>

* Update coverage from 6.1 to 6.1.1 (#646)

* Async proxy pool, Event manager, Custom access log, Expose loop to plugins (#645)

* Async proxy pool

* Async proxy pool

* Late upstream initialization and exception guards

* Close upstream proxy connection on client connection close

* Refactor into EventManager

* Fix tests accounting in the event manager

* Ensure each process initializes logger

* pragma no cover

* Teardown connection when proxy pool upstream proxy closes

* Add ability to customize access log format and add additional context to it

* Maintain total size for response bytes in access logs

* Fix tests broken due to new plugin methods missing mock

* Update pubsub_eventing to use EventManager to avoid entire bootstrapping step

* Add tox envs for building dists via PEP 517 (#647)

* Invoke self-install via PEP517 in the CI

* Add tox envs for building dists via PEP 517

* Add linting dists via tox to GHA

* Upgrade `master` to `develop` in `setup.py`

* Simplify `python_requires` in `setup.py`

* Convert dynamic `setup.py` into static `setup.cfg`

* Revert "Upgrade `master` to `develop` in `setup.py`" (#650)

This reverts commit 06f6f56.

* Add a no-op check job to GHA for branch protection (#652)

This patch adds an "empty" job that depends on all the important ones
making it possible to use just this `check` job in the branch
protection settings. This reduces the maintenance burden by preventing
the need to update these settings on any changes to the job
declarations.

* Add a config for YAMLLint (#653)

Co-authored-by: Abhinav Singh <[email protected]>

* Add a config for flake8 (#654)

Co-authored-by: Abhinav Singh <[email protected]>

* Correct spelling mistakes caught by `codespell` (#656)

Co-authored-by: Abhinav Singh <[email protected]>

* Add a config for pylint (#655)

* Add an initial auto-generated PyLint config

* Align pylint line length settings in with flake8

* Colorize the pylint report output

* Disable all currently violated PyLint rules

Co-authored-by: Abhinav Singh <[email protected]>

* Organize the linting setup around tox+pre-commit (#657)

* Add a no-op check job to GHA for branch protection

This patch adds an "empty" job that depends on all the important ones
making it possible to use just this `check` job in the branch
protection settings. This reduces the maintenance burden by preventing
the need to update these settings on any changes to the job
declarations.

* Add a config for YAMLLint

* Add a config for flake8

* Add an initial auto-generated PyLint config

* Align pylint line length settings in with flake8

* Colorize the pylint report output

* Correct spelling mistakes caught by `codespell`

* Disable all currently violated PyLint rules

* Start managing the linters setup with pre-commit

Co-authored-by: Abhinav Singh <[email protected]>

* Enable yamllint for all previously ignored files (#658)

* Add autocancellation of the stale PR GHA jobs (#663)

Co-authored-by: Abhinav Singh <[email protected]>

* Update twine from 3.4.2 to 3.5.0 (#665)

Co-authored-by: Abhinav Singh <[email protected]>

* Enable the `add-trailing-comma` pre-commit fixer (#661)

Co-authored-by: Abhinav Singh <[email protected]>

* Migrate the pytest invocation to `tox` (#662)

* Fix the `commands` setting in the tox config

* Wire up `pytest` invocations via tox

* Pre-install mypy deps in `pre-commit.ci` (#666)

Co-authored-by: Abhinav Singh <[email protected]>

* Fix the YTT201 flake8 violation (#667)

This approach makes sure that if there's ever Python 4, it wouldn't
fall back to the Python 2 behavior silently.

Co-authored-by: Abhinav Singh <[email protected]>

* Make names in the GHA lib workflow short (#669)

Co-authored-by: Abhinav Singh <[email protected]>

* Update outdated sections of the codebase (#670)

* Remove autopep8, is redundant now after recent CI changes

* Add pyenv .python-version to .gitignore

* Update year

* Add lib-pytest target so that pytest can run in isolation

* Add git-push hook which will also run the lint.

By default now git-pre-commit hook will only run pytest.

* Update outdated sections of README

* Update requirement to match setup.cfg install_requires

* Deprecate proxy.start and TestCase.PROXY_PORT

Proxy port during test is now available as self.PROXY.pool.flags.port.
Also now TestCase utilize ephemeral port strategy instead of
calling get_available_port utility method.

* Rename to git-pre-push

* Ideally public repo dont require CODECOV_TOKEN but codecov integration is broken since introduction of codecov-action@v2 (instead of codecov binary invocation)

* Issue is possibly with codecov@v2 action, fallback to codecov.  See https://github.com/abhinavsingh/proxy.py/runs/4110423084\?check_suite_focus\=true and codecov/uploader#223

* Revert back to v2

* Make pytest emit XML coverage (#673)

This patch should make GHA report coverage to codecov properly.

* CustomDnsResolver plugin, CloudflareDnsResolver plugin, Allow plugins to configure network interface (#671)

* Add CustomDnsResolver plugin.  Addresses #535 and #664

* Add cloudflare DNS resolver plugin

* Lint fixes

* Add tests for missing core modules (#674)

* Rename is_py3 to is_py2 for more logical guard

* Add stubs for missing tests, add few more tests for core modules

* Lint fixes

* Line too long fix

* Remove unnecessary KeyboardInterrupt

* Consistent workflow names

* Update homebrew formulae.  Doesnt seems to work now

* test_enable_dashboard and test_enable_events

* test_enable_dashboard and test_enable_events

* Fix problem where empty plugin string was passed as plugin module

* test_enable_devtools and remove redundant guards for None and "" which was there due to a bug

* Use core loop for reverse proxy async IO operations (#675)

* Make reverse proxy plugin use proxy.py core loop for async io operations

* Address lint errors

* Deprecate on_websocket_close and replace with on_client_connection_close

* Lint fixes

* Retry on SSLWantReadError and SSLWantWriteError

* Collect coverage for `tests/` (#677)

This is necessary to make sure all the tests actually get executed
somewhere and allows finding dead code in this area.

* Allow pylint to utilize all available CPU cores (#676)

This is a nice addition to the linter's responsiveness.

Co-authored-by: Abhinav Singh <[email protected]>

* Add a config for Coverage.py (#679)

* Add a config for pytest (#680)

* Ignore a `DeprecationWarning` in `pytest` config (#683)

This was added in Python 3.10 and needs to be dealt with properly.

* Adopt BaseTcpServerHandler within HttpProtocolHandler (#681)

* Rename .server to .upstream

* Lint fixes

* Mark internal methods with _ prefix

* Fix broken test

* lint changes

* Wah, double client :D

* Avoid selector initialization for threadless mode

* remove unused imports

* Now HttpProtocolHandler implements BaseTcpServerHandler

* Consistent return and guard againt upstream.closed

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* AcceptorPool as context manager

* Group multiprocessing imports together

* Use com.jaxl bundle identifier as proxy.py will eventually move under jaxl org

* revisit devtools integration :)

* Emit all necessary events for devtools integration

* Lint fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Inline the dist description in pkg metadata (#684)

This is necessary because setuptools is about to deprecate supporting
LF in one-line metadata fields.

Co-authored-by: Abhinav Singh <[email protected]>

* Add a pytest-based test for catching import loops (#678)

Co-authored-by: Abhinav Singh <[email protected]>

* Test built artifacts in the CI instead of Git src (#682)

This approach helps make sure that what is tested in the project is
the same as what the end-users get installed on their machines. It
will catch failures to include important failes into the packages that
get uploaded to PyPI.

Co-authored-by: Abhinav Singh <[email protected]>

* Fix python 3.10 @ ubuntu pytest ignore (#685)

* Use suggested fix in #683 to remove pytest ignore

* Handle should not flush now which can block, instead let base tcp handler do its magic

* test speed up, doc string, logging enhancements

* Move macOS to the end of workflows

* Fix mypy warnings

* must_flush_before_shutdown until entire client buffer has been flushed (#686)

* Readme Updates (#687)

* FilterByUpstreamHostPlugin now uses facebook as example

* Advertise that cloudflare plugin require httpx library

* Advertise Dashboard as WIP

* More clarity around how plugins can be loaded

* Advertise how to get direct access to Chrome DevTools websocket endpoint

* Move plugin developer and contributor guide below the fold

* Update README.md

Co-authored-by: Sviatoslav Sydorenko <[email protected]>

* bash to console and consistent prompt sign

* Remove pytest commented out ignore clause

* Add dummy CustomNetworkInterface plugin documentation

Co-authored-by: Sviatoslav Sydorenko <[email protected]>

* Response bodies can be empty or missing + HttpParser refactoring (#688)

* Responses can have None body, remove assertions, update modify chunk plugin to not modify chunks for responses with no content

* Address mypy warning after removing assertion

* Reusable get_body_or_chunks

* Order methods by public/private, mark private ones with _ prefix

* HttpParser.url deprecation notice (renamed to _url).  Add zero-copy todo

* [ModifyChunkResponsePlugin] Only bail out of body is not expected (#690)

* DEFAULT_CA_FILE is now certifi/cacert.pem (#691)

* Add FAQ: OSError when wrapping client for TLS Interception

* Silence exception log for several valid "cert verification failed" by client during tls interception

* Lint checks

* Move exception handling within wrap_server/wrap_client methods

* Lint fixes

* Use certifi/cacert.pem as default --ca-file flag value

* Address tests after DEFAULT_CA_FILE change

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Expose pre-commit tool hooks execution times (#692)

* Work (#693)

* Refactor work acceptor and executor

* Lint fixes

* Fix expression-not-assigned pylint error

* Pool (#694)

* Refactor pool

* mypy fixes

* Fix import (relative)

* Add WebScraper example skeleton & ConnectionPool skeleton

* Add ConnectionPool class

* Integrate ConnectionPool with proxy server (experimental)

* Lint fixes

* Remove unused imports. TODO: Put pool behind a flag. Default to false for now

* Make ConnectionPool multiprocess safe.  Later we want to make it safe but without using locks

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove unused imports

* Return created flag from acquire

* Guard connection pool behind --enable-conn-pool flag

* Flag belongs within connection pool class

* spelling

* self.upstream = None only for pool config

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Top-level notion of work not client (#695)

* Top-level notion of work not client

* Update ssl echo server example

* Rename `Proxy.initialize` as `FlagParser.initialize` (#696)

* Move Proxy.initialize within FlagParser.initialize.  Also move other staticmethods from within proxy class into utils

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused imports

* Fix `import-outside-toplevel` error

* add `make lib-flake8` and `make lib-mypy` targets

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add a `--unix-socket-path` flag (#697)

* Add a `--unix-socket-path` flag.

When available `--hostname` and `--port` flags are ignored.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* `print` statement is allowed only in `flags.py` and `version-check.py`.  All other places must use a `logger` instance

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add guard for `AF_UNIX` on Windows

* Comment out assertion on Windows for now

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Trigger workflows only when necessary file changes are detected (#699)

* Trigger workflows only when necessary file changes are detected

* Address yamllint

* Trigger workflows even when workflow file itself is changed

* Also include `examples` directory, may be one day we will have tests for them

* `brew` and `docker` workflows must also only execute for python file changes.  This will skip them for pure README.md changes

* Execute `lib` workflows for package artifact changes

* Disable static web server test on GHA environment (flaky on Ubuntu) (#700)

* Add `lib-dep` makefile target (#701)

* Put core flags where they belong (#702)

* Move flags to where they belong

* Move `get_default_plugins` within FlagParser as it depends upon args

TODO: We need plugin dependency system

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update types-paramiko from 2.7.3 to 2.7.4 (#704)

* Fix `--enable-dashboard` flags (#707)

* Expose within __all__

* Enable `--numprocesses=auto` for `pytest.ini`

* make lib-lint

* Also consider `--plugins` flag when bootstrapping plugins

* Add `from .dashboard import ProxyDashboard` in top-level `__init__.py` to make `ProxyDashboard` flags auto discoverable

* Move `--enable-dashboard` to top-level

* Move logging utility within `Logger` class

* Consider comma separated --plugin and --plugins during discover_plugins

* Refactor plugin related utilities in Plugins module

* mypy and lint

* Fix unused import

* Safe to use tempdir on Github actions to avoid race conditions???

* pki (generically disk based file) based tests are flaky on macOS under parallel execution

* Move pid file write/remove within `AcceptorPool` (#708)

* Move pid file write/remove within AcceptorPool

* Remove unused

* `EventManager` is also a context manager (#709)

* `EventManager` is also a context manager

* unused

* Rename `EventManager.event_queue` to `EventManager.queue`

* `--threadless` default for `Python 3.8+` on `mac` and `linux` (#710)

* Explicit `multiprocessing.Manager.shutdown`

Multiprocessing manager is used within eventing core. From doc,
it appears to start a BaseManager which starts a server????
Seriously???? Anyways, using multiprocessing manager is a PITA
and mistake, as it doesn't even give us performance we expect.
Our proxy server can handle more requests than what multiprocess
manager can exchange between processes.

* `--threadless is now ON by default for `Python 3.8+` on `mac` and `linux` environments

* Clarity around why multiprocessing.Manager must be deprecated

* Add `--threaded` flag which can be used to fallback for environments where `--threadless` is now default

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* never used

* Update README

* Use `threaded=True` in tests which were written for threaded model

* Fix issue where sharing manager between global event queue and subscriber can lead to TypeError

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* `OP_NO_TLSv1_1` by default for upstream connection negotiations (#712)

* print mode via acceptor pool

* `OP_NO_TLSv1_1` by default for upstream connection negotiations. Fixes #639

* Proper fix for flaky static web server test.

Diff in payload was due to a different compression algorithm being used.

* mypy fixes

* Add more context in intro (#713)

* Add more context in intro

* Take another pass

* Add threadless in log section

* Add an explicit config for darglint (#717)

* Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714)

* Allow overriding work_klass via Proxy context manager kwargs

* Decouple acceptor and executor pools

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add `--num_acceptors` flag and better load balancing

* Remove unused

* Lint errors

* Another arg not kwarg

* Move start work staticmethods within ExecutorPool

* mypy fixes

* Update README with `--num-acceptors` flag

* Rename `Proxy.pool` to `Proxy.acceptors`

* Add SetupShutdownContextManager abstraction

* Match --num-acceptors logic with PR description

* Rename executor utility methods and add docstring

* Remove work_klass from constructors and pass it via flags

* Update docstring for pools as they no longer accept a work_klass argument

* Turn work_klass into a flag.  main() no longer accepts input_args (only kwargs opts).  Similarly, Proxy doesnt accept any input_args now (only kwargs opts)

* Expose default work klass in README

* Expose `HttpProtocolHandler` and `HttpProtocolHandlerPlugin` within `proxy.http` module

* Start to fix tests

* Fix tests

* mypy and flake8

* Trailing comma

* Remove unused var

* Unused arg

* uff

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update badges to match new GHA workflows (#718)

* Add `Listener`, Web server close on header, use `Pipe` instead of `Manager` in eventing core (#720)

* Abstract out a Listener class

* unused

* Use connection instead of manager queue

* For web close connection of client requested via headers

* Remove eventing WIP module

* Sub and Unsub ack

* Fix tests

* mypy and flake8

* comma

* Move callback within EventSubscriber constructor

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Skip test_unix_path_listener on Windows

* Spelling fix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Test cov (#721)

* nocover for abstract classes

* Add event manager test

* Assert call args

* Sponsored by `Jaxl Innovations Private Limited`

* Allow `--plugins` flag to be used multiple times (#725)

* deprecate server_file_or_404

* Optionally compress static content.  Currently only if content length higher than 300

* trailing comma

* Allow `--plugins` flag to be used multiple times

Following are valid invocation:
1) `--plugins A`
2) `--plugins A,B`
3) `--plugins A --plugins B`
4) `--plugins A,B --plugins C`

* mypy

* Flake8

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* correct type

* Add `HttpParser.is_https_tunnel()` utility method

* mypy

* lint checks

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add `--proxy-pool` flag (#727)

* Add `--proxy-pool` flag

* lint checks

* Custom Url Parser (#730)

* Custom Url parser for our needs

* lint fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix proxy_pool plugin as scheme can be None if not present in the Url

* Address the ambiguous ipv6:port scenario along with valid cases

* lint checks

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* docstring

* Abstract into `http.parser` module

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix #398 HTTP/1.0 related issue

* lint checks

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add more info in log context (#732)

* Provide more info in log context, ideally we could just pass client/upstream/request/response objects but for now passing dict is ok

* lint checks

* Allow `access_log` format override by web plugins (#733)

* Return DEFAULT_404_RESPONSE by default from static server when file doesnt exist

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix web server with proxy test

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add `--auth-plugin` flag to override default basic auth plugin (#734)

* Allow override of `--auth-plugin`.

This can be used in scenarios where a hardcoded `--basic-auth`
credentials cannot be used across all your users.  May-be you
want to connect to a database before authorizing the request.
For all such scenario, disable in-build default auth plugin
by providing `--auth-plugin` flag.

* Allow usage of `--auth-plugin` flag without having to provide `--basic-auth` flag.  When `--basic-auth` flag is used, default auth plugin will load.  When `--basic-auth` and `--auth-plugin` flag is used, custom auth plugin will load

* Address test_main broken after auth_plugin flag

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README

* Fix long line

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Switch versioning to be SCM-based (#715)

Co-authored-by: Abhinav Singh <[email protected]>

* `--enable-proxy-protocol` : HAProxy Protocol v1 (#735)

* Introduce `--haproxy-protocol` flag

* Complete proxy protocol v1 implementation, enable using `--enable-proxy-protocol` flag

* link checks

* Advertise support for haproxy protocol in readme

* Add make target `lib-scm-version`

* `make lib-version` is now `make lib-check`

* Dont enforce -dev part of version within README

* Add provision to update readme flags using check

* Wrap help text within console

* Add closing ticks

* Remove verbose logging and update homebrew formulae (may be fixed?)

* Reuse a pre-existing `version_tuple` from SCM

* No abstract method for proxy plugin (#738)

* Remove abstractmethod for proxy plugin base class, remove unused methods from bundled plugins

* Move httpStatusCodes, httpMethods and Url within top-level proxy.http package

* Implement publishing via GHA (#716)

* Enable release-testpypi (#741)

* Fix dist version in CI/CD on pushes to `develop` (#743)

* Fix homebrew formulae URL to install from git and not zip because of scm changes (#744)

* Add an example of loading external plugins

* Move GHA e2e integration job to pytest (#746)

Co-authored-by: Abhinav Singh <[email protected]>

* Make Git archives `setuptools-scm` compatible (#737)

Co-authored-by: Abhinav Singh <[email protected]>

* Add initial Sphinx docs

* Handle invalid/malformed data from clients in HttpParser (#740)

* add validation in _process_line in parser.py

add validation in _process_line in proxy/http/parser/parser.py

* quick fail when parsing request

quick fail when parsing request
add test case for parsing invalid http request

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unnecessary checks and empty line

remove unnecessary checks and empty line

* minor fix

minor fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* solve exception expression conflict

solve exception expression conflict

* use NotImplementedError temporary measure

use change HttpProtocolException to NotImplementedError for a temporary
measure

* change exception type in test

change exception type in test

* remove unnecessary import

remove unnecessary import

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <[email protected]>
Co-authored-by: Abhinav Singh <[email protected]>

* Add all IANA assigned HTTP method names (#751)

* Ignore `docs/_build`

* Remove `v` prefix from VERSION.  Also added a `lib-doc` target

* Raise a `ValueError` instead of `NotImplementedError`

* Add all registered http method verbs

* Generate `_scm_version.py` on every `make` invocation.  Fix `v` prefix bug.

* `+proxy` for emails

* Make explicit that this script writes to file

* `PROXY_AGENT_HEADER_VALUE` still needs the `v` :)

* Fix Makefile to use tox for docs (#752)

* Fix Makefile to use tox for docs

* Resolve `open` based upon operating system

Co-authored-by: Abhinav Singh <[email protected]>

* Include GitHub's CoC and security in Sphinx docs (#755)

Co-authored-by: Abhinav Singh <[email protected]>

* Add community contribution guidelines (#757)

* [IntegrationTest] Use `127.0.0.1` as target address and a random port (#756)

* Use `127.0.0.1` as target address and a random port

* Fix spellcheck-docs

* Transparent `ProxyPy.png` (#759)

* Add `TcpUpstreamConnectionHandler` class (#760)

* Add `TcpUpstreamConnectionHandler` which can be used as standalone or as mixin

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* `TcpUpstreamConnectionHandler` is now an abstract class

* Fix mypy

* `nitpick_ignore` the `proxy.core.base.tcp_upstream.TcpUpstreamConnectionHandler` class

* Add mypy exception for now

* Fix flake

* Fix docstring

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add `.vscode` settings (#761)

* Added `DEFAULT_SELECTOR_SELECT_TIMEOUT` (#762)

* Enhancements (#763)

* Update `make lib-profile`

* Optimize `utils.find_http_line`

* Pass work to executors within their own multiprocessing lock

* Fix tests

* Add `(_py_class_role, Url)` to fix rtfd :D

* Run push workflow only for push to master and develop branch (#764)

* Run push workflow only for push to master and develop branch

* remove comments from `settings.json`

* Single workflow (#765)

* To optimize pull all workflows within check guard

* give space between version and to

* Move all other workflow under `other-checks` guard

* Dont run brew/dashboard/docker until lib checks have passed

* Additional check bridging slows it down

* Name diff via emoji

* More emojis

* 🐳

* Per GitHub it will try to maximize, lets fallback to GHA behavior

* False position (not indented)

* Remove tagline from readme, its in hero image now

* Remove badge for deprecated workflows

* [ImgBot] Optimize images (#766)

/ProxyPy.png -- 985.28kb -> 884.17kb (10.26%)

Signed-off-by: ImgBotApp <[email protected]>

Co-authored-by: ImgBotApp <[email protected]>

* Acceptors performance (#767)

* Use threads for delegation. Now `run_once` lock before `accept` not `select`

* Add support to use master proxy within proxy pool plugin.  When used, proxy pool plugin will be a no-op for the master node

* Fix acceptor tests now that mask is being used

* Use `cached_property` for web server routes

* Use `select(timeout=1)` otherwise acceptor wont join if total blocking

* mypy, flake, doc spell fixes

* R0205: Class `cached_property` inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)

* Include contributing guidelines in Sphinx docs (#771)

* Fix tox invocation in the doc make target (#772)

Co-authored-by: Abhinav Singh <[email protected]>

* Declare project URLs in Python package metadata (#778)

* Declare project URLs in Python package metadata

* Add link to GHA discussions

Co-authored-by: Sviatoslav Sydorenko <[email protected]>

Co-authored-by: Abhinav Singh <[email protected]>

* Async `get_events`, `handle_event`, `handle_readables`, `handle_writables` (#769)

* Asynchronous `handle_event` and `LocalExecutor` thread

* Bail out on first task completion

* mypy

* Add `helper/benchmark.sh` and fix threaded which must now use asyncio (reduced performance of threaded)

* Print open file diff from `benchmark.sh`

* Add `--local-executor` flag, disabled by default for now until tests are updated

* Async `handle_readables` and `handle_writables` for `HttpProtocolHandlerPlugin` interface (doesnt impact proxy/web plugins for now)

* Async `get_events`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address tests after async changes

* mypy and flake8

* spelldoc

* `check.py` and trailing comma

* Rename to `_assertions.py`

* Add missing `pytest-mock` and `pytest-asyncio` deps

* Add `pytest-mock` to `pylint` deps

* Correct use of `parameterize` and add `PT007` to flake8 ignores

* Fix mypy hints broken for `< Python3.9`

* Remove usage of `asynccontextmanager` which is not available for all Python versions that `proxy.py` supports

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix for pre-python-3.9 versions

* `AsyncTask` apis `set_name` and `get_name` are not available on all supported versions

* Install setuptools via `lib-dep` until we recommend editable install

* Deprecate support for `Python 3.6`

* Use recommendation suggested here https://github.com/abhinavsingh/proxy.py/pull/769\#discussion_r753840929

* Address recommendation here https://github.com/abhinavsingh/proxy.py/pull/769\#discussion_r753841906

* Make `Threadless` agnostic of `multiprocessing.Process`

* Acceptors must dispatch to local executor in non-blocking fashion

* No daemon for executor processes and fix shutdown logic

* Only return fds from `_selected_events` not all events data

* Refactor logic

* Prefix private methods with `_`

* `work_queue` and not `client_queue`

* Turn `Threadless` into an abstract executor. Introduce `RemoteExecutor`

* Make `LocalExecutor` agnostic of `threading.Thread`

* `LocalExecutor` now implements `Threadless`

* `get_events` and `get_descriptors` now must return int and not sock.  `Threadless` now avoids repeated register/unregister and instead make use of `selectors.modify`

* Fix `main` tests

* Apply suggestions from code review

Co-authored-by: Sviatoslav Sydorenko <[email protected]>

* Apply code review recommendations manually

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert back `Any` and use `addr or None`

* Address `flake8`

* Update tests to use `fileno`

* Fix doc build

* Fix doc spell, use tear down and not teardown

* Doc updates

* Add back support for `Python 3.6`

* Acceptors dont need loop initialization

* On Python 3.6 `asyncio.new_event_loop()` is necessary

* Make doc happy

* `--threaded` needs a new event loop for 3.7 too

* Always use `asyncio.new_event_loop()` for threaded mode

Added e2e integration tests (subprocess & curl) for all modes.

* Lint fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <[email protected]>

* Prune unnecessary directories from `sdist` package (#779)

* Prune unnecessary directories from `sdist` package

* Remove `LICENSE` & `README.md` from `MANIFEST.in`

Co-authored-by: Sviatoslav Sydorenko <[email protected]>

* Explicitly ignore top-level images and include `.github` folder

Co-authored-by: Sviatoslav Sydorenko <[email protected]>

* Use proper email for the Git user in GHA (#781)

* Use proper email for the Git user in GHA

* Use an action to set the GHA user in Git

* Publish a GitHub Release after tagging (#782)

Co-authored-by: Abhinav Singh <[email protected]>

* Create `dependabot.yml` (#783)

* Create dependabot.yml

* Lint fixes

* Yamllint

* Reviewers fix

* Optimize (#780)

* Optimize `find_http_line` which is in critical path

* Update benchmark results

* Keep the loop hot, TCP no delay, cleanup inactive check periodically

* Check for shutdown signal with tick

* Use non-reentrant `NonBlockingQueue` implementation instead of `queue.Queue`

* Fix listener test

* lint and doc

* Convert `recv` errors as warnings and not exceptions (#787)

* Update codecov config to include separate tests and lib sub-projects (#788)

* Update codecov config to include separate tests and lib sub-projects

* Yaml lint

* Bump actions/cache from 2.1.5 to 2.1.7 (#784)

Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](actions/cache@v2.1.5...v2.1.7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <[email protected]>

* pip prod(deps): bump rope from 0.21.0 to 0.22.0 (#785)

Bumps [rope](https://github.com/python-rope/rope) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/python-rope/rope/releases)
- [Changelog](https://github.com/python-rope/rope/blob/master/CHANGELOG.md)
- [Commits](python-rope/rope@0.21.0...0.22.0)

---
updated-dependencies:
- dependency-name: rope
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <[email protected]>

* npm: bump chrome-devtools-frontend in /dashboard (#786)

Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.827632 to 1.0.944903.
- [Release notes](https://github.com/ChromeDevTools/devtools-frontend/releases)
- [Changelog](https://github.com/ChromeDevTools/devtools-frontend/blob/main/docs/release_management.md)
- [Commits](https://github.com/ChromeDevTools/devtools-frontend/commits)

---
updated-dependencies:
- dependency-name: chrome-devtools-frontend
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <[email protected]>

* pip prod(deps): bump types-paramiko from 2.7.4 to 2.8.1 (#799)

Bumps [types-paramiko](https://github.com/python/typeshed) from 2.7.4 to 2.8.1.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-paramiko
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* npm: bump eslint-plugin-import from 2.22.1 to 2.25.3 in /dashboard (#798)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.22.1 to 2.25.3.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.22.1...v2.25.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Build docker container for all linux target architectures`386`, `amd64`, `arm/v6`, `arm/v7`, `arm64/v8`, `ppc64le`, `s390x` (#797)

* Fixes #768

* buildx build

* We need `setuptools_scm` to run `Makefile`

* Build `docker` container using `wheel`

* Download package distribution

* Adjust supported platforms

* Alpine only supports v6

* .

* May-be fix `lsb_release`

* Enable `multiarch` env for docker buildx

* Deprecate `DOCKER_IMAGE_TAG` which removes `write-scm-version.py` dependency.  Also pass targetplatform as an argument to `container-buildx` make target

* Remove `setuptools_scm` dep for docker workflow step

* woof

* Match all target platforms to match `python-alpine` docker

* yamllint

* Use `yamllint disable rule:line-length` for `Dockerfile`

* Tag the container using `dist-version`

* Replace + with . for dev version tag

* Add `PROXYPY_CONTAINER_VERSION` step

* Fix publishing a GitHub Release from GHA (#811)

* pip prod(deps): bump coverage from 6.1.1 to 6.1.2 (#813)

Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.1.1 to 6.1.2.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@6.1.1...6.1.2)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix matching requested version with Git tag in GHA (#815)

* Fix the tagging condition in GHA build job (#816)

* Publish to TestPyPI from the release request jobs (#819)

* Handle `KBI` (#821)

Co-authored-by: pyup.io bot <[email protected]>
Co-authored-by: Aksh Gupta <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <[email protected]>
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: JerryKwan <[email protected]>
@drazisil-codecov drazisil-codecov changed the title New uploader is unable to find and upload coverage reports from Xcode [CODE-874] New uploader is unable to find and upload coverage reports from Xcode Feb 1, 2022
@drazisil-codecov drazisil-codecov added selected for development Used for issues that the codecov team is/will be actively working on and removed question Further information is requested labels Feb 1, 2022
@ggilley
Copy link

ggilley commented Feb 3, 2022

Any update on this? All my coverage reports say 0%

@drazisil-codecov
Copy link
Contributor

Any update on this? All my coverage reports say 0%

It's in progress. You can use the commands in this comment #223 (comment) as a workaround for now.

@bobergj
Copy link

bobergj commented Jun 21, 2022

Is there an update on this? I see a more recent related issue #803 where there's a "Running Xcode conversion..." step in the output log of the uploader. When using the latest CircleCI orb I don't see that step, instead seeing the error "There was an error running the uploader: No coverage files located, please try use -f, or change the project root with -R".

@gdelarosa
Copy link

gdelarosa commented Aug 30, 2022

Any update on this? Using the new uploader fails to find coverage reports from Xcode. Tried this tutorial but I was not able to complete it due to "missing files". https://about.codecov.io/blog/code-coverage-for-ios-development-using-swift-xcode-and-github-actions/

@dsk1306
Copy link

dsk1306 commented Aug 31, 2022

@gdelarosa The uploader works fine for me with Bitrise step and additional options set to --xcode --xcodeArchivePath $BITRISE_XCRESULT_PATH. You just need to make sure you provide the correct path to the .xcresult file and that it contains coverage data.

@gdelarosa
Copy link

Thank you for the response @dsk1306. I may be using the wrong path to the .xcresult so I'll circle back and try again with what you've suggested.

@thomasrockhu-codecov
Copy link
Contributor

thomasrockhu-codecov commented Mar 24, 2023

Hi everyone and @chris-araman, I pushed a new version 0.4.0 of the uploader. We haven't made the change to the GitHub Action, but I wanted to let you know that you should be able to use the --xs and --xsp [project] arguments to upload coverage reports.

I'm going to close this issue out, but if it's still an issue, please open a new one so that we can get things fixed

Also, special thanks to your repo @chris-araman, as it was pivotal in getting this working (see underneath the covers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
selected for development Used for issues that the codecov team is/will be actively working on
Projects
None yet
Development

No branches or pull requests

9 participants