hasura / ddn-sample-app

MIT License
8 stars 3 forks source link

ddn build supergraph-manifest command failing on Windows #47

Open orcwarrior opened 7 months ago

orcwarrior commented 7 months ago

Hey, after today's Hasura DDN launch event, I tried to setup DDN project on my own account. Everything went smoothly until deployment with ddn build supergraph-manifest But command failed with error:

2:21AM DBG deploying connector env_vars=map[] environment_name=default file_id=309700a2-a681-4e1d-89ad-0b6c011643e9 project_name=enjoyed-doberman-4432 subgraph_name=analytics
2:21AM DBG telemetry: beamed
2:21AM ERR ConnectorBuild error: unable to do a ConnectorBuild: input: failed to trigger deployment: couldn't get cloud secrets

Logs indicates issues with clickhouse connector. To troubleshoot the issue. I tried to drop analytics subgraph and all its references in other subgraphs. This actually helped and let me deploy app to cloud successfully.

I'm including .path file for local changes I done to resolve it. Fixing_DDN_deployment_by_dropping_analytics_module.patch

To sum up, it seems like there're some issues with clickhouse connector configuration.

soorajshankar commented 7 months ago

Thanks for reporting the issue @orcwarrior!

I'll let the CLI team look into this, but usually I have seen the following error if I have not logged in or trying to make a build on a project which I don't have access to.

2:21AM ERR ConnectorBuild error: unable to do a ConnectorBuild: input: failed to trigger deployment: couldn't get cloud secrets

Could you check the following so that we can help you better?

orcwarrior commented 7 months ago

Thank for your fast response. I'm sure that I was logged in as I strictly followed README instructions. I did couple of tries running ddn build supergraph-manifest command, but no luck until I dropped analytics fully. I didn't do ddn login before my supergraph properly build.

Anyway, later today I'll setup project again from the start and use ddn get project to confirm.

soorajshankar commented 7 months ago

Hey @orcwarrior, were you able to build the supergraph? Let us know if you need any help in doing that.

orcwarrior commented 7 months ago

Sorry That you had to wait but by setting another project I got similar output. I think easiest way will be to attach a bit of terminal logs where I'm assuring everything is done as README.md instructions suggests:

PS C:\Projects\self\new_ddn_beta_ecommerce\ddn_beta_ecommerce> ddn get project
+-------------+-----------------------+--------------------------------------+---------------------------------------------------------+
| CREATED AT  |         NAME          |                  ID                  |                       CONSOLE URL                       |
+-------------+-----------------------+--------------------------------------+---------------------------------------------------------+
| 24 Apr 2024 | obliging-monarch-3388 | f6c33328-4ed3-4191-815e-c86c340186b3 | https://console.hasura.io/project/obliging-monarch-3388 |
+-------------+-----------------------+--------------------------------------+---------------------------------------------------------+
| 17 Apr 2024 | enjoyed-doberman-4432 | 6dcd8022-ff8f-4147-ae94-e1e6348dc9b5 | https://console.hasura.io/project/enjoyed-doberman-4432 |
+-------------+-----------------------+--------------------------------------+---------------------------------------------------------+
PS C:\Projects\self\new_ddn_beta_ecommerce\ddn_beta_ecommerce> Get-Content .\hasura.yaml | Select-Object -Index 1
project: obliging-monarch-3388
PS C:\Projects\self\new_ddn_beta_ecommerce\ddn_beta_ecommerce> ddn get subgraph
+------------+-------------+--------------------------------+
|    NAME    | DESCRIPTION |           CREATED AT           |
+------------+-------------+--------------------------------+
| analytics  |             | Thu, 25 Apr 2024 01:26:19 CEST |
+------------+-------------+--------------------------------+
| experience |             | Thu, 25 Apr 2024 01:26:17 CEST |
+------------+-------------+--------------------------------+
| sales      |             | Thu, 25 Apr 2024 01:26:16 CEST |
+------------+-------------+--------------------------------+
| users      |             | Thu, 25 Apr 2024 01:26:15 CEST |
+------------+-------------+--------------------------------+
PS C:\Projects\self\new_ddn_beta_ecommerce\ddn_beta_ecommerce> ddn build supergraph-manifest
1:34AM INF Building SupergraphManifest "base"...
1:34AM INF Building the ConnectorManifests that SupergraphManifest "base" depends on...
1:34AM INF Building ConnectorManifest "clickhouse"...
1:34AM INF Creating ConnectorBuild with ID "c7b8ff2a-91e7-4f22-a4f4-fbb63aebff67"...
1:35AM ERR ConnectorBuild error: ConnectorBuild with ID "c7b8ff2a-91e7-4f22-a4f4-fbb63aebff67" failed : connector container failed to start
orcwarrior commented 7 months ago

Okay, so I finally had a while to debug the issue and move forward with it I simply had to setup my own Clickhouse account and change credentials in analytics/clickhouse/connector/clickhouse.build.hml That made ddn build supergraph-manifest build for couple of minutes instead of failing almost immediately like previously. I think information that Clickhouse acc. has to be setup should be included if provided credentials doesn't work - I'm not really familiar with Clickhouse platform yet :)

I was guessing what I needed next was to sync. my Hasura "clickhouse" connector metadata with my new Clickhouse account. After some research I runned ddn update connector-manifest clickhouse --subgraph analytics which drops most of the defnitions in analytics/clickhouse/connector/configuration.json.

However, supergraph build still fails with msg that's cryptinc on my level of Hasura v3 knowledge :)

2:10AM INF Creating ConnectorBuild with ID "e7b6ee5e-d217-4fdc-b040-f81e79ca0c46"...
2:11AM ERR ConnectorBuild error: ConnectorBuild with ID "e7b6ee5e-d217-4fdc-b040-f81e79ca0c46" failed : connector container failed to start
rahulagarwal13 commented 3 weeks ago

@orcwarrior - regret the inconvenience caused. I have updated the repo to reflect the latest changes. Can you please try again and let me know if it is working for you?