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

Support for xcresult-based uploads in v4. #1367

Open
Supereg opened this issue Apr 10, 2024 · 5 comments
Open

Support for xcresult-based uploads in v4. #1367

Supereg opened this issue Apr 10, 2024 · 5 comments
Assignees
Labels
Area: Report Upload Issues with pre-ingest report uploading bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months

Comments

@Supereg
Copy link

Supereg commented Apr 10, 2024

Problem

We found that tokenless uploads using action v3 are essential broken since Friday (e.g., see https://github.com/StanfordBDHG/LLMonFHIR/actions/runs/8592479578/job/23631941264).
This encouraged to explore an upgrade to the v4 action using organization wide tokens (nice feature btw). However, we quickly found that the xcode and xcode_archive_path options were completely removed from v4 without clear instructions on how to migrate.

So our question is, what are the drop in replacements for the xcode and xcode_archive_path options with v4? Are xcresult-based coverage uploads still supported (if so, how?) or were they just silently removed?
We would highly appreciate respective migration guides or according documentation for the most prominent use cases as both are currently completely missing.

I tired my best to provide you the best possible overview of our current situation and hope you can provide helpful feedback and point us towards the next steps.

Current Workflow

To highlight our current workflow:

  • We have build and test n actions each producing a .xcresult file with collected code coverage.
  • All of these files are uploaded as GitHub artifacts
  • Once all steps completed successfully, a new GitHub Actions Job runs to collect all artifacts from previous build steps, merge all coverage reports using xcrun xcresulttool merge ... creating a new CodeCoverage.xcresult.
  • Previously we used the codecov action with xcode: true and xcode_archive_path: CodeCoverage.xcresult options to upload the coverage report. This step is seemingly not possible anymore.

What we've tried

I tried to explore how such interactions are handled with v4. CLI options seem to mention some form of xcode plugin to be available (see https://docs.codecov.com/docs/cli-options#do-upload). The Supported Coverage Report Formats also still seem to mention some txt-based Xcode code coverage format. Also, when running codecovcli locally it randomly pulls code coverage reports from all, completely unrelated Xcode projects in derived data into the current directory (Not sure if that is the intended new way?). This doesn't work with our current workflow, as we don't have the derived data available (also we don't use the global derrivedData directory), as we have a dedicated step to assemble a self-contained xcresult package.

Attempts that failed

I have tried to manually convert the code coverage report of a xcresult package into a format that codecov understands. Simple attempts by just manually pulling out the coverage format in json or txt have failed (e.g., using the xcrun xccov view --report --json CodeCoverage.xcresult > cov.json). While the overall upload action completed successfully (by supplying the file argument with the respective output), the UI shows the error null. Not super helpful. See https://app.codecov.io/github/StanfordSpezi/SpeziFileFormats/commit/0a7434be32dea2e44e126f314ab9b116ec042e39.

CC: @PSchmiedmayer @philippzagar @vishnuravi

Tasks

Preview Give feedback
No tasks being tracked yet.
@PSchmiedmayer
Copy link

@Supereg Thank you for raising this issue; an issue we are struggling with across our GitHub organization and multiple projects.

@thomasrockhu-codecov thomasrockhu-codecov added the bug Something isn't working label Apr 16, 2024
PSchmiedmayer added a commit to StanfordBDHG/.github that referenced this issue Apr 17, 2024
# Revert to CodeCov 3 For Now

## ⚙️ Release Notes 
- See codecov/codecov-action#1367 for more
details. Unfortunately we have not received any response from the
codecov team so far; we will investigate other tools and solutions in
the meantime or see if we can somehow contribute to codecov to support
them.


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).

---------

Signed-off-by: Paul Schmiedmayer <[email protected]>
@Zee326
Copy link

Zee326 commented May 8, 2024

@Supereg Can you share the .yml file? I want to see how you implemented that in v3. I am facing issues. I will be thankful to you.

@Supereg
Copy link
Author

Supereg commented May 8, 2024

@Zee326 create-and-upload-coverage-report.yml is our action that uploads the coverage reports collected from the xcodebuild-or-fastlane.yml action.

@withinfocus
Copy link

withinfocus commented Jun 5, 2024

We went with the approach seen at bitwarden/authenticator-ios@2edaf9b to work around this issue. Looking forward to this being automated so we can avoid installing and using xcresultparser.

@drazisil-codecov
Copy link
Contributor

This can be addressed by codecov/uploader#1078

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Aug 1, 2024
@thomasrockhu-codecov thomasrockhu-codecov added Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months Area: Report Upload Issues with pre-ingest report uploading labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Report Upload Issues with pre-ingest report uploading bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months
Projects
None yet
Development

No branches or pull requests

6 participants