USHIFT-852: assets.yaml declaring manifests to copy from releases#1347
USHIFT-852: assets.yaml declaring manifests to copy from releases#1347openshift-merge-robot merged 7 commits intoopenshift:mainfrom
Conversation
|
@pmtk: This pull request references USHIFT-852 which is a valid jira issue. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/retest @pmtk, can you add the fix description to the PR? There seem to be some formatting changes, so it's not clear what needs to be reviewed. |
|
@pmtk: This pull request references USHIFT-852 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@pmtk: This pull request references USHIFT-852 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I copied (and slightly tweaked) descriptions from individual commits |
|
/cc @copejon |
37dd718 to
aaf1461
Compare
dhellmann
left a comment
There was a problem hiding this comment.
I like the direction this is going.
pkg/components/render_test.go
Outdated
There was a problem hiding this comment.
What happened to this test?
There was a problem hiding this comment.
I removed it because it was testing if the ConfigMap is properly templated ({{ .lvmd }}) but now it's substituted so this test didn't made much sense:
# pkg/components/storage.go
- if err := assets.ApplyConfigMaps(cm, renderTemplate, lvmdRenderParams, kubeconfigPath); err != nil {
+ if err := assets.ApplyConfigMapWithData(cm, map[string]string{"lvmd.yaml": lvmdRenderParams["lvmd"].(string)}, kubeconfigPath); err != nil {
I think, if we'd want to test something, it would be assets.ApplyConfigMapWithData() (although I think it would need a refactor to split this logic from applying it to API)
There was a problem hiding this comment.
OK, it makes sense to remove this. We can add other tests in separate PRs if we want them.
scripts/auto-rebase/handle-assets.py
Outdated
There was a problem hiding this comment.
| if 'no_clean' in dir and dir['no_clean']: | |
| if dir.get('no_clean', False): |
scripts/auto-rebase/handle-assets.py
Outdated
There was a problem hiding this comment.
| if "files" in dir: | |
| for f in dir['files']: | |
| for f in dir.get('files', []): |
scripts/auto-rebase/handle-assets.py
Outdated
There was a problem hiding this comment.
This can be the same as for files.
f3edc57 to
2976005
Compare
|
/test e2e-reboot |
dhellmann
left a comment
There was a problem hiding this comment.
When I tried to run this version of the rebase script it replaced some of the assets with "Script exited with error.". Maybe you can prepare a separate PR showing the output of this work?
pkg/components/render_test.go
Outdated
There was a problem hiding this comment.
OK, it makes sense to remove this. We can add other tests in separate PRs if we want them.
It looks like that's the same problem with oc requiring credentials that we've discussed elsewhere. |
Sure. Here's PR between today's rebase PR and same refs produced by this branch #1367 (although the diff looks like it's against main, maybe if I'd rebase my branch on top of CI PR branch the diff would be "correct" - but you can see same changes with some reformatting). Edit2: Here's PR between 1362 and 1367 rebased on top of 1362: #1368 |
OK, that all looks good. This needs a rebase, but then I'll LGTM it. |
asset.yaml that lists all the files in assets/. It does not include any modifications to the manifests. Focused only on sourcing the assets (either copying from STAGING_DIR or using git restore). Its purpose is to have common place for both rebase procedure and rebase presubmit.
introduces new way of copying manifests from staging dir based on contents of assets.yaml file
changes include:
- wrapping {{ .template }} inside quotes to get correct yaml file
- formatting lvms manifests with `oc create --dry-run=client`
(includes sorting)
- changing method of creating "lvmd" ConfigMap from templating to
overriding ConfigMap's data
removed Test_renderLvmdConfig because it was testing approach based on renderTemplate() which is no longer used
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dhellmann, pmtk The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adds asset.yaml that lists all the files in
assets/. Focused only on sourcing the assets (either copying fromSTAGING_DIRor usinggit restore). It does not include any modifications (like yq) to the manifests (yet).Its purpose is to have common place for both rebase procedure and rebase presubmit.
Introduces new way of copying manifests from staging dir based on contents of assets.yaml file.
Commands such as
cp,git restore,rm -rfare removed fromrebase.sh's functions dealing with manifests (assets/).Other changes include:
{{ .template }}inside quotes to get correct yaml file, so manysedcommands are removedoc create --dry-run=client(includes sorting) (a consequence of usingoc create --dry-runon all lvms/topolvm manifests, not just the copied ones)"{{ .lvmd }}"would keep the"resulting in incorrect data)Test_renderLvmdConfigbecause it was testing approach based on renderTemplate() which is no longer used