jsk-ros-pkg / jsk_3rdparty

42 stars 60 forks source link

[API Change] use project_id from json, instead of credentials #460

Closed k-okada closed 1 year ago

k-okada commented 1 year ago

if we have google credential file

{
  "type": "service_account",
  "project_id": "foo",
...
}

and use launch file such as

  <include file="$(find dialogflow_task_executive)/launch/dialogflow_ros.launch">
    <arg name="credential" value="$(arg google_credentials_json)" />
    <arg name="project_id" value="bar" />
</launch>

it still uses foo project.

This PR override credential setting and use project_id from rosparam.

This PR changes existing launch files that wrongly set project_id in launch file, which was ignored, will be effective.

k-okada commented 1 year ago

shoud we add override_credential_project_id option?

mqcmd196 commented 1 year ago

I can hardly imagine when the situation

if we have google credential file

{ "type": "service_account", "project_id": "foo", ... } and use launch file such as

it still uses foo project. occurs. Does someone want to change `project_id` after the credential file from GCP has been generated?
k-okada commented 1 year ago

having multiple credential files is too complex for new useres, for example https://github.com/jsk-ros-pkg/jsk_robot/pull/1792 uses one file for chat, NLP and dialogflow. BTW, Can we share credential file over different agent ?

mqcmd196 commented 1 year ago

having multiple credential files is too complex for new useres, for example https://github.com/jsk-ros-pkg/jsk_robot/pull/1792 uses one file for chat, NLP and dialogflow.

I see.

BTW, Can we share credential file over different agent ?

Do you mean that we generate 2 dialogflow agents and share keys between them? I think we can't do that. When we create dialogflow agent, dialogflow creates another GCP project.

k-okada commented 1 year ago

@mqcmd196 I think we can. Here, we have two agents, collaborative remembering and facial expression, Screenshot from 2023-06-07 13-25-50

Screenshot from 2023-06-07 12-03-49

and both projects have granted permissions to eternal-byte IAM, so in this example ( https://github.com/jsk-ros-pkg/jsk_robot/pull/1792/files#diff-1b50ec7cff80b4d692c0044c454c168b226ff9011d2e7faed4a48cfcdb87b5b3R9 ) user has access to both collaborative remoembering and facial expression

Screenshot from 2023-06-07 13-18-53

Screenshot from 2023-06-07 13-17-38