-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with variables not substituted in
uri
-referenced manifests (
#5451) (#5711) * Add integration test highlighting the issue The devfile used is the same as devfile-deploy.yaml, except that the the Kubernetes component is referenced via the URI. This is why the same integration test logic is being reused here. * Add higher-level function in 'libdevfile' allowing to load component resource manifest and substitute variables This works with both Inlined or Uri resources. Notes: - Ideally, it would make more sense to rely on the same logic used in Devfile to substitute variables (defined in the 'variables' package), but this function is not exported; and the exported ones substitute variables only in the URI name, not in the content itself (it is not fetched), which is actually the issue we are trying to solve here. * Switch to using 'uri' Kubernetes components in test Devfiles This seems to be a much more realistic case when referencing external Kubernetes manifests. Notes: Some tests, like for `odo deploy`, still test 'Inlined' manifests. * Pass the component name to 'GetComponentResourceManifestContentWithVariablesResolved' As suggested in review, this makes more sense now that we are passing the entire devfile object * Rename 'GetComponentResourceManifestContentWithVariablesResolved' with 'GetK8sManifestWithVariablesSubstituted' Previous name was a bit long ^^ * Remove extra parentheses in error string returned by 'ComponentsWithSameNameError#Error', as suggested in review * Revert "Switch to using 'uri' Kubernetes components in test Devfiles" This reverts commit df1f19e. This will be done in a separate PR, with ideally changes that should allow to use the same set of tests for testing both Inlined and URI-referenced manifests.
- Loading branch information
Showing
12 changed files
with
658 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.