GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support to opt-in enable cross-os caching on windows by Phantsure · Pull Request #1056 · actions/cache

Conversation

@Phantsure

@Phantsure Phantsure commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

Description

Enabling cross os support as an opt-in feature on windows. Previously it was given as default in #1049. And fixing symlink issue pointed out in here: #1010

Motivation and Context

This change is done to allow using saving and restoring cache on Windows which can be restored or is saved on Linux or Mac runners as opt-in feature rather than default. This also bring a fix for symlink issue pointed out by a customer here: #1010.

Types of changes

It would invalidate previous caches present on windows runners due to version mismatch.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (add or update README or docs)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

g-andrade reacted with eyes emoji
All reactions
  • 👀 1 reaction
@Phantsure
Add support to opt-in enable cross-os caching on windows
5e66b6c
@github-actions
github-actions Bot requested a review from pallavx January 4, 2023 08:05
@github-actions github-actions Bot assigned pallavx Jan 4, 2023
@Phantsure
Fix tests
af9067e
@Phantsure
Phantsure marked this pull request as ready for review January 4, 2023 09:57
@Phantsure
Phantsure requested a review from a team as a code owner January 4, 2023 09:57
lvpx
lvpx reviewed Jan 4, 2023
View reviewed changes
Comment thread action.yml Outdated
description: 'The chunk size used to split up large files during upload, in bytes'
required: false
enableCrossOsArchive:
description: 'An optional boolean enabled to save and restore cache on windows which could be restored and saved on any platform'

@lvpx lvpx Jan 4, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggestion for description: Optional boolean when enabled, allows windows to restore caches created on other platforms.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Phantsure Phantsure Jan 4, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
description: 'An optional boolean enabled to save and restore cache on windows which could be restored and saved on any platform'
description: 'An optional boolean when enabled, allows to save and restore caches on windows restored and saved on other platforms'

This sound better? We need to have save and restore both

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lvpx lvpx Jan 4, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
description: 'An optional boolean enabled to save and restore cache on windows which could be restored and saved on any platform'
description: 'An optional boolean when enabled, allows windows runners to save/restore caches that can be restored/saved respectively on other platforms'

True, we need save/restore both. How about this?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serroopoint reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@Phantsure Phantsure Jan 4, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sounds good

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serroopoint reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@Phantsure Phantsure Jan 5, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@bishal-pdMSFT Does this sound better or this #1056 (comment) ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serroopoint reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@bishal-pdMSFT bishal-pdMSFT Jan 5, 2023

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good. The word "respectively" does not seem right fit as we are using /. But I will agree my english is not so good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lvpx lvpx Jan 5, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

We can remove respectively, I'm also not too sure if this would be grammatically correct.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/restoreImpl.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

bishal-pdMSFT
bishal-pdMSFT reviewed Jan 4, 2023
View reviewed changes
Comment thread action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

bishal-pdMSFT
bishal-pdMSFT reviewed Jan 4, 2023
View reviewed changes
Comment thread restore/action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

bishal-pdMSFT
bishal-pdMSFT reviewed Jan 4, 2023
View reviewed changes
Comment thread save/action.yml Outdated
description: 'The chunk size used to split up large files during upload, in bytes'
required: false
enableCrossOsArchive:
description: 'An optional boolean enabled to save cache on windows which could be restored on any platform'

@bishal-pdMSFT bishal-pdMSFT Jan 4, 2023

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
description: 'An optional boolean enabled to save cache on windows which could be restored on any platform'
description: 'An optional boolean to enable saving a cache on Windows which may be restored later on another platform'

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serroopoint reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
bishal-pdMSFT
bishal-pdMSFT reviewed Jan 4, 2023
View reviewed changes
Comment thread src/restoreImpl.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

wolflikeme200
wolflikeme200 approved these changes Jan 4, 2023
View reviewed changes
@lvpx
lvpx removed the request for review from pallavx January 5, 2023 06:31
Phantsure added 2 commits January 5, 2023 09:29
@Phantsure
Address review comments and update tests
2637f06
@Phantsure
Fix tests
48a2705
bishal-pdMSFT
bishal-pdMSFT reviewed Jan 5, 2023
View reviewed changes
Comment thread restore/action.yml Outdated
description: 'An ordered list of keys to use for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.'
required: false
enableCrossOsArchive:
description: 'An optional boolean to enable restoring a cache on Windows which was created on another platform'

@bishal-pdMSFT bishal-pdMSFT Jan 5, 2023

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This should change according to the one used for top level action

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
bishal-pdMSFT
bishal-pdMSFT reviewed Jan 5, 2023
View reviewed changes
Comment thread save/action.yml Outdated
description: 'The chunk size used to split up large files during upload, in bytes'
required: false
enableCrossOsArchive:
description: 'An optional boolean to enable saving a cache on Windows which may be restored later on another platform'

@bishal-pdMSFT bishal-pdMSFT Jan 5, 2023

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This should change according to the one used for top level action

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
bishal-pdMSFT
bishal-pdMSFT approved these changes Jan 5, 2023
View reviewed changes
Phantsure added 3 commits January 5, 2023 10:56
@Phantsure
Address review comments
94407e7
@Phantsure
Address review comments
a88f332
@Phantsure
Merge branch 'main' into phantsure/symlink
4a39428
@Phantsure
Phantsure merged commit 6fd2d45 into main Jan 5, 2023
@maybeec maybeec mentioned this pull request Jan 9, 2023
Windows cache restored to wrong path on Linux #1059
Closed
SaschaMann added a commit to julia-actions/cache that referenced this pull request Jan 9, 2023
@SaschaMann
Enable cross-OS caching
b66d4f9
See actions/cache#1056.

Fixes #44 

---

As pointed out in the upstream actions, symlinks may lead to breakage. I don't think that affects the cached directories, does it?

I moved the compiled caching to its own steps, that way we enable people to benefit from cross-OS caching where possible while still caching compiled.
@SaschaMann SaschaMann mentioned this pull request Jan 9, 2023
Enable cross-OS caching for generic dirs. Enable OS-specific cache-compiled by default. julia-actions/cache#45
Closed
@mikelane mikelane mentioned this pull request Jan 10, 2023
Bump actions/cache from 3.2.2 to 3.2.3 mikelane/reddit-get#129
Merged
@mmuetzel mmuetzel mentioned this pull request Jan 17, 2023
Cache save fails with Cygwin in PATH #1073
Closed
IanButterworth pushed a commit to IanButterworth/cache that referenced this pull request Jul 27, 2023
@SaschaMann @IanButterworth
Enable cross-OS caching
d5d00b8
See actions/cache#1056.

Fixes julia-actions#44

---

As pointed out in the upstream actions, symlinks may lead to breakage. I don't think that affects the cached directories, does it?

I moved the compiled caching to its own steps, that way we enable people to benefit from cross-OS caching where possible while still caching compiled.
@renovate renovate Bot mentioned this pull request Aug 10, 2023
chore(deps): update all non-major dependencies druxt/demo.druxtjs.org#30
Open
1 task
Dakshjain1 pushed a commit to SvavaCapital/cache that referenced this pull request Apr 19, 2024
@Phantsure @Dakshjain1
Add support to opt-in enable cross-os caching on windows (actions#1056)
3da2a6e
* Add support to opt-in enable cross-os caching on windows

* Fix tests

* Address review comments and update tests

* Fix tests

* Address review comments

* Address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

3 more reviewers
@lvpx lvpx lvpx left review comments
@bishal-pdMSFT bishal-pdMSFT bishal-pdMSFT approved these changes
@wolflikeme200 wolflikeme200 wolflikeme200 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@pallavx pallavx

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@Phantsure @bishal-pdMSFT @lvpx @wolflikeme200 @pallavx
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.