Open leofidus opened 5 years ago
CI is failing due to linting errors --> https://travis-ci.org/atlassian/nucleus/builds/447422901
Can you add a spec similar to the S3 spec for this?
Sure, I'll see if I get around to it later.
Build is failing because of https://github.com/googleapis/google-auth-library-nodejs/issues/520 (which is a dependency of a dependency).
Locally I've overridden version resolution for that library with a resolutions block in the package.json, but for the pull request I'll just wait for the bug to be resolved.
@leofidus That issue is marked as wontfix and can only be resolved by updating to TS >= 3.0
I'll look at doing that for master today to get this unblocked 👍
@leofidus Typescript 3 is now in master 👍
What's happening with this feature? Would be great to get finished.
@GEverding I'm running it in production for two years now without issues. I wanted to write unit tests for it, but then other priorities got in the way and I never got around to it.
This implements GCP as a file store.
Some care was taken to allow flexibility in the configuration to allow usage with Google's CDN or any ther CDN. I haven't implemented an invalidator for Google's CDN as I'm not currently using it.
Since I had to update @types/node to get this to compile I guess you need at least Node 8 to use the GCP backend. Using an older Node version with a different file store shouldn't be impacted.
I use the override flag of putFile to set a different cache policy, since Google applies and uses a default cache policy of one hour. Using the override flag is a bit of a hack since there's no system in place to communicate file lifetime. It works reasonably well with only a few non-critical edge cases (the initial version.json is cached too long, the icon and pubkey could be cached longer). In principle everything works even without setting the cache policy (since the lock file returns proper status over this API), the releases would just be delayed by an hour.