Skip to content

Add instrumented test to Datadog modifier against recomposition - #3668

Open
ambushwork wants to merge 1 commit into
developfrom
yl/fix-datadog-modifier-recomposition-issue
Open

Add instrumented test to Datadog modifier against recomposition#3668
ambushwork wants to merge 1 commit into
developfrom
yl/fix-datadog-modifier-recomposition-issue

Conversation

@ambushwork

@ambushwork ambushwork commented Jul 24, 2026

Copy link
Copy Markdown
Member

What does this PR do?

This PR adds an instrumented test to protect the fix against the regression, it is inspired by the reproduce repo from this issue.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@codecov-commenter

codecov-commenter commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.27%. Comparing base (7901517) to head (d5c0e4f).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3668      +/-   ##
===========================================
- Coverage    73.35%   73.27%   -0.07%     
===========================================
  Files          995      995              
  Lines        36332    36332              
  Branches      6141     6141              
===========================================
- Hits         26648    26622      -26     
- Misses        7977     7995      +18     
- Partials      1707     1715       +8     

see 42 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ambushwork

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b67146c9da

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ci/pipelines/default-pipeline.yml Outdated
@ambushwork
ambushwork force-pushed the yl/fix-datadog-modifier-recomposition-issue branch from b67146c to eefec9c Compare July 27, 2026 09:34
@ambushwork
ambushwork marked this pull request as ready for review July 27, 2026 11:01
@ambushwork
ambushwork requested review from a team as code owners July 27, 2026 11:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eefec9c0bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ambushwork
ambushwork marked this pull request as draft July 27, 2026 11:24
@ambushwork
ambushwork marked this pull request as ready for review July 27, 2026 11:28
Comment thread build.gradle.kts Outdated
@ambushwork
ambushwork force-pushed the yl/fix-datadog-modifier-recomposition-issue branch from eefec9c to a02855c Compare July 27, 2026 12:04
@ambushwork
ambushwork requested a review from 0xnm July 27, 2026 13:03
Comment on lines +108 to +111
// Required for the Compose compiler plugin (needed by the Compose instrumented tests below)
// to find the runtime it targets when compiling the main source set.
compileOnly(platform(libs.androidXComposeBom))
compileOnly(libs.androidXComposeRuntime)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this is right. The only place where Compose is used is in the androidTest set, not main. So probably you want it there only?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is removed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, this can't be removed neither, the compiler throws the error when they are absent:

androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: The Compose Compiler requires the Compose Runtime to be on the class path, but none could be found. The compose compiler plugin you are using (version 1.5.14) expects a minimum runtime version of 1.0.0.

Comment on lines +126 to +127
debugImplementation(platform(libs.androidXComposeBom))
debugImplementation(libs.androidXComposeUiTestManifest)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't it be just androidTestImplementation for both? Why do we put debug and add them for the main set?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is because androidx.compose.ui:ui-test-manifest module must be set in debug classpath, here is the example from Android doc, comments says that " Needed for createComposeRule()".

@ambushwork
ambushwork force-pushed the yl/fix-datadog-modifier-recomposition-issue branch from a02855c to 54a1bce Compare July 27, 2026 14:04
@ambushwork
ambushwork requested a review from 0xnm July 27, 2026 14:07
@ambushwork
ambushwork force-pushed the yl/fix-datadog-modifier-recomposition-issue branch from 54a1bce to d5c0e4f Compare July 27, 2026 15:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5c0e4fb0a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread instrumented/integration/build.gradle.kts
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