Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(render): fix panic if metadata.name is not set #123

Merged
merged 2 commits into from
Oct 30, 2023
Merged

fix(render): fix panic if metadata.name is not set #123

merged 2 commits into from
Oct 30, 2023

Conversation

kbudde
Copy link
Member

@kbudde kbudde commented Oct 30, 2023

No description provided.

@kbudde
Copy link
Member Author

kbudde commented Oct 30, 2023

side note: It should not happen, that a manifest has no name but I had a config issue and it happened. Myks just died with a panic.

How to reproduce the error:

  • Create a app-data.ytt.yaml and forget the #@data/values on top, the document is then treated as it's part of the manifest inputs

internal/myks/render.go Outdated Show resolved Hide resolved
@Zebradil
Copy link
Member

Thanks for fixing this!

Now I wonder if we should validate app-data.ytt.yaml files. I don't think I thought about the case when they're not data files.

@Zebradil Zebradil enabled auto-merge (squash) October 30, 2023 19:20
@Zebradil Zebradil merged commit cdf3266 into dev Oct 30, 2023
5 checks passed
@Zebradil Zebradil deleted the fix_panic branch October 30, 2023 19:21
mykso-bot added a commit that referenced this pull request Oct 31, 2023
# [2.1.0](v2.0.4...v2.1.0) (2023-10-31)

### Bug Fixes

* **init:** ignore top level .myks folder ([#116](#116)) ([b39eb8d](b39eb8d))
* **render:** fix panic if metadata.name is not set ([#123](#123)) ([cdf3266](cdf3266))
* **smart-mode:** correct detection of changes in "_env/argocd" ([#111](#111)) ([ec5dd1d](ec5dd1d))
* **smart-mode:** filter out deleted envs and apps ([93fa2e3](93fa2e3)), closes [#114](#114)

### Features

* add metadata to ytt steps ([#119](#119)) ([6443a20](6443a20))
* **global-ytt:** log ytt output on error ([#120](#120)) ([a22f7aa](a22f7aa))
* **ui:** add smart-mode.only-print flag for debugging ([0a6349a](0a6349a))
Zebradil pushed a commit that referenced this pull request Nov 21, 2023
# [2.1.0](v2.0.4...v2.1.0) (2023-10-31)

### Bug Fixes

* **init:** ignore top level .myks folder ([#116](#116)) ([b39eb8d](b39eb8d))
* **render:** fix panic if metadata.name is not set ([#123](#123)) ([cdf3266](cdf3266))
* **smart-mode:** correct detection of changes in "_env/argocd" ([#111](#111)) ([ec5dd1d](ec5dd1d))
* **smart-mode:** filter out deleted envs and apps ([93fa2e3](93fa2e3)), closes [#114](#114)

### Features

* add metadata to ytt steps ([#119](#119)) ([6443a20](6443a20))
* **global-ytt:** log ytt output on error ([#120](#120)) ([a22f7aa](a22f7aa))
* **ui:** add smart-mode.only-print flag for debugging ([0a6349a](0a6349a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants