-
Notifications
You must be signed in to change notification settings - Fork 541
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
Add support to connect to the LoginFlow AI service #5971
base: master
Are you sure you want to change the base?
Conversation
|
ec247a1
to
e73a82c
Compare
components/application-mgt/org.wso2.carbon.identity.application.mgt/pom.xml
Show resolved
Hide resolved
...src/main/java/org/wso2/carbon/identity/application/mgt/ai/constant/LoginFlowAIConstants.java
Show resolved
Hide resolved
...src/main/java/org/wso2/carbon/identity/application/mgt/ai/constant/LoginFlowAIConstants.java
Show resolved
Hide resolved
...n.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ai/LoginFlowAITokenService.java
Outdated
Show resolved
Hide resolved
...n.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ai/LoginFlowAITokenService.java
Outdated
Show resolved
Hide resolved
...n.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ai/LoginFlowAITokenService.java
Outdated
Show resolved
Hide resolved
...n.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ai/LoginFlowAITokenService.java
Outdated
Show resolved
Hide resolved
...n.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ai/LoginFlowAITokenService.java
Outdated
Show resolved
Hide resolved
...n.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ai/LoginFlowAITokenService.java
Outdated
Show resolved
Hide resolved
...n.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ai/LoginFlowAITokenService.java
Outdated
Show resolved
Hide resolved
8ee9876
to
5367ae1
Compare
Quality Gate passedIssues Measures |
@@ -0,0 +1,23 @@ | |||
package org.wso2.carbon.identity.application.mgt.ai; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing copywrite text
<module>org.wso2.carbon.ai.service.mgt.server.feature</module> | ||
</modules> | ||
|
||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing new line
|
||
<artifactId>ai-services-mgt-feature</artifactId> | ||
<packaging>pom</packaging> | ||
<name>WSO2 Carbon - API Resource Management Feature</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this name correct
<version>${maven.surefire.plugin.version}</version> | ||
<configuration> | ||
<!--suppress UnresolvedMavenProperty --> | ||
<argLine> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these are added?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5971 +/- ##
============================================
- Coverage 40.33% 40.19% -0.15%
+ Complexity 14346 14217 -129
============================================
Files 1739 1747 +8
Lines 119425 117361 -2064
Branches 20773 20168 -605
============================================
- Hits 48167 47170 -997
+ Misses 63917 62957 -960
+ Partials 7341 7234 -107
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
</plugins> | ||
</build> | ||
|
||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
|
||
@Test | ||
public void testGetAuthenticationSequenceGenerationStatus_Success() throws Exception { | ||
Map<String, Object> response = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
import static org.wso2.carbon.base.MultitenantConstants.SUPER_TENANT_DOMAIN_NAME; | ||
import static org.wso2.carbon.base.MultitenantConstants.SUPER_TENANT_ID; | ||
|
||
public class LoginFlowAIManagerTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class description missing
SERVER_ERROR_WHILE_CONNECTING_TO_LOGINFLOW_AI_SERVICE("AILF_10009", "Server error occurred " + | ||
"for %s tenant while generating authentication sequence."); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra new line
<limit implementation="org.jacoco.report.check.Limit"> | ||
<counter>COMPLEXITY</counter> | ||
<value>COVEREDRATIO</value> | ||
<minimum>0.50</minimum> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test coverage threshold is not enough.
MAXIMUM_RETRIES_EXCEEDED("AI_10000", "Maximum retries exceeded to retrieve the access token."), | ||
UNABLE_TO_ACCESS_AI_SERVICE_WITH_RENEW_ACCESS_TOKEN("AI_10003", "Unable to access the " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make the error codes in consistent oreder
"for %s tenant while connecting to AI service."), | ||
SERVER_ERROR_WHILE_CONNECTING_TO_AI_SERVICE("AI_10009", "Server error occurred " + | ||
"for %s tenant while connecting to AI service."); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra new line
public void completed(HttpResponse response) { | ||
|
||
try { | ||
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this line null safe?
} | ||
} | ||
} catch (IOException e) { | ||
throw new AIServerException("Failed to close HTTP client: " + e.getMessage(), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this error message correct?
Proposed changes in this pull request
With this PR, the product-is will be able to connect the loginflow AI microservice and generate AI results accordingly
Related Issue(s)