Closed KVivek03 closed 2 years ago
Hi @cdwilhelm , while creating the PR, I am getting above "FIle Syntax Check failed" error. I am not able to get the root cause. Requesting your help. Thanks cc @chandravurubindi
Hi @cdwilhelm , while creating the PR, I am getting above "FIle Syntax Check failed" error. I am not able to get the root cause. Requesting your help. Thanks cc @chandravurubindi
Each pull request has a Danger check. See the Dangerfile. The Dangerfile is checking that the plugin is valid. In you case it failed. You can run the command locally to make sure it's working as expected. See this file https://github.com/flexera/flexera-plugins/blob/master/tools/bin/compile
Hi @cdwilhelm , while creating the PR, I am getting above "FIle Syntax Check failed" error. I am not able to get the root cause. Requesting your help. Thanks cc @chandravurubindi
I couldn't get the error to appear in the github PR danger output. You can also view the travis log for the PR to see the error. https://travis-ci.com/github/flexera/flexera-plugins
HI @cdwilhelm , I see a similar syntax error in all the PR created for other plugins, at the end of plugin template. I tried testing it locally but got error as rsc is not a recognised keyword. On checking the travis-Pull request log, it is showing success. cc @chandravurubindi
HI @cdwilhelm , I see a similar syntax error in all the PR created for other plugins, at the end of plugin template. I tried testing it locally but got error as rsc is not a recognised keyword. On checking the travis-Pull request log, it is showing success. cc @chandravurubindi
To test locally you need to install RSC. https://github.com/rightscale/rsc
Hi @cdwilhelm , I tried to test the plugin locally and below are my observations:
This is the command i used for testing - content_path=/cygdrive/c/Users/kvive/desktop/google_cloud.rb echo $content_path content=$(IFS= cat $content_path | while read; do echo "$REPLY"; done) echo $content rsc -h us-3.rightscale.com -a ${ACCOUNT_ID} -r ${REFRESH_TOKEN} ss compile /api/designer/collections/${ACCOUNT_ID}/templates source="${content}"
I found out that content
command is trimming out the last end
keyword and because of that only we are getting the error as-422 Unprocessable Entity
[{"origin":"template: template.cat, line: 151","problem":"Syntax error","summary":"unexpected end-of-input, expecting keyword_end","resolution":"Use valid Cloud Application Template syntax"}]
For testing, I added extra end
keyword at the bottom in the Plugin and the command ran successfully in the local.
So for testing on github also I added extra end
keyword in the Plugin and pushed it. As we can see all check has passed successfully which i think should not happen, as there is extra end
keyword.
Please let me know your thoughts on this.
cc @chandravurubindi
For testing, I added extra
end
keyword at the bottom in the Plugin and the command ran successfully in the local. So for testing on github also I added extraend
keyword in the Plugin and pushed it. As we can see all check has passed successfully which i think should not happen, as there is extraend
keyword. Please let me know your thoughts on this.
I removed the extra end
and added a new line. That solved this error. I recall seeing this when I added the RSC command to the danger file. I don't know why its needed. RSC is essentially using the cat_parser that the plugin service is using. RSC might be expecting the new line. You can ask the phoenix team about it if you need/want to pursue it.
Thanks @cdwilhelm .
Description
POL-335-Google-Cloud-Storage
Issues Resolved
[List any existing issues this PR resolves]
Contribution Check List