8000 Use empty files for record task by takahirom · Pull Request #389 · takahirom/roborazzi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use empty files for record task #389

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

Merged
merged 1 commit into from
May 29, 2024

Conversation

takahirom
Copy link
Owner
@takahirom takahirom commented May 28, 2024

The challenges we aim to address

#386

Problem
Currently, Roborazzi's gradle plugin declares the output directory (where the golden screenshot files are stored) as an input. This is correct when the task runs in compare and verify modes, but it is not necessary when running record mode only.
The side-effect of this is that it is much more difficult to find an existing build cache entry.

@takahirom takahirom force-pushed the takahirom/use-empty-files-for-record/2024-05-28 branch from 243238e to 455f6e6 Compare May 28, 2024 01:14
Copy link
Contributor
@lukas-mercari lukas-mercari left a comment

Choose a reason for hiding this comment

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

I think the integration tests are sufficient to prove that it works, but I doubled checked locally and it seems to work well! 👍
Thanks a lot, this is indeed cleaner than my attempt in #386!

test.inputs.files(outputDir.map {
if (!it.asFile.exists()) {
it.asFile.mkdirs()
test.inputs.files(
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't know we can pass a Provider to files! (In fact, this is roughly what I was trying to do originally, but instead I was calling isRecordRun.get() which fails.) 👍

@takahirom takahirom changed the title Use empty files for record Use empty files for record task May 28, 2024
@takahirom takahirom merged commit e2efd5a into main May 29, 2024
5 checks passed
@takahirom takahirom deleted the takahirom/use-empty-files-for-record/2024-05-28 branch May 29, 2024 00:24
chrisbanes referenced this pull request in chrisbanes/haze May 29, 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.19.0` -> `1.20.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi/1.19.0/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi/1.19.0/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://togithub.com/takahirom/roborazzi)
| `1.19.0` -> `1.20.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.20.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.20.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.19.0/1.20.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.19.0/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-compose-desktop](https://togithub.com/takahirom/roborazzi)
| `1.19.0` -> `1.20.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.20.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.20.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.19.0/1.20.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.19.0/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://togithub.com/takahirom/roborazzi)
| `1.19.0` -> `1.20.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.20.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.20.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.19.0/1.20.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.19.0/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi](https://togithub.com/takahirom/roborazzi)
| `1.19.0` -> `1.20.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi/1.20.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.20.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.19.0/1.20.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.19.0/1.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.19.0...1.20.0)

##### Workflow Enhancement

We use images as inputs for tests, ensuring that the compare and verify
tasks function correctly. However, while running record tasks, we do not
need the input images. Despite this, these input images invalidate the
record task and disable the cache. Therefore, we no longer use input
images for record tasks. Thank you,
[@&#8203;lukas-mercari](https://togithub.com/lukas-mercari), for
informing us and proposing this improvement.

##### What's Changed

- Use empty files for record task by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/389](https://togithub.com/takahirom/roborazzi/pull/389)
- Fix condition of using output dir by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/390](https://togithub.com/takahirom/roborazzi/pull/390)

**Full Changelog**:
takahirom/roborazzi@1.19.0...1.20.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-merge-queue bot referenced this pull request in slackhq/circuit May 29, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[io.github.takahirom.roborazzi](https://togithub.com/takahirom/roborazzi)
| plugin | minor | `1.18.0` -> `1.20.0` |
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.18.0` -> `1.20.0` |
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.18.0` -> `1.20.0` |
|
[io.github.takahirom.roborazzi:roborazzi](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.18.0` -> `1.20.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.20.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.20.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.19.0...1.20.0)

##### Workflow Enhancement

We use images as inputs for tests, ensuring that the compare and verify
tasks function correctly. However, while running record tasks, we do not
need the input images. Despite this, these input images invalidate the
record task and disable the cache. Therefore, we no longer use input
images for record tasks. Thank you,
[@&#8203;lukas-mercari](https://togithub.com/lukas-mercari), for
informing us and proposing this improvement.

##### What's Changed

- Use empty files for record task by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/389](https://togithub.com/takahirom/roborazzi/pull/389)
- Fix condition of using output dir by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/390](https://togithub.com/takahirom/roborazzi/pull/390)

**Full Changelog**:
takahirom/roborazzi@1.19.0...1.20.0

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

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

##### Bug Fix

I was informed that if you have multiple test suites, the
RoborazziPlugin sometimes fails due to concurrent processes. This
happens because the cleanup process runs multiple times. Therefore, I
made the cleanup process run only once. Thank you for reporting this,
[@&#8203;lukas-mercari](https://togithub.com/lukas-mercari).

##### What's Changed

- Remove unused dependency androidx.compose.ui:ui-graphics by
[@&#8203;takahirom](https://togithub.com/takahirom)
[https://github.com/takahirom/roborazzi/pull/373](https://togithub.com/takahirom/roborazzi/pull/373)
- Fix issue where afterSuite runs for non-root suites by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/385](https://togithub.com/takahirom/roborazzi/pull/385)

**Full Changelog**:
takahirom/roborazzi@1.18.0...1.19.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM4MS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
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
0