Currently, the notion of "what PHP version are we using?" for the MediaWiki app image is available in helm values as php.version.
While this works, it's managed manually, rather than directly coupled to the MediaWiki image build process. This makes it error-prone - e.g., it's easy for the version used in the image to become out of sync with the helm value.
Instead, we should aim to make the image build process authoritative. One way to do that might look like the following:
- make-container-image: Store the PHP version selected at build time in an image metadata label (e.g., vnd.wikimedia.mediawiki.php.version).
- scap: When mapping helmfile releases to MediaWiki app images, read the label from the selected image, and set php.version accordingly in the /etc/helmfile-defaults/mediawiki/release/ values file.
In this way, PHP version metadata flows from the image build process to helm values.
An alternative to using image metadata labels for communicating build provenance information would be to use the build report file. This would require some thought as to how to cleanly introduce new attributes, while ideally leaving the "schema" of the a more "future-proof" state.
Status: We started with the metadata-labels approach, but encountered unexpected complexity related to querying them (T401721#11096229), and switched gears to using the build report. The latter solution is now what's in active use.