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

Fix output image consistency issue #366

Conversation

takahirom
Copy link
Owner

@takahirom takahirom commented May 18, 2024

It seems that the task information provided by TestTaskSkipEventsServiceProvider, which is necessary to decide whether we should restore the cache to the output directory, isn't saved correctly. Therefore, I removed TestTaskSkipEventsServiceProvider and now always restore the cache. The performance impact appears to be minimal, and consistency is more important.

@takahirom takahirom changed the title Check integrationt tests when removing isskiptest in Plugin Check integration tests when removing isskiptest in Plugin May 18, 2024
@takahirom
Copy link
Owner Author

takahirom commented May 18, 2024

The reason why the test fails is that when the test fails, testTask.doLast{} is not executed, so intermediateDir is not updated.

  @Test
  fun verifyAndRecord_changeDetect() {
    RoborazziGradleProject(testProjectDir).apply {
      record()
      val recordFileHash1 = getFileHash("$screenshotAndName.testCapture.png")
      changeScreen()

      verifyAndRecordAndFail()

      val recordFileHash2 = getFileHash("$screenshotAndName.testCapture.png")
      assert(recordFileHash1 != recordFileHash2)

@takahirom takahirom changed the title Check integration tests when removing isskiptest in Plugin Fix output image consistency issue May 18, 2024
@takahirom
Copy link
Owner Author

@lukas-mercari
I think it is better to merge this fix, but we aren't able to reproduce the problem in our repository. Could you take a look?

@lukas-mercari
Copy link
Contributor

lukas-mercari commented May 23, 2024

@takahirom I believe the requirement to reproduce this is to make sure the task is taken from both configuration and build cache. (I can reproduce in the same way that I reproduced #374.)

Build cache: Because it means that the tests will be skipped.
Configuration cache: In this case the skip detection will not work properly because expectingTestNames is not initialised correctly.

@takahirom takahirom merged commit c0d9101 into main May 24, 2024
5 checks passed
@takahirom takahirom deleted the takahirom/check-integration-tests-when-removing-isskiptest/2024-05-18 branch May 24, 2024 00:54
github-merge-queue bot referenced this pull request in slackhq/circuit May 24, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[io.github.takahirom.roborazzi](https://togithub.com/takahirom/roborazzi)
| plugin | minor | `1.16.1` -> `1.17.0` |
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.16.1` -> `1.17.0` |
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.16.1` -> `1.17.0` |
|
[io.github.takahirom.roborazzi:roborazzi](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.16.1` -> `1.17.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>takahirom/roborazzi (io.github.takahirom.roborazzi)</summary>

###
[`v1.17.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.17.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.16.1...1.17.0)

##### Bug Fixes

- There seemed to be a pattern where ActivityScenario's close was not
being called when tests failed, causing leaks, so I used a use block to
ensure it is closed properly.
[@&#8203;yschimke](https://togithub.com/yschimke), thank you for
pointing out this issue.
- At companies that use Roborazzi on a large scale, there were issues
with the output dir not being restored properly due to Configuration
cache and other factors, so I simplified the design to make problems
less likely to occur.
- There were occasional errors reporting that a directory did not exist,
and I've added code to address this issue.
[@&#8203;lukas-mercari](https://togithub.com/lukas-mercari), thank you
for your contribution.

##### What's Changed

- Use the `use` block to prevent leaks by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/376](https://togithub.com/takahirom/roborazzi/pull/376)
- Declare input directories as files to avoid issues when they don't
exist by [@&#8203;lukas-mercari](https://togithub.com/lukas-mercari) in
[https://github.com/takahirom/roborazzi/pull/374](https://togithub.com/takahirom/roborazzi/pull/374)
- Fix output image consistency issue by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/366](https://togithub.com/takahirom/roborazzi/pull/366)
- \[CI] Update toolchain to Java 17 for all modules by
[@&#8203;mannodermaus](https://togithub.com/mannodermaus) in
[https://github.com/takahirom/roborazzi/pull/365](https://togithub.com/takahirom/roborazzi/pull/365)
. Thank you for managing our build process,
[@&#8203;mannodermaus](https://togithub.com/mannodermaus)!
- \[Sample] fix(deps): update dependency
androidx.compose.material:material to v1.6.7 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/342](https://togithub.com/takahirom/roborazzi/pull/342)
- fix(deps): update dependency org.robolectric:robolectric to v4.12.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/369](https://togithub.com/takahirom/roborazzi/pull/369)
- \[CI] Exclude `io.github.takahirom.roborazzi` dependency from Renovate
updates by [@&#8203;sanao1006](https://togithub.com/sanao1006) in
[https://github.com/takahirom/roborazzi/pull/372](https://togithub.com/takahirom/roborazzi/pull/372)

##### New Contributors

- [@&#8203;mannodermaus](https://togithub.com/mannodermaus) made their
first contribution in
[https://github.com/takahirom/roborazzi/pull/365](https://togithub.com/takahirom/roborazzi/pull/365)

**Full Changelog**:
takahirom/roborazzi@1.16.1...1.17.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzYuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
chrisbanes referenced this pull request in chrisbanes/haze May 25, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[io.github.takahirom.roborazzi](https://togithub.com/takahirom/roborazzi)
| `1.13.0` -> `1.18.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://togithub.com/takahirom/roborazzi)
| `1.13.0` -> `1.18.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-compose-desktop](https://togithub.com/takahirom/roborazzi)
| `1.13.0` -> `1.18.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://togithub.com/takahirom/roborazzi)
| `1.13.0` -> `1.18.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi](https://togithub.com/takahirom/roborazzi)
| `1.13.0` -> `1.18.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi/1.13.0/1.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>takahirom/roborazzi (io.github.takahirom.roborazzi)</summary>

###
[`v1.18.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.18.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.17.0...1.18.0)

##### Migrating from `java.io.File` to `kotlinx-io`

Roborazzi previously used `java.io.File` for saving and loading files.
Although Roborazzi supports iOS, sharing much of the logic is
challenging when using `java.io.File`. Therefore, we have migrated to
`kotlinx-io`.
We are attentive to the Kotlin versions our users employ. We upgraded
from version 1.9.21 to 1.9.22 due to a dependency on kotlinx-io. Since
Kotlin 1.9.22 was released last year, it should be compatible with most
projects.
Thank you, [@&#8203;eyedol](https://togithub.com/eyedol), for your
outstanding contribution! Your efforts are greatly appreciated.

    |    \--- org.jetbrains.kotlinx:kotlinx-io-core:0.3.3
    |         +--- org.jetbrains.kotlinx:kotlinx-io-bytestring:0.3.3
    |         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)

##### What's Changed

- Migrate from java.io to kotlinx-io by
[@&#8203;eyedol](https://togithub.com/eyedol) in
[https://github.com/takahirom/roborazzi/pull/368](https://togithub.com/takahirom/roborazzi/pull/368)
- Use kotlinx-io 0.3.3 to avoid updating Kotlin by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/381](https://togithub.com/takahirom/roborazzi/pull/381)

##### New Contributors

- [@&#8203;eyedol](https://togithub.com/eyedol) made their first
contribution in
[https://github.com/takahirom/roborazzi/pull/368](https://togithub.com/takahirom/roborazzi/pull/368)

**Full Changelog**:
takahirom/roborazzi@1.17.0...1.18.0

###
[`v1.17.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.17.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.16.1...1.17.0)

##### Bug Fixes

- There seemed to be a pattern where ActivityScenario's close was not
being called when tests failed, causing leaks, so I used a use block to
ensure it is closed properly.
[@&#8203;yschimke](https://togithub.com/yschimke), thank you for
pointing out this issue.
- At companies that use Roborazzi on a large scale, there were issues
with the output dir not being restored properly due to Configuration
cache and other factors, so I simplified the design to make problems
less likely to occur.
- There were occasional errors reporting that a directory did not exist,
and I've added code to address this issue.
[@&#8203;lukas-mercari](https://togithub.com/lukas-mercari), thank you
for your contribution.

##### What's Changed

- Use the `use` block to prevent leaks by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/376](https://togithub.com/takahirom/roborazzi/pull/376)
- Declare input directories as files to avoid issues when they don't
exist by [@&#8203;lukas-mercari](https://togithub.com/lukas-mercari) in
[https://github.com/takahirom/roborazzi/pull/374](https://togithub.com/takahirom/roborazzi/pull/374)
- Fix output image consistency issue by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/366](https://togithub.com/takahirom/roborazzi/pull/366)
- \[CI] Update toolchain to Java 17 for all modules by
[@&#8203;mannodermaus](https://togithub.com/mannodermaus) in
[https://github.com/takahirom/roborazzi/pull/365](https://togithub.com/takahirom/roborazzi/pull/365)
. Thank you for managing our build process,
[@&#8203;mannodermaus](https://togithub.com/mannodermaus)!
- \[Sample] fix(deps): update dependency
androidx.compose.material:material to v1.6.7 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/342](https://togithub.com/takahirom/roborazzi/pull/342)
- fix(deps): update dependency org.robolectric:robolectric to v4.12.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/369](https://togithub.com/takahirom/roborazzi/pull/369)
- \[CI] Exclude `io.github.takahirom.roborazzi` dependency from Renovate
updates by [@&#8203;sanao1006](https://togithub.com/sanao1006) in
[https://github.com/takahirom/roborazzi/pull/372](https://togithub.com/takahirom/roborazzi/pull/372)

##### New Contributors

- [@&#8203;mannodermaus](https://togithub.com/mannodermaus) made their
first contribution in
[https://github.com/takahirom/roborazzi/pull/365](https://togithub.com/takahirom/roborazzi/pull/365)

**Full Changelog**:
takahirom/roborazzi@1.16.1...1.17.0

###
[`v1.16.1`](https://togithub.com/takahirom/roborazzi/releases/tag/1.16.1)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.16.0...1.16.1)

##### Bugfix

We removed the setting for the test task's input directory in 1.16.0,
but it caused incorrect results in the compare tests. Therefore, I
reverted the changes to the test input directory. This bug is now
covered by Roborazzi's integration tests.

##### What's Changed

- Fix issue where input images are overwritten and add test by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/364](https://togithub.com/takahirom/roborazzi/pull/364)

**Full Changelog**:
takahirom/roborazzi@1.16.0...1.16.1

###
[`v1.16.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.16.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.15.0...1.16.0)

##### Improvements

- [@&#8203;lukas-mercari](https://togithub.com/lukas-mercari) informed
me that we can optimize our build-cache strategy by eliminating outdated
cache invalidation logic. With this adjustment, Roborazzi's integration
test time was reduced from 10 minutes to 6 minutes by utilizing caches.
Thanks for the excellent improvement suggestion. This might also help
other users' projects. Roborazzi's integration tests cover several use
cases, but if you encounter any issues related to caching, please let me
know.
- We have been supporting iOS since the previous version of Roborazzi
and want to share code with the iOS sourceset as much as possible.
Therefore, we migrated from Gson to Kotlinx.serialization 1.6.3. Thank
you for your contribution,
[@&#8203;sanao1006](https://togithub.com/sanao1006)
- Roborazzi has been supporting accessibility dumps for Android, and we
have now added the capability to check the disabled status within these
dumps. Thank you for your contribution,
[@&#8203;lukas-mercari](https://togithub.com/lukas-mercari) !

<img width="723" alt="image"
src="https://github.com/takahirom/roborazzi/assets/1386930/1a324aae-7541-410a-a5d1-b04181d875ba">

##### What's Changed
* Remove unneeded cache invalidation by
@&#8203;takahir[https://github.com/takahirom/roborazzi/pull/362](https://togithub.com/takahirom/roborazzi/pull/362)ll/362
* Include Disabled semantic property in accessibility explanation by
@&#8203;lukas-merca[https://github.com/takahirom/roborazzi/pull/361](https://togithub.com/takahirom/roborazzi/pull/361)ll/361
* [Docs] Add "Why do my screenshot tests fail inconsistently across
different operating systems" section by
@&#8203;takahir[https://github.com/takahirom/roborazzi/pull/353](https://togithub.com/takahirom/roborazzi/pull/353)ll/353
* Migrate from Gson to KotlinX.Serialization by
@&#8203;sanao10[https://github.com/takahirom/roborazzi/pull/350](https://togithub.com/takahirom/roborazzi/pull/350)ll/350
* [Sample] fix(deps): update androidx.navigation to v2.7.7 by
@&#8203;renova[https://github.com/takahirom/roborazzi/pull/337](https://togithub.com/takahirom/roborazzi/pull/337)ll/337
* [Sample] fix(deps): update dependency
androidx.compose.material3:material3 to v1.2.1 by
@&#8203;renova[https://github.com/takahirom/roborazzi/pull/341](https://togithub.com/takahirom/roborazzi/pull/341)ll/341
* [CI] chore(deps): update gradle/gradle-build-action action to v2.12.0
by
@&#8203;renova[https://github.com/takahirom/roborazzi/pull/356](https://togithub.com/takahirom/roborazzi/pull/356)ll/356

**Full Changelog**:
takahirom/roborazzi@1.15.0...1.16.0

###
[`v1.15.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.15.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.14.0...1.15.0)

##### Improvements

- Resolved a Race Condition in Roborazzi Gradle Integration Tests: In
version 1.14.0, we identified an intermittent issue where images from
Roborazzi did not always appear in the output directory during certain
test scenarios, particularly when test results were cached. Despite
efforts to resolve this in 1.14.0, the issue persisted due to its
elusive nature. In this release, we have successfully addressed this
problem, ensuring that images are now consistently placed in the output
directory under similar conditions. This improvement has been verified
through our integration tests. This issue may occur in user projects, so
we recommend updating to this version.
We continue to refine our testing processes to prevent similar issues in
future releases.

##### What's Changed

- Update CompileSdk 34 by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/344](https://togithub.com/takahirom/roborazzi/pull/344)
- Add debug code for flaky test by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/346](https://togithub.com/takahirom/roborazzi/pull/346)
- Fix issue where finalizedTask is skipped unexpectedly by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/347](https://togithub.com/takahirom/roborazzi/pull/347)
- Improve performance for race condition workaround by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/348](https://togithub.com/takahirom/roborazzi/pull/348)
- Improve performance for race condition workaround2 by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/349](https://togithub.com/takahirom/roborazzi/pull/349)
- \[CI]Pin dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/329](https://togithub.com/takahirom/roborazzi/pull/329)
- \[CI]Update actions/checkout action to v3.6.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/334](https://togithub.com/takahirom/roborazzi/pull/334)
- \[CI]Update actions/setup-java action to v3.13.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/335](https://togithub.com/takahirom/roborazzi/pull/335)
- \[CI]Update dawidd6/action-download-artifact action to v2.28.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/338](https://togithub.com/takahirom/roborazzi/pull/338)
- \[Sample]Update dependency androidx.appcompat:appcompat to v1.6.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/339](https://togithub.com/takahirom/roborazzi/pull/339)
- \[Sample]Update dependency androidx.constraintlayout:constraintlayout
to v2.1.4 by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/330](https://togithub.com/takahirom/roborazzi/pull/330)

**Full Changelog**:
takahirom/roborazzi@1.14.0...1.15.0

###
[`v1.14.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.14.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.13.0...1.14.0)

##### Bug fixes

Cache-related Flakiness in Comparison Results: We've identified and
resolved an intermittent issue where cached data could sometimes prevent
users from seeing comparison results in Roborazzi.

[https://github.com/takahirom/roborazzi/pull/323](https://togithub.com/takahirom/roborazzi/pull/323)

##### What's Changed

- \[CI]Configure Renovate by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/317](https://togithub.com/takahirom/roborazzi/pull/317)
- \[CI]Pin JetBrains/writerside-github-action action to
[`5a6920d`](https://togithub.com/takahirom/roborazzi/commit/5a6920d) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/318](https://togithub.com/takahirom/roborazzi/pull/318)
- \[CI]Update actions/checkout digest to
[`0ad4b8f`](https://togithub.com/takahirom/roborazzi/commit/0ad4b8f) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/319](https://togithub.com/takahirom/roborazzi/pull/319)
- Update composeMultiplatform to v1.6.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/321](https://togithub.com/takahirom/roborazzi/pull/321)
- \[Test]Update dependency com.ashampoo:kim to v0.17.7 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/takahirom/roborazzi/pull/322](https://togithub.com/takahirom/roborazzi/pull/322)
- Fix issue where cache restoration fails by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/323](https://togithub.com/takahirom/roborazzi/pull/323)
- \[Test]fix typo in RoborazziGradleProject.kt by
[@&#8203;sanao1006](https://togithub.com/sanao1006) in
[https://github.com/takahirom/roborazzi/pull/325](https://togithub.com/takahirom/roborazzi/pull/325)
- \[CI]Remove renovate rule by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/328](https://togithub.com/takahirom/roborazzi/pull/328)

##### New Contributors

- [@&#8203;renovate](https://togithub.com/renovate) made their first
contribution in
[https://github.com/takahirom/roborazzi/pull/317](https://togithub.com/takahirom/roborazzi/pull/317)

**Full Changelog**:
takahirom/roborazzi@1.13.0...1.14.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chrisbanes/haze).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM2OC4xMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@lukas-mercari
Copy link
Contributor

@takahirom I upgraded to the latest version in our CI/CD pipeline, but it seems that sometimes we get the following exception:

...
Caused by: java.io.IOException: Source file wasn't copied completely, length of destination file differs.
	at kotlin.io.FilesKt__UtilsKt.copyRecursively(Utils.kt:329)
	at kotlin.io.FilesKt__UtilsKt.copyRecursively$default(Utils.kt:288)
	at io.github.takahirom.roborazzi.RoborazziPlugin$apply$configureRoborazziTasks$6$8.afterSuite(RoborazziPlugin.kt:366)
	at jdk.internal.reflect.GeneratedMethodAccessor1126.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	... 44 more

My hypothesis is that it might happen that while one suite finished (and afterSuite is called), another is still generating images -- and thus files in the intermediate dir keep changing.

@takahirom
Copy link
Owner Author

👀

@takahirom
Copy link
Owner Author

@lukas-mercari
Thanks. I saw a similar issue. Are you running a single variant?
#377 (comment)

@lukas-mercari
Copy link
Contributor

@takahirom Yes, we only run a single variant per runner. (E.g. ./gradlew recordRoborazziDebug)

@takahirom
Copy link
Owner Author

@lukas-mercari
If your hypothesis is correct, we might have to check if it is the root suite. Are you seeing multiple 'Roborazzi: test.doLast Copy files' logs?
https://stackoverflow.com/a/68518970

@takahirom
Copy link
Owner Author

In any case, we might need to include this if statement.
https://github.com/search?q=%22suite.parent+%3D%3D+null%22&ref=opensearch&type=code

@takahirom
Copy link
Owner Author

@lukas-mercari
Could you please take a look at this PR?
https://github.com/takahirom/roborazzi/pull/385/files

@lukas-mercari
Copy link
Contributor

Are you seeing multiple 'Roborazzi: test.doLast Copy files' logs?

Yes, I can see multiple logs (when running recording :sample-android:recordRoborazziDebug). Confirmed that the approach to find the root test suite seems to work!

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.

2 participants