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

Error handling for get cloud image calls #81

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

ankicabarisic
Copy link
Member

What is resolved:
-> when the images can't be retrived the error is logged and send back to caller - previously it was retrurning empty set or even images from another clouds
-> cloud infrastructures are now created with unique infrastructure ID when IAAS connector is called to create them

Expected behavior with problematic clouds:

  1. Add cloud -> retrun 0 if infrastructure is added
  2. Get Cloud Images -> now it gives the error if there is problem with retriving the images because cloud is not existing, cloud infrastracture is not authorized to retrive images or the cardentials are wrong
  3. Get Node Candidates -> retrurns empty set of nodes in case of problems

Copy link

sonarcloud bot commented Jul 22, 2024

Copy link
Member

@fviale fviale left a comment

Choose a reason for hiding this comment

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

LGTM


try {
connection = (HttpURLConnection) requestUri.toURL().openConnection();
connection.setRequestMethod(HttpMethod.GET.toString());
Copy link
Member

Choose a reason for hiding this comment

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

A minor comment. At this point, we can check whether the connection is null, before going further with a null connection.

Copy link
Member

@nebilbenmabrouk nebilbenmabrouk left a comment

Choose a reason for hiding this comment

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

Approved with a minor comment

@ankicabarisic ankicabarisic merged commit bdb072f into master Jul 22, 2024
3 checks passed
@ankicabarisic ankicabarisic deleted the cloud_IAAS_improvements branch July 22, 2024 09:05
fviale pushed a commit that referenced this pull request Aug 12, 2024
* intoducing unique IAAS infrastracture for cloud providers

* processing IAAS get cloud images error so it return the Internal Server Error

* remove authorisation exception

(cherry picked from commit bdb072f)
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.

3 participants