Skip to content

ENG-11061: Adding implementation corresponding to tags config service apis#48

Merged
kamaleshnneerasa merged 8 commits into
mainfrom
ENG-11061
Aug 24, 2021
Merged

ENG-11061: Adding implementation corresponding to tags config service apis#48
kamaleshnneerasa merged 8 commits into
mainfrom
ENG-11061

Conversation

@kamaleshnneerasa
Copy link
Copy Markdown
Contributor

@kamaleshnneerasa kamaleshnneerasa commented Aug 23, 2021

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 23, 2021

Codecov Report

Merging #48 (ba4f020) into main (5039833) will increase coverage by 0.91%.
The diff coverage is 95.78%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #48      +/-   ##
============================================
+ Coverage     90.80%   91.71%   +0.91%     
- Complexity      111      130      +19     
============================================
  Files            14       16       +2     
  Lines           424      519      +95     
  Branches         19       19              
============================================
+ Hits            385      476      +91     
- Misses           32       36       +4     
  Partials          7        7              
Flag Coverage Δ
integration 91.71% <95.78%> (+0.91%) ⬆️
unit 90.27% <95.78%> (+1.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/config/service/ConfigServiceCoordinatorImpl.java 95.74% <95.74%> (ø)
...trace/tag/config/service/TagConfigServiceImpl.java 95.83% <95.83%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5039833...ba4f020. Read the comment docs.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

saxenakshitiz
saxenakshitiz previously approved these changes Aug 24, 2021
@saxenakshitiz saxenakshitiz dismissed their stale review August 24, 2021 07:27

Need to fix synk build

RequestContext requestContext = RequestContext.CURRENT.get();
Tag updatedTagInReq = request.getTag();
configServiceCoordinator.getTag(requestContext, updatedTagInReq.getId());
Tag updatedTagInRes = configServiceCoordinator.upsertTag(requestContext, request.getTag());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use updatedTagInReq instead of request.getTag()

@saxenakshitiz saxenakshitiz changed the title Eng 11061 ENG-11061: Adding implementation corresponding to tags config service apis Aug 24, 2021
import org.hypertrace.tag.config.service.v1.UpdateTagResponse;

@Slf4j
public class TagConfigServiceImpl extends TagConfigServiceGrpc.TagConfigServiceImplBase {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: this could be final.

try {
RequestContext requestContext = RequestContext.CURRENT.get();
String tagId = request.getId();
configServiceCoordinator.getTag(requestContext, tagId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am curious about this one. Do we truly need to check if tag exists before delete it? This operations don't seem to happen transactionally so after you get a tag and before you delete it, tag might be gone already. If delete is idempotent (which I believe it should), then I would just attempt to delete.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@kamaleshnneerasa mentioned that there was a NPE when you attempt to delete a non-existent tag-id. You are right that we should fix it appropriately in root config service such that all config services are benefitted by this change.

@kamaleshnneerasa kamaleshnneerasa merged commit b6e0164 into main Aug 24, 2021
@kamaleshnneerasa kamaleshnneerasa deleted the ENG-11061 branch August 24, 2021 11:30
@github-actions
Copy link
Copy Markdown

Unit Test Results

11 files  +1  11 suites  +1   9s ⏱️ +2s
38 tests +5  38 ✔️ +5  0 💤 ±0  0 ❌ ±0 

Results for commit b6e0164. ± Comparison against base commit 5039833.

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