Habitat: project_create appears to return `package_name` in quotes

Created on 20 Sep 2017  路  4Comments  路  Source: habitat-sh/habitat

https://github.com/habitat-sh/habitat/blob/d135580208feaf707b3de94e3c292e04feb1119d/components/builder-api/src/server/handlers.rs#L330

Example response:

{
  "success": true,
  "response": {
    "id": "810515991120379934",
    "origin_id": "806947929590865950",
    "origin_name": "core",
    "package_name": "\"garrett-nginx-server\"",
    "name": "core/\"garrett-nginx-server\"",
    "plan_path": "hab-nginx/server/habitat/plan.sh",
    "owner_id": "806379027802628099",
    "vcs_type": "git",
    "vcs_data": "https://github.com/mgamini/hab-projects.git"
  }
}
L-rust Bug

All 4 comments

This happens if there are quotes in the pkg_name in the plan.sh - if you remove the quotes there, you won't see the quotes in the response. (Looks like we have a few packages like "7zip" in core plans that also do this).

pkg_name="garrett-nginx-server"
pkg_origin="mgamini"

@chefsalim I think we need to strip these quotes before that data enters the system. I'm going to reopen this

@cnunciato should probably change the blog post I pulled this from: https://www.habitat.sh/blog/2017/08/Packaging-a-Website-with-Nginx-and-Habitat/

It sounds like the issue is with ingestion of the plan on project creation; the plans themselves should be able to contain quotes around these values.

Was this page helpful?
0 / 5 - 0 ratings