|
2 | 2 |
|
3 | 3 | All notable changes to this project are documented in this file.
|
4 | 4 |
|
| 5 | +## 0.35.0 |
| 6 | + |
| 7 | +**Release date:** 2023-02-16 |
| 8 | + |
| 9 | +This release introduces a new format for the Artifact `Revision`, and deprecates |
| 10 | +the `Checksum` field in favor of a new `Digest` field. In addition, it adds |
| 11 | +support for Git reference names in a GitRepository, and comes with the usual |
| 12 | +collection of dependency updates. |
| 13 | + |
| 14 | +### Highlights |
| 15 | + |
| 16 | +#### Support for Git reference names |
| 17 | + |
| 18 | +Starting with this version, it is possible to define a [Git Reference](https://git-scm.com/book/en/v2/Git-Internals-Git-References) |
| 19 | +in a GitRepository using `.spec.ref.name`. |
| 20 | + |
| 21 | +This opens the door to a range of functionalities not available before, as it |
| 22 | +for example allows the controller to follow pull (`refs/pull/<id>/head`) or |
| 23 | +merge (`refs/merge-requests/<id>/head`) requests, and allows a transition from |
| 24 | +the HEAD of a branch (`refs/heads/main`) to a tag (`refs/tags/v0.1.0`) by |
| 25 | +changing a single field value. |
| 26 | + |
| 27 | +Refer to the [GitRepository specification](https://github.com/fluxcd/source-controller/blob/v0.35.0/docs/spec/v1beta2/gitrepositories.md#name-example) |
| 28 | +for more details. |
| 29 | + |
| 30 | +#### Introduction of Artifact Digest |
| 31 | + |
| 32 | +The Artifact of a Source will now advertise a `Digest` field containing the |
| 33 | +checksum of the file advertised in the `Path`, and the alias of the algorithm |
| 34 | +used to calculate it. Creating a "digest" in the format of `<algo>:<checksum>`. |
| 35 | + |
| 36 | +The algorithm is configurable using the newly introduced `--artifact-digest-algo` |
| 37 | +flag, which allows configuration of other algorithms (`sha384`, `sha512`, and |
| 38 | +`blake3`) than the hardcoded `sha256` default of the [now deprecated `Checksum` |
| 39 | +field](#deprecation-of-artifact-checksum). |
| 40 | + |
| 41 | +Please note that until the `Checksum` is fully deprecated, changing the |
| 42 | +algorithm is not yet advised (albeit supported), as this will result in a |
| 43 | +double computation. |
| 44 | + |
| 45 | +### :warning: Breaking changes |
| 46 | + |
| 47 | +#### Artifact Revision format |
| 48 | + |
| 49 | +The `Revision` format for an Artifact consisting of a named pointer (a Git |
| 50 | +branch or tag) and/or a specific revision (a Git commit SHA or other calculated |
| 51 | +checksum) has changed to contain an `@` separator opposed to `/`, and includes |
| 52 | +the algorithm alias as a prefix to a checksum (creating a "digest"). |
| 53 | +In addition, `HEAD` is no longer used as a named pointer for exact commit |
| 54 | +references, but will now only advertise the commit itself. |
| 55 | + |
| 56 | +For example: |
| 57 | + |
| 58 | +- `main/1eabc9a41ca088515cab83f1cce49eb43e84b67f` => `main@sha1:1eabc9a41ca088515cab83f1cce49eb43e84b67f` |
| 59 | +- `HEAD/5394cb7f48332b2de7c17dd8b8384bbc84b7e738` => `sha1:5394cb7f48332b2de7c17dd8b8384bbc84b7e738` |
| 60 | +- `tag/55609ff9d959589ed917ce32e6bc0f0a36809565f308602c15c3668965979edc` => `tag@sha256:55609ff9d959589ed917ce32e6bc0f0a36809565f308602c15c3668965979edc` |
| 61 | +- `8fb62a09c9e48ace5463bf940dc15e85f525be4f230e223bbceef6e13024110c` => `sha256:8fb62a09c9e48ace5463bf940dc15e85f525be4f230e223bbceef6e13024110c` |
| 62 | + |
| 63 | +When the storage of the controller is backed by a Persistent Volume, the |
| 64 | +rollout of this new format happens for the next new revision the controller |
| 65 | +encounters. Otherwise, the new revision will be advertised as soon as the |
| 66 | +Artifact has been reproduced after the controller is deployed. |
| 67 | + |
| 68 | +Other Flux controllers making use of an Artifact are aware of the change in |
| 69 | +format, and work with it in a backwards compatible manner. Avoiding observing |
| 70 | +a change of revision when this is actually just a change of format. If you |
| 71 | +programmatically make use of the Revision, please refer to [the |
| 72 | +`TransformLegacyRevision` helper](https://github.com/fluxcd/source-controller/blob/api/v0.35.0/api/v1beta2/artifact_types.go#L121) |
| 73 | +to allow a transition period in your application. |
| 74 | + |
| 75 | +For more information around this change, refer to |
| 76 | +[RFC-0005](https://github.com/fluxcd/flux2/tree/main/rfcs/0005-artifact-revision-and-digest#establish-an-artifact-revision-format). |
| 77 | + |
| 78 | +#### Deprecation of Artifact Checksum |
| 79 | + |
| 80 | +The `Checksum` field of an Artifact has been deprecated in favor of the newly |
| 81 | +introduced `Digest`. Until the deprecated field is removed in the next version |
| 82 | +of the API, the controller will continue to produce the SHA-256 checksum in |
| 83 | +addition to the digest. Changing the algorithm used to produce the digest using |
| 84 | +`--artifact-digest-algo` is therefore not yet advised (albeit supported), as |
| 85 | +this will result in a double computation. |
| 86 | + |
| 87 | +For more information around this change, refer to |
| 88 | +[RFC-0005](https://github.com/fluxcd/flux2/tree/main/rfcs/0005-artifact-revision-and-digest#introduce-a-digest-field). |
| 89 | + |
| 90 | +### Full changelog |
| 91 | + |
| 92 | +Improvements: |
| 93 | +- Introduction of Digest and change of Revision format |
| 94 | + [#1001](https://github.com/fluxcd/source-controller/pull/1001) |
| 95 | +- Improve HelmRepository type switching from default to oci |
| 96 | + [#1016](https://github.com/fluxcd/source-controller/pull/1016) |
| 97 | +- Apply default permission mode to all files/dirs in an artifact archive |
| 98 | + [#1020](https://github.com/fluxcd/source-controller/pull/1020) |
| 99 | +- Add support for checking out Git references |
| 100 | + [#1026](https://github.com/fluxcd/source-controller/pull/1026) |
| 101 | +- Update dependencies |
| 102 | + [#1025](https://github.com/fluxcd/source-controller/pull/1025) |
| 103 | + [#1028](https://github.com/fluxcd/source-controller/pull/1028) |
| 104 | + [#1030](https://github.com/fluxcd/source-controller/pull/1030) |
| 105 | + |
| 106 | +Fixes: |
| 107 | +- Normalize Helm repository URL with query params properly |
| 108 | + [#1015](https://github.com/fluxcd/source-controller/pull/1015) |
| 109 | +- Prevent panic when cloning empty Git repository |
| 110 | + [#1021](https://github.com/fluxcd/source-controller/pull/1021) |
| 111 | + |
5 | 112 | ## 0.34.0
|
6 | 113 |
|
7 | 114 | **Release date:** 2023-01-31
|
|
0 commit comments