-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Weave cloud deploy page error with '---' at EOF #1925
Comments
Yep, it seems that both Out of curiosity, do you need the |
No of course not and I have taken it out of the affected yaml, but it was quite time consuming to figure out that was the problem and I want to make sure others don’t go through the same. Also, I want to make sure these are things we can resolve relatively quickly in order to feel comfortable with Weave as a long term CD tool.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Alfonso Acosta <[email protected]>
Sent: Thursday, April 11, 2019 6:35 PM
To: weaveworks/flux
Cc: Dwight Biddle; Author
Subject: Re: [weaveworks/flux] Weave cloud deploy page error with '---' at EOF (#1925)
Yep, it seems that both --- and ... should be valid at the end of the document.
Out of curiosity, do you need the --- at the end of the file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.jparrowsec.cn%2Fweaveworks%2Fflux%2Fissues%2F1925%23issuecomment-482352211&data=02%7C01%7C%7C181c4395dc544fb1671108d6becdfd28%7Cf0d1c6fddff0486a8e91cfefefc7d98d%7C0%7C0%7C636906189250419792&sdata=DvDgCQGjjrb1BOBcYNmdsyBKwlbN%2FaXy%2FSPtwA76FV8%3D&reserved=0>, or mute the thread<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.jparrowsec.cn%2Fnotifications%2Funsubscribe-auth%2FAtd6AgqTbn7w6JWAUbczcwYk4To14c9sks5vf7irgaJpZM4cq14S&data=02%7C01%7C%7C181c4395dc544fb1671108d6becdfd28%7Cf0d1c6fddff0486a8e91cfefefc7d98d%7C0%7C0%7C636906189250429796&sdata=dHPQXqyk9BDK%2FU%2B%2Fsub%2BpeezU1mBNYMtK1VmsBoeWSo%3D&reserved=0>.
|
Yeah, we should obviously support it since it's valid Yaml. I just wanted to understand whether there was a specific need for it. |
This has been a problem for our team as well. We have a repository that contains yaml definitions for tens of services and if even one of them has a trailing triple-dash (which is quite common if you are doing helm template XXX > output.yaml), flux chokes and stops automation of all workloads in the cluster. Here's an example from the end of the file of one of our manifests that helm template generated which triggers this error:
|
Can you provide a full file causing the problem? (please redact whatever you see fit). I made a fix but it seems that the test I created is bogus and I cannot reproduce the problem. |
@aronne are you also using Weave Cloud? |
@2opremio Here's a redacted sample yaml file: We're using v1.12.0 of flux which is installed using the Helm Chart. We're not using Weave Cloud. |
Thanks a lot. A simple parsing unit test for that file passes. It must be something more intricate. I will take a deeper look. |
I have found the problem, it happens when flux edits the file to automatically release a newer image. The cause is a combination of:
I'll fix it in kubeyaml and add a few tests so that it doesn't happen again. |
Excellent! Thanks for jumping on this. What is normally the turnaround for release once you have a fix ready to go? And how would we go about patching through weave cloud... rerun the yaml generated in the “update cluster” section of the configuration page? Or does flux self-update?
Keep us posted,
- D
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Alfonso Acosta <[email protected]>
Sent: Friday, April 12, 2019 6:33 PM
To: weaveworks/flux
Cc: Dwight Biddle; Author
Subject: Re: [weaveworks/flux] Weave cloud deploy page error with '---' at EOF (#1925)
I have found the problem, it happens when flux edits the file to automatically release a newer image. The cause is a combination of:
1. Kubeyaml<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.jparrowsec.cn%2Fsquaremo%2Fkubeyaml&data=02%7C01%7C%7C2657492feeb3434d804e08d6bf96e4f6%7Cf0d1c6fddff0486a8e91cfefefc7d98d%7C0%7C0%7C636907052136577413&sdata=wBAWGfbIu3YoyLPRzw7Foc%2BGe%2BGq2mdDgGEncG6Cbpc%3D&reserved=0> (which is what we use for updating the manifests) incorrectly adding ... (Yaml's end-of-document marker) after every --- without a document. Kubeyaml, should respect the original structure.
2. Flux choking on ... when trying to re-parse the file.
I'll fix it in kubeyaml and add a few tests so that it doesn't happen again.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.jparrowsec.cn%2Fweaveworks%2Fflux%2Fissues%2F1925%23issuecomment-482743063&data=02%7C01%7C%7C2657492feeb3434d804e08d6bf96e4f6%7Cf0d1c6fddff0486a8e91cfefefc7d98d%7C0%7C0%7C636907052136587418&sdata=8mCG7vG3cwLBZK6pE%2FhhTybuRXdGjAojgf1zS%2FaSPSM%3D&reserved=0>, or mute the thread<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.jparrowsec.cn%2Fnotifications%2Funsubscribe-auth%2FAtd6ApLtc6JhnmitFPZua1hBZitLgTM8ks5vgQm7gaJpZM4cq14S&data=02%7C01%7C%7C2657492feeb3434d804e08d6bf96e4f6%7Cf0d1c6fddff0486a8e91cfefefc7d98d%7C0%7C0%7C636907052136587418&sdata=HNHvkSGYvy5RWOyCN52RwRKfUewucqoYlVGK5hBsGIY%3D&reserved=0>.
|
No problem
It's ad-hoc. Check the dates in CHANGELOG.md for specific historical details Are you blocked by this?
It depends on how you installed flux. To the best of my knowledge, If you followed the instructions from Weave Cloud, an agent is installed which will automatically upgrade flux. Flux itself doesn't self-update. |
Hi Alfonso,
We are not blocked, I am just more curious since we are new customers. And now that you mention the weave cloud auto-update, I remember that we do have that spun up.
Thanks for your responsiveness, and I look forward to hearing back when this is resolved so that we can confirm that the auto-update gets the change and this is no longer a problem for us.
Best,
- D
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Alfonso Acosta <[email protected]>
Sent: Saturday, April 13, 2019 9:37 AM
To: weaveworks/flux
Cc: Dwight Biddle; Author
Subject: Re: [weaveworks/flux] Weave cloud deploy page error with '---' at EOF (#1925)
Excellent! Thanks for jumping on this.
No problem
What is normally the turnaround for release once you have a fix ready to go?
It's ad-hoc check the details in CHANGELOG.md for specific historical details
Are you blocked by this?
And how would we go about patching through weave cloud... rerun the yaml generated in the “update cluster” section of the configuration page? Or does flux self-update?
It depends on how you installed flux. To the best of my knowledge, If you followed the instructions from Weave Cloud, an agent is installed which will automatically upgrade flux.
Flux itself doesn't self-update.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.jparrowsec.cn%2Fweaveworks%2Fflux%2Fissues%2F1925%23issuecomment-482809941&data=02%7C01%7C%7C6f10d9d02ff149d443fa08d6c0152a89%7Cf0d1c6fddff0486a8e91cfefefc7d98d%7C0%7C0%7C636907594485927323&sdata=QS9U8g9%2B7nID3kdzXVVnMVGR6bzeelZfLAcSGmAtb98%3D&reserved=0>, or mute the thread<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.jparrowsec.cn%2Fnotifications%2Funsubscribe-auth%2FAtd6AjDJ--jNojjo76sZx6PLpBFigq7sks5vgd2VgaJpZM4cq14S&data=02%7C01%7C%7C6f10d9d02ff149d443fa08d6c0152a89%7Cf0d1c6fddff0486a8e91cfefefc7d98d%7C0%7C0%7C636907594485937327&sdata=%2Bt%2B3QfRAQFKrGR7Ql7okYAxXm4tKHcLURTeDs%2FY%2BDbg%3D&reserved=0>.
|
Confirmed this works in our environment, thanks for addressing this so promptly! |
It appears that when flux syncs a yaml that has a '---' at the end of the file, the application works correctly, and the yaml is applied, but afterwards the Weave Cloud interface for deployments has the following error:
parsing YAML doc from "{pathToYaml}": yaml: did not find expected node content'
When I remove the '---' at the end of the file, this error goes away.
The only effect this has is that it prevents me from doing manual deployments, and we could add validation for this, BUT this seems like a Weave specific problem that should be resolved, since it is valid kubernetes syntax.
The text was updated successfully, but these errors were encountered: