xorpaul / g10k

my r10k fork in Go
Apache License 2.0
125 stars 50 forks source link

allow disabling module deprecation check or cache results #152

Closed juliantaylor closed 4 years ago

juliantaylor commented 4 years ago

g10k runs significantly slower since we updated to 0.8. The reason is the forge query done also for already synced module to check for deprecation in https://github.com/xorpaul/g10k/blob/master/forge.go#L115 In our environments we more than 50 modules and the forge mirror we use is relatively slow.

Would it be possible to either disable it completely or cache the deprecation result for already synced modules so one does not have to query all modules on each update?

I could probably provide a patch.

juliantaylor commented 4 years ago

posted https://github.com/xorpaul/g10k/pull/153 which prints deprecation warnings also if the module is cached and respects the module TTL to refresh the cache.

xorpaul commented 4 years ago

Thanks, I really thought I already respected the Forge cache TTL setting when checking for a deprecation notice.

Looks like I only thought about it, but did not implement it.

Regarding the failing tests, I also need to fix some other things first before merging your patch.