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

CloudRequestEngine fails to construct if cloud.51degrees.com is unavailable #65

Merged

Conversation

romansertsov
Copy link
Contributor

fix for #62

@justadreamer
Copy link
Contributor

justadreamer commented Nov 10, 2023

The change is good, however in a real Pipeline the CloudEngine will be used. It nests the CloudRequestEngine.

CloudEngine eagerly requests these properties of cloudRequestEngine in its ctor.

You need to make the CloudEngine.ready() method to call CloudRequestEngine.ready() method, and remove the CloudEngine.ready() method call from its constructor. Then it will trigger loading of the properties lazily only when it is doing processing by triggering its ready() method which in turn should check if CloudRequestEngine() is ready().

Copy link
Contributor

@justadreamer justadreamer left a comment

Choose a reason for hiding this comment

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

could you please add a test of the whole Pipeline that is constructed sort of like in cloud/gettingstarted-web example and flowData.process() method is called with a mocked properties request and then we check that no failures happen during construction, but processing fails with the expected error that it could not load the cloudProperties or evidenceKeys...

@Automation51D Automation51D merged commit a3d7633 into 51Degrees:main Nov 21, 2023
27 checks passed
@romansertsov romansertsov deleted the cloud-engine-cnstructor-issue branch November 23, 2023 10:27
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