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

feat: update per API change for importing ruleset #228

Merged
merged 12 commits into from
Aug 9, 2024

Conversation

formulahendry
Copy link
Member

No description provided.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 76.98413% with 29 lines in your changes missing coverage. Please review.

Project coverage is 41.71%. Comparing base (18e6b58) to head (e866f4b).

Files Patch % Lines
src/commands/rules/deployRules.ts 0.00% 19 Missing ⚠️
src/azure/ApiCenter/ApiCenterService.ts 78.94% 8 Missing ⚠️
src/commands/rules/enableRules.ts 94.28% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
+ Coverage   40.86%   41.71%   +0.85%     
==========================================
  Files          81       81              
  Lines        4860     4921      +61     
  Branches      111      125      +14     
==========================================
+ Hits         1986     2053      +67     
+ Misses       2873     2867       -6     
  Partials        1        1              
Files Coverage Δ
src/azure/ApiCenter/ApiCenterRestAPIs.ts 100.00% <100.00%> (ø)
src/azure/ApiCenter/contracts.ts 100.00% <100.00%> (ø)
src/uiStrings.ts 100.00% <100.00%> (ø)
src/commands/rules/enableRules.ts 96.29% <94.28%> (+1.85%) ⬆️
src/azure/ApiCenter/ApiCenterService.ts 30.58% <78.94%> (+9.29%) ⬆️
src/commands/rules/deployRules.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

do {
response = await client.sendRequest(options);
if (response.parsedBody?.status === "Succeeded") {
return { isSuccessful: true };
Copy link
Contributor

Choose a reason for hiding this comment

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

the response no need to return?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just return ApiCenterRulesetImportResult

url: location,
};

const timeout = 30000; // 30 seconds in milliseconds
Copy link
Member

Choose a reason for hiding this comment

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

Do we consider use retry times like 5 times? Or the service team recommend to use timeout?

Copy link
Member Author

Choose a reason for hiding this comment

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

The 'importing spec' written by service team used this pattern, so I just follow it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just synced with Alex yesterday, he recommand to set timeout as 60 seconds, as the job may be long.

@formulahendry formulahendry merged commit fc84036 into main Aug 9, 2024
11 checks passed
@formulahendry formulahendry deleted the junhan/managed-lint-api-change branch August 9, 2024 03:46
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