Граф коммитов

6 Коммитов

Автор SHA1 Сообщение Дата
Matthew Podwysocki 291f09bc6f
[maps] Upgrade @azure-rest/maps-search to ESM/vitest (#31931)
### Packages impacted by this PR

- @azure-rest/maps-search

### Issues associated with this PR

- https://github.com/Azure/azure-sdk-for-js/issues/31338

### Describe the problem that is addressed by this PR

Migrates the @azure-rest/maps-search package to ESM/vitest via
automation.

### 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?


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


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### 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](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
2024-11-25 16:04:12 -05:00
Jeremy Meng d5f6d677ec [EngSys] standardize OSS copyright header
- [eslint-plugin] github-source-headers rule should use "MIT License".

  This change updates our linter rule and the whole repository to have consistent
  license header.

***NO_CI***

- remove "All rights reserved." from header

- "MIT license" => "MIT License"
2024-08-27 13:01:38 -07:00
Andrew Kao f47f29548f
[Maps] Migrate test to federated authentication (#30420)
### Packages impacted by this PR
- @azure-rest/maps-search
- @azure-rest/maps-route
- @azure-rest/maps-render
- @azure-rest/maps-geolocation

### Issues associated with this PR
#29699 

### Describe the problem that is addressed by this PR
1. Migrate the test to federated authentication
2. In the samples, use AAD auth as default authentication method.

### 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?
NA


### Are there test cases added in this PR? _(If not, why?)_
Yes, changes are made in the `Maps<serviceName>.spec.ts`. Note that
there are some failed pipelines:
1. LRO test in maps-route-rest: Known issue. Maps team has an exist work
item under the internal backlog.
2. `CredentialUnavailableError` in macos environment under
maps-geolocation: Know issue. #30356

### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] 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](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
2024-08-07 13:47:02 +08:00
Andrew Kao 27ebb3d6c0
[Maps] [Search] Onboarding Maps Search V2 (#27772)
### Issues associated with this PR
NA

### Describe the problem that is addressed by this PR
- Introducing Map Search V2 SDK generated by [the backend API
definition](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/maps/data-plane/Search/stable/2023-06-01/search.json).
- The V2 APIs is not backward compatible; this is approved by the API
review board. In SDK side, we decide to do backward compatibility by
giving instruction to the users as follow:
  - Install two version separately as dependencies
```json
{
  "dependencies": {
    "@azure-rest/map-search-v1": "npm:@azure-rest/map-search@^1.0.0",
    "@azure-rest/map-search-v2": "npm:@azure-rest/map-search@^2.0.0"
  }
}
```
  - Import them saperately:
```js
import MapSerachClientV1 from "@azure-rest/map-search-v1";
import MapSearchClientV2 from "@azure-rest/map-search-v2";
```

### 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?
The other consideration is adding a new package for search V2. We will
migrate to V2 eventually and we will only apply bug fixes for V1, thus
we decided to bump the major version. Also, since `^1.0.0` is still in
public-preview, it's safe for SDK side to introduce breaking changes
without a version bump.

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

### Provide a list of related PRs _(if any)_
NA

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [x] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [x] Added a changelog (if necessary)
2023-11-20 15:06:11 +00:00
Andrew Kao d79860f3ad
[Maps] Fix Failed AAD Test Case & Provide the Correct `versionPolicyName` for Maps SDKs (#26422)
### Packages impacted by this PR
- @azure-rest/maps-search
- @azure-rest/maps-render
- @azure-rest/maps-route
- @azure-rest/maps-geolocation

### Issues associated with this PR
- #24864

### Describe the problem that is addressed by this PR
Fix two pipeline errors:
1. [Azure AD test case
failed](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2187391&view=logs&j=49bb90fd-ec2d-5416-ef10-2a6d86fff2c7&t=b3b4cfd7-3453-5920-bad4-3d8acc30f0d2&l=84)
2. The job [Detecting package
archive_azure-rest-maps-render](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2899063&view=logs&j=b1e79959-24d8-5aa9-2799-72d40c3e051b&t=0c17bb1c-5ccf-5c48-315a-409f277f6cf2&l=14)
failed by not providing correct `versionPolicyName`

### 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?
For the AAD test failed, it's caused by the duplication of the
environment variables `MAPS_CLIENT_ID`. I used this environment variable
as the Maps resource ID in the test, but I do two things wrong:
1. `MAPS_CLIENT_ID` is already used as the Azure AD client ID (see the
[test.yml](031c9743eb/sdk/maps/maps-geolocation-rest/tests.yml (L10))),
so the variable name cannot be used again.
2. The map resource ID is not exposed as an environment variable in the
[arm
template](031c9743eb/sdk/maps/test-resources.json (L58)).

So what I have done is basically rename the env variable to
`MAPS_RESOURCE_CLIENT_ID` to differentiate and expose it in the arm
template

For the failed job [Detecting package
archive_azure-rest-maps-render](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2899063&view=logs&j=b1e79959-24d8-5aa9-2799-72d40c3e051b&t=0c17bb1c-5ccf-5c48-315a-409f277f6cf2&l=14),
I add the correct `versionPolicyName` in the `rush.json` as the error
message suggest.

Note that you can still see errors in those pipelines. There's two
errors:
1. [LRO test
failed](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2899097&view=logs&j=49bb90fd-ec2d-5416-ef10-2a6d86fff2c7&t=b3b4cfd7-3453-5920-bad4-3d8acc30f0d2)
2. `AzureKeyCredential` type mismatch in ubuntu2004_node_14x_max and
ubuntu2004_node_14x_min

Since the PR is already big enough, I'll open another PRs to address
these issues.

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

### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [x] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [x] Added a changelog (if necessary)
2023-07-24 10:12:09 +08:00
Andrew Kao 49a15abd4a
[Maps] Onboarding `@azure-rest/maps-search` (#24056)
* Initial code gen

* Add auth layer & format

* Set up test environment

* Add tests & helper function

* Add recording

* Add samples

* Refine samples

* Build samples

* Refine README

* Finalize

* Add cspell whitelist for maps-search-rest

* Add auth section in the code snippet

* Disable doc ms

* Refactor the samples for batch request

* Add samples build
2022-12-02 16:37:57 +08:00