Replies: 1 comment
|
Hi @hoivikaj, OpenTofu implements remote package fetching in terms of an upstream library called There is some support for variant syntaxes that are then turned into URLs before use, but during the design process for this feature we concluded that it was better to have a single supported syntax that was consistent with the conventions used for other sources than to introduce a second way to write the same thing, particularly because go-getter's support for variant syntaxes has historically had various problems with ambiguity when two systems assign different meaning to similar syntax. Based on those earlier experiences (and the ugly workarounds they led to over time1) we prefer to be consistent with go-getter's assumptions. For the usual OCI syntax in particular there is a direct conflict with OpenTofu's own module registry syntax, so there is no possibility to use exactly the typical syntax. Since we needed to deviate anyway, we decided to make it match how the other sources work, and in this case took the most direct inspiration from how git sources work. I wrote the above before I noticed you'd linked to the relevant part of the RFC. Now I followed that link I see that I've mostly just restated what was already in the RFC, but there's a little more detail in what I wrote above that I hope is useful for understanding how we arrived at that decision. Footnotes
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I recently started the process to test replacing references to our private module registry hosted in HCP to OCI references with the new OCI functionality. All of our modules now push to HCP and build OCI packages in Github on release.
From what I can tell, the OCI url syntax doesn't support the 'standard'
<registry host>/<image>:<tag>syntax - but instead requires use of<registry host>/image?ref=<tag>. This both invalidates the auto generated github package documentation but also simple version checks with dependabot's built in oci version bump evaluation.I looked around at other discussions and issues but wasn't able to find the technical why behind this format.
If there are any plans to revise would like to find out before I update all of our modules!
Thanks for the time.
Edit:
I found the RFC on the why here:
https://github.com/opentofu/opentofu/blob/main/rfc/20241206-oci-registries/5-modules.md
All reactions