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

chore: various fixes to build with SPI #1812

Merged
merged 3 commits into from
May 7, 2024
Merged

Conversation

ganeshnj
Copy link
Contributor

@ganeshnj ganeshnj commented May 3, 2024

What and why?

https://swiftpackageindex.com/DataDog/dd-sdk-ios/builds

How?

The main issue here was with tvOS compile out flag, where types were not included but their tests were part of the target.

SPI compiles the project without xcworkspace ie it deletes the workspace which forces Xcode to automatically generate the Datadog-Package scheme.

now following command builds

xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$workDir/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $workDir/.derivedData build -scheme Datadog-Package -destination generic/platform=tvos

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests for Core, RUM, Trace, Logs, CR and WVT
  • Run unit tests for Session Replay
  • Run integration tests
  • Run smoke tests
  • Run tests for tools/

@ganeshnj ganeshnj requested review from a team as code owners May 3, 2024 15:49
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented May 3, 2024

Datadog Report

Branch report: ganeshnj/chore/spi-fixes
Commit report: 31d0eb0
Test service: dd-sdk-ios

✅ 0 Failed, 3083 Passed, 0 Skipped, 30m 1.65s Wall Time
❄️ 2 New Flaky
🔻 Test Sessions change in coverage: 10 decreased, 4 increased

New Flaky Tests (2)

  • testWhenPendingCrashReportIsFound_itIsSentAndPurged - CrashReporterTests - Last Failure

    Expand for error
     Assertion Failure at CrashReporterTests.swift:51: XCTAssertTrue failed - It should ask to purge the crash report
    
  • testItUsesExpectedHTTPMessage - DatadogLogsFeatureTests - Last Failure

    Expand for error
     
     Assertion Failure at DatadogLogsFeatureTests.swift:83: failed - Exceeded timeout of 2.0s with receiving 0 out of 1 expected requests.
     Assertion Failure at DatadogLogsFeatureTests.swift:85: XCTAssertEqual failed: ("Optional("GET")") is not equal to ("Optional("POST")")
     Assertion Failure at DatadogLogsFeatureTests.swift:86: XCTAssertTrue failed
     Assertion Failure at DatadogLogsFeatureTests.swift:87: XCTAssertEqual failed: ("nil") is not equal to ("Optional("ddsource=7aAOMazhKG")")
     Assertion Failure at DatadogLogsFeatureTests.swift:88: XCTAssertEqual failed: ("nil") is not equal to ("Optional("vdQ5113S2r/2DyWkvo7pq CFNetwork (XLRu2kExrd;  kqDQxM XX/ScQN8A4 bD)")")
     Assertion Failure at DatadogLogsFeatureTests.swift:94: XCTAssertEqual failed: ("nil") is not equal to ("Optional("application/json")")
     Assertion Failure at DatadogLogsFeatureTests.swift:95: XCTAssertEqual failed: ("nil") is not equal to ("Optional("deflate")")
     Assertion Failure at DatadogLogsFeatureTests.swift:96: XCTAssertEqual failed: ("nil") is not equal to ("Optional("4j0hyuetMd")")
     Assertion Failure at DatadogLogsFeatureTests.swift:97: XCTAssertEqual failed: ("nil") is not equal to ("Optional("NTjkWSnaEY")")
     ...
    

🔻 Code Coverage Decreases vs Default Branch (10)

This report shows up to 5 code coverage decreases.

  • test DatadogCoreTests tvOS 79.32% (-0.3%) - Details
  • test DatadogRUMTests tvOS 80.74% (-0.29%) - Details
  • test DatadogLogsTests tvOS 45.1% (-0.27%) - Details
  • test DatadogLogsTests iOS 45.05% (-0.27%) - Details
  • test DatadogCrashReportingTests iOS 27.68% (-0.2%) - Details

fuzzybinary
fuzzybinary previously approved these changes May 3, 2024
Copy link
Member

@fuzzybinary fuzzybinary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor questions but otherwise looks good.

maciejburda
maciejburda previously approved these changes May 6, 2024
Copy link
Member

@maciejburda maciejburda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just some minor comments

@ganeshnj ganeshnj merged commit 4530d0d into develop May 7, 2024
10 checks passed
@ganeshnj ganeshnj deleted the ganeshnj/chore/spi-fixes branch May 7, 2024 11:56
@maciejburda maciejburda mentioned this pull request May 8, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants