Too much configuration required
See original GitHub issueThis is the suggested configuration to cache npm
:
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
This is the suggested configuration to cache npm
on Travis:
Not a mistake. It’s empty. It’s the default.
Can better defaults be provided? GitHub Actions workflows are 5x to 10x longer than Travis’ for the most common configurations.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:48
- Comments:26 (8 by maintainers)
Top Results From Across the Web
Customisation vs configuration: Why too much choice isn't ...
1. You don't need to worry about the details. Too many choices can be paralysing. And with many different stakeholders from different areas ......
Read more >What Is Configuration Management and Why Is It Important?
Configuration management (CM) is a systems engineering process for establishing and maintaining consistency of a system's attributes.
Read more >Why do we no longer need a high configuration computer ...
But the big question is WHY? Simply because it saves money. Previously IT companies would need to invest a lot of money for...
Read more >Convention over configuration - Wikipedia
Convention over configuration is a software design paradigm used by software frameworks that attempts to decrease the number of decisions that a developer ......
Read more >Hey, You Have Given Me Too Many Knobs! - CMU 15-799
This paper makes a first step in understanding a fundamental question of configuration design: “do users really need so many knobs?” To provide...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any code not in my repo is code I don’t have to maintain. If GitHub comes up with a better way to cache dependencies it can apply it to everyone. If I copy-paste that one to my repo it will become my code.
You can make it both powerful and have sensible defaults.
with: {node: true}
I’m sure many specific caching actions will pop up in userland soon enough if you don’t make one, with varying degrees of quality, but your docs will still suggest that wordy configuration if there isn’t an official one.
I mean this with the most respect: I’m baffled to see an employee of a progressive software company not understand and even question the validity of this principle. The best code is no code at all, followed next by the least amount of maintainable code.
The principle of “shorter is better” is at the heart of most computer and software endeavours: from language design (assembly -> compiled -> interpreted), to concepts like “KISS”, “lean”, “agile”, and “elegance”. It drives UI design and hardware interface design. It’s influenced markup language evolution from GML -> SGML -> XML -> Json/YAML. There’s a /lot/ more at stake here than apples vs. oranges aesthetics!
In this case, we’re talking about the cache’s required boiler-plate: is it possible to reduce it further?
Perhaps
key:
could be optional, in which case it could be derived frompath:
and a logical Boolean used to invalidate/save a new cache. Perhapspath:
could then be moved out of thewith:
block, eliminating the need for that entirely (unlesswith:
is an imposed constraint by the workflow system).