Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLT-7616 set api call for config json needed for dynamic setting of m… #10

Merged
merged 2 commits into from Oct 18, 2023

Conversation

ladamesny
Copy link
Collaborator

@ladamesny ladamesny commented Oct 12, 2023

…arlowe runtime web url

This PR prevents that app from running if the marlowe runtime web url is not set in the env keys or in a config.json in the public folder.

The config.json should be set as follows:

{
"marloweWebServerUrl": "https://marlowe-runtime-preprod-web.scdev.aws.iohkdev.io/",
"develMode": false
}

We need this change so that the deploy sets the marlowe web url instance dynamically in the config.json file.

@ladamesny ladamesny self-assigned this Oct 12, 2023
@ladamesny ladamesny requested a review from nhenin October 12, 2023 07:50
@ladamesny ladamesny marked this pull request as ready for review October 12, 2023 07:51
src/index.tsx Outdated
}
});

const hasValidRuntimeInstance = runtimeURL !== undefined && runtimeURL !== null && runtimeURL !== '' && runtimeURL.startsWith('http');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a healthcheck endpoint available in the sdk, you should call it instead

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is not good enough

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's something along these lines if I'm not mistaken:

import { mkRestClient } from "@marlowe.io/runtime-rest-client";

const restClient = mkRestClient(runtimeURL)

const hasValidRuntimeInstance = await restClient.healthcheck()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this.

@nhenin nhenin merged commit ec2636a into main Oct 18, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants