Open iColdLight opened 1 year ago
@iColdLight thank you for your Pull Request. I'll assign someone to review it soon.
If this PR solves a todo
from the code, please don't forget to remove it.
@h1alexbel please review this Pull Request. Deadline (when it should be merged or closed) is 2023-09-17T19:18:59.313614
.
You should check if the requirements have been implemented (partially or in full), if there are unit tests covering the changes and if the CI build passes. Feel free to reject the PR or ask for changes if it's too big or not clear enough.
Estimation here is 30 minutes
, that's how much you will be paid. You will be paid even if this PR gets rejected.
@h1alexbel Don't forget to close this ticket before the deadline (2023-09-17T19:18:59). You are past the first half of the allowed period.
Does it mean that I need to work on creating JWT TokenProvider, JWT TokenFIlter, JWT User, etc.?
@iColdLight we don't need JWTs. We are dealing with simple text token from GitHub
And this token is not JWT, it's a just simple GitHub token, simple string
@h1alexbel Looks like you've missed the task deadline (2023-09-17T19:18:59). You are now resigned from this task.
Please stop working on it, you will not be paid. I will assign it to someone else soon.
@h1alexbel I couldn't find any assignee for this task. This is either because there are no contributors with role REV
available or because the project does not have enough funds.
Please, make sure there is at least one available contributor with the required role and the project can afford to pay them.
Hi! I made new changes. I wonder, if you can see them. And sorry for 3 commits in a row... made slight changes in the last two.
@h1alexbel reminder
/codex Could there be a problem here in terms of non-blocking interaction?
Could there be a problem here in terms of non-blocking interaction?
@l3r8yJ Yes, there could be a problem with non-blocking interaction in the code. The TokenValidation
class implements the Tokens
interface and overrides the add
method. Inside the add
method, there are multiple database interactions (validateToken
, checkIfTokenExists
, and this.tokenInsertion.add
) that return Mono
objects, indicating asynchronous operations.
However, the code does not utilize reactive operators like flatMap
, map
, or zip
to chain these operations together and ensure non-blocking execution. Instead, it directly calls these methods synchronously, which may lead to blocking behavior and potential performance issues.
To ensure non-blocking interaction, the code should use reactive operators to compose the asynchronous operations and handle the results asynchronously.
@iColdLight take note of this comment
Could there be a problem here in terms of non-blocking interaction?
@l3r8yJ Yes, there could be a problem with non-blocking interaction in the code. The
TokenValidation
class implements theTokens
interface and overrides theadd
method. Inside theadd
method, there are multiple database interactions (validateToken
,checkIfTokenExists
, andthis.tokenInsertion.add
) that returnMono
objects, indicating asynchronous operations.However, the code does not utilize reactive operators like
flatMap
,map
, orzip
to chain these operations together and ensure non-blocking execution. Instead, it directly calls these methods synchronously, which may lead to blocking behavior and potential performance issues.To ensure non-blocking interaction, the code should use reactive operators to compose the asynchronous operations and handle the results asynchronously.
it's an AI response, could be wrong
I made a change to my TokenValidation class to ensure non-blocking interaction. May you take a look?
@l3r8yJ take a look, please
Added dependency for json web token in the pom.xml file Added validateToken method in the TokenController class Modified registerToken method to include validation of token in the TokenController class
PR-Codex overview
Focus of the PR:
This PR focuses on adding token validation and insertion functionality to the codebase.
Detailed summary:
TokenValidation
class inio.blamer.hub.pg
package.TokenValidation
implements theTokens
interface.validateAndInsertToken
method inTokenValidation
to validate and insert tokens.validateToken
method inTokenValidation
to validate tokens.checkIfTokenExists
method inTokenValidation
to check if a token already exists in the database.checkIfTokenExists
method.TokenAlreadyExists
exception inio.blamer.hub.exceptions
package.TokenInsertion
class inio.blamer.hub.pg
package to handle token insertion.TokenInsertion
implements theTokens
interface.add
method inTokenInsertion
to add tokens.TokenController
class inio.blamer.hub.controller
package.TokenController
constructor to accept aTokens
object with@Qualifier("tokenValidation")
.registerToken
method inTokenController
to use thetokens
object to add tokens.