Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

OPER-5924 Forward-port fix for asset prefix w/ trailing slash #3

Closed
wants to merge 2 commits into from

Conversation

alanbrent
Copy link
Member

@alanbrent alanbrent commented Jan 26, 2022

The local filesystem glob in AssetSync::Storage#get_local_files uses fuzzy matching when config.prefix is present. This can present a problem in some cases, as it doesn't allow for distinguishing between (e.g.) a folder called assets/ and another folder called assets-temp/. A situation could arise where the latter folder has thousands/millions of files and we mistakenly publish local-only files, or worse we could clobber another directory in the bucket managed in a completely different context.

This change allows developers to be more specific in their config.prefix by using a trailing slash for their folder name.

Pre-Release Requirements

Release Process

Given the forked nature of the repo, this is how I plan to "release" this.

  • Build gem and push to Tapjoy Gemfury
  • Push this branch as v2.15.1.1 tag
  • Close this PR

Notes

There is an upstream PR (AssetSync#425) with this change. Hopefully it's approved and released, so then we can stop maintaining a forked version of this gem.

@alanbrent alanbrent force-pushed the oper-5924/forward-port-path-fix branch from 5060019 to 50c6bd5 Compare January 26, 2022 22:10
The local filesystem glob in `AssetSync::Storage#get_local_files` uses
fuzzy matching when config.prefix is present. This can present a problem
in some cases, as it doesn't allow for distinguishing between (e.g.) a
folder called `assets/` and another folder called `assets-temp/`. A
situation could arise where the latter folder has thousands/millions of
files and we mistakenly publish local-only files, or worse we could
clobber another directory in the bucket managed in a completely
different context.

This change allows developers to be more specific in their
`config.prefix` by using a trailing slash for their folder name.
@alanbrent alanbrent force-pushed the oper-5924/forward-port-path-fix branch from 50c6bd5 to 9fc6c48 Compare January 27, 2022 00:47
@alanbrent alanbrent closed this Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant