Skip to content

Commit 1cad09d

Browse files
authored
Merge pull request #184 from olehermanse/pretty
Added some notes about backwards compatibility and reproducibility to markdown docs
2 parents 6d3004b + b679a20 commit 1cad09d

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

JSON.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,25 @@ Unless otherwise noted, all steps are run inside the module's folder (`out/steps
263263
* Source is relative to module directory and target is relative to `out/masterfiles`.
264264
* In most cases, the build step should be: `input ./input.json def.json`
265265

266+
### A note on reproducibility and backwards compatibility
267+
268+
As mentioned in [the README](./README.md), our main focus when it comes to reproducibility and backwards compatibility of `cfbs` is the `cfbs build` command.
269+
(This also extends to `cfbs download` since that is the first part of `cfbs build`).
270+
Anyone who has a working CFEngine Build project, should expect it to keep working (keep building) after upgrading their hub or their version of cfbs.
271+
Ideally, the resulting policy set tarball should be bit-by-bit identical (reproducible), including metadata, so that checksums are easy to compare.
272+
We are not there yet, see this ticket for more progress in this area:
273+
274+
https://northerntech.atlassian.net/browse/CFE-4102
275+
276+
Conversely, for other commands, we might choose to make changes where we think it's a good idea (for example for the user experience, performance or security of the tool).
277+
Some examples of where you might experience changes are:
278+
279+
* The commands which edit `cfbs.json`, or other files, might produce different JSON files in future versions.
280+
(`cfbs init`, `cfbs add`, etc.).
281+
* We might add more strict validation, so `cfbs validate` and `cfbs status` could start giving warnings or errors after upgrading to a new version.
282+
* The interactive prompts might be drastically changed to help the user experience and give more advanced options.
283+
Don't rely on the exact prompts, order of prompts, or output of `cfbs init`, `cfbs add`, etc.
284+
266285
## Examples
267286

268287
### New project

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ These commands are intended to be run as part of build systems / deployment pipe
289289
Expected usage is to run `cfbs get-input` to get the JSON, and then fill out the response part and run `cfbs set-input`.
290290
* `cfbs validate`: Used to validate the [index JSON file](https://github.com/cfengine/build-index/blob/master/cfbs.json).
291291
May be expanded to validate other files and formats in the future.
292+
**Note:** If you use `cfbs validate` as part of your automation, scripts, and build systems, be aware that we might add more strict validation rules in the future, so be prepared to sometimes have it fail after upgrading the version of cfbs.
292293

293294
They don't have interactive prompts, you can expect fewer changes to them, and backwards compatibility is much more important than with the interactive commands above.
294295

0 commit comments

Comments
 (0)