Closed alice-byb closed 2 years ago
To be honest I don't think this issue should be solved here. We're working on solving this in Compose directly.
However, since we are here, as a general recommendation I would advise not to print the -----------
line in the Serverless Framework output. I guess the goal is to separate custom domains? Maybe the output of the plugin could be reworked to something like this:
Serverless Domain Manager:
domain1.example.com:
Target Domain: xxxx.cloudfront.net
Hosted Zone Id: ...
domain2.example.com:
Target Domain: yyyy.cloudfront.net
Hosted Zone Id: ...
Any updates on this? @mnapoli
Hi there
Thank you for your issue!
@bailey-byb @Cesaraugp feel free to create a PR with changes. We will review and merge it.
@Cesaraugp yes, the issue is solved in Compose, so at least there's no bug anymore.
I still think it could be worth improving this part in the plugin: https://github.com/amplify-education/serverless-domain-manager/issues/500#issuecomment-1110709980
Community Note
Bug Report
Error Description
When running
serverless info
, a string of hyphens (-
) are printed to the console. these hyphens are not yaml-compatible, which breaks tools expecting yaml-compatible content fromserverless info
.This is an issue for use with serverless compose which uses the output from
serverless info
in YAML form to retrieve outputs for use in other services. (see serverless compose code here)I'm not sure whether the logs printed during
after:info:info
are intended to be strict YAML as mentioned in this PR discussion but it seems trivial to fix this issue for serverless-domain-managerI believe this to be a problem for other serverless plugins (this was the case for a plugin I am maintaining also) as well so it may be best to open the discussion for serverless compose but in the short-term this should be resolvable. I have mentioned more about the issue/fix in the section below. Please let me know if I should open a PR to resolve this.
Command Run
Console Output
Domain Manager Configuration
I have created an example repo here with setup instructions to replicate the issue/workflow. Below is the config of the service in the example repo
Versions
Possible Solution
The potential fix to this issue is to prepend the row of hyphens with a yaml comment character
#
fix would allow the output to parsed. I have added a code example of potential fix to the code in question below:Additional context/Screenshots
As mentioned above, I have created a sample repo to reproduce the problem and have a screenshot of the output: