Skip to content

Conversation

@sarangan12
Copy link
Contributor

@sarangan12 sarangan12 commented Jun 12, 2024

Packages impacted by this PR

@azure/arm-newrelicobservability

Issues associated with this PR

None

Describe the problem that is addressed by this PR

On June 6, 2024, an issue was reported by Manik Khandelwal as the rushx build command is failing for the @azure/arm-newrelicobservability SDK. The following error is reported:

test/newrelicobservability_operations_test.spec.ts.ts(56,7): error TS2353: Object literal may only specify known properties, and 'clientId' does not exist in type 'CreateTestCredentialOptions'.
test/newrelicobservability_operations_test.spec.ts.ts(60,56): error TS2554: Expected 0-1 arguments, but got 2.

This PR has been created to fix this issue.

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Looking at the root cause of the issue, the current code changes in the newrelicobservability_operations_test.spec.ts.ts (with client id & client secret) are added on March 21, 2024 (Refer #28829). At that time, there was no problem with the code and it was working fine.

On May 6, 2024 some changes have been done in the @azure-tools/test-credential in which the clientId and clientSecret have been removed. Thus the reported error is happening. (Now, Ideally I would have expected that such issues would have been flagged by our CI while merging the changes for @azure-tools/test-credential. But, that did not happen. Refer the CI run in #29577. @HarshaNalluru for further investigation)

In order to resolve the issue, I have removed the extra parameters. The playback mode is also running fine. The CI could be seen at https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3868221&view=results. Because of the artifact already exists, the check enforcer is not completing. But that is not a serious issue. I am overriding the check enforcer.

Are there test cases added in this PR? (If not, why?)

No. The issue itself is in the test case.

Provide a list of related PRs (if any)

  1. [mgmt] newrelicobservability release #28829
  2. [test-credential] DAC update #29577

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@xirzec @joheredi Please review and approve the PR

@github-actions github-actions bot added the Mgmt This issue is related to a management-plane library. label Jun 12, 2024
@sarangan12 sarangan12 changed the title Fix the Test Case [@azure/arm-newrelicobservability] Fix the Test Case Jun 12, 2024
@sarangan12
Copy link
Contributor Author

/check-enforcer override

@sarangan12 sarangan12 marked this pull request as ready for review June 12, 2024 21:20
@sarangan12 sarangan12 requested review from joheredi and xirzec June 12, 2024 21:21
@sarangan12 sarangan12 merged commit 0acaf3f into Azure:main Jun 12, 2024
@qiaozha
Copy link
Member

qiaozha commented Jun 13, 2024

@sarangan12 @HarshaNalluru @jeremymeng should we also clean up all the mgmt plane tests for similar parameters like clientId, clientSecret ?

By the way, I guess the check enforcer is not working probably because the ci is disabled, there's some kind of rules to automatically disable ci if it has not been running for a given duration.

@sarangan12
Copy link
Contributor Author

@qiaozha If there is client secret used, then it might cause errors similar to the ones reported in this. In that case, my recommendation would be yes. They must be fixed. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants