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

930 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Meng a28e8f0795 [EngSys] move to vendored version of cross-env via dev-tool
***NO_CI***

- apply the transformation

- update samples' README
2024-11-02 00:48:06 +00:00
Jeremy Meng 980f3cbb89 [EngSys] move `uglify-js` to dev-tool vendored
- add dep to `uglify-js` in dev-tool

- rush update

- replace "uglifyjs" with "dev-tool run vendored yglifyjs"

- remove dependency to "uglifyjs" in sdk packages

***NO_CI***
2024-10-30 18:01:20 +00:00
Jeremy Meng 6a2c7300eb [eslint-plugin] add rule "@typescript-eslint/consistent-type-imports": "warn"
- apply lint:fix results

- revert fixes that are not related to consistent-type-imports and cases error

- regenerate .api.md files

- format

- update core-comparison diff
2024-10-30 15:48:52 +00:00
Deyaaeldeen Almahallawi 9382fb5ce3
[Event Hubs] Fix sample (#31578)
Fixes https://github.com/Azure/azure-sdk-for-js/issues/31571
2024-10-30 05:40:21 -07:00
Jeremy Meng 1cae9db8e1 [EngSys] remove "audit" NPM script and it's related file
as we no longer use it and rely on GitHub security features.

***NO_CI***
2024-10-25 19:28:06 +00:00
Jeremy Meng 59bb0809ba [EngSys] use vendored version of `mkdirp` and `rimraf` from dev-tool
also remove dependency on `@microsoft/api-extractor` as we already move to
`dev-tool run extract-api` which calls api-extractor Api instead.

***NO_CI***
2024-10-23 17:53:07 +00:00
Wes Haggard 1c50b6ac49
Switch to TME test subscription (#31329) 2024-10-14 18:19:12 -07:00
Deyaaeldeen Almahallawi bc0a1ee7fd
[Event Hubs] Add hotfix changelog entry (#31397) 2024-10-14 21:32:18 +00:00
Deyaaeldeen Almahallawi 06cfc0d211
[Event Hubs] Re-enable min/max testing (#31351)
Live run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4230873&view=results

---------

Co-authored-by: Maor Leger <maorleger@microsoft.com>
2024-10-14 14:20:14 -07:00
Deyaaeldeen Almahallawi 09df4d579c
[Event Hubs Checkpoint Tables] Update tests (#31366)
To accommodate GeoDR.

Live run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4226755&view=results
2024-10-14 07:31:36 -07:00
Deyaaeldeen Almahallawi 9115f0e364
[Event Hubs] Add message structure validation to the producer (#31346)
### Packages impacted by this PR
@azure/event-hubs

### Issues associated with this PR
https://github.com/Azure/azure-sdk-for-js/issues/31067

### Describe the problem that is addressed by this PR
This PR adds runtime validation to the input message structure. This is
needed so that strict receivers that follow the AMQP spec don't reject
non-compliant messages.

### 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?
N/A

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

### Provide a list of related PRs _(if any)_
https://github.com/Azure/azure-sdk-for-js/pull/31330

### 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)_
- [x] Added a changelog (if necessary)
2024-10-09 10:13:33 -07:00
Deyaaeldeen Almahallawi f1615c85ef
[Event Hubs] Re-enable samples testing (#31347)
Addresses https://github.com/Azure/azure-sdk-for-js/issues/30580

Live run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4211884&view=results
2024-10-09 08:52:27 -07:00
Jeremy Meng c64f2e45a4
[core-amqp] move geographic replication constant to Event Hubs (#31328)
So that we can release GA fixes from main branch.

While at it, also port CHANGELOG entries from hotfix branch.
2024-10-08 13:44:47 -07:00
Jeremy Meng 652a7ffa89 [eslint-plugin] fix ts-naming-options rule issue
***NO_CI***

Currently the rule only handles the case of

```ts
  clientMethod(options: MethodOptions) {}
```

but not when the options bag parameter has a default value

```ts
  clientMethod(options: MethodOptions = {}) {}
```

This change adds code to handle the latter.

- Add two unit tests

- Update the affected packages to suppress this rule as a warning

- react to the fix
2024-10-02 16:40:01 +00:00
Matthew Podwysocki 61c8b9aae4 [EngSys] Add update-snippets to all package.json files ***NO_CI*** 2024-09-26 17:59:37 +00:00
Maor Leger 64c72d5dda [engsys] Move all packages to build-package script ***NO_CI*** 2024-09-25 18:52:35 +00:00
Jeremy Meng a7b3656a05 [EngSys] upgrade dev dependency `typescript` version to `~5.6.2`
***NO_CI***

- replace version to "~5.6.2"
- rush update
- add `"skipLibCheck": true` for several packages that are affected by https://github.com/vitest-dev/vitest/issues/4688

- [formrecognizer] help TypeScript to understand with more explicit type

- [schema-registry-{avro,json}] skip lib check due to lru-cache issue with the Iterator TReturn change

https://github.com/isaacs/node-lru-cache/issues/348
2024-09-19 18:07:31 -07:00
ZiWei Chen 928149383a
[mgmt] add Sanitized rule and update changelog template to fix ci fai… (#30226) 2024-09-06 17:10:40 +08:00
ZiWei Chen 8ddc182af9
[mgmt] eventhub release (#30454)
https://github.com/Azure/sdk-release-request/issues/5318
2024-09-06 09:59:59 +08:00
Jeremy Meng 397d95d859
[Doc][eventhubs-checkpointstore-blob] fix broken link (#30954)
Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com>
2024-08-29 17:37:59 +00: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
Jeremy Meng f04044e34e [eslint] remove ESLINT_USE_FLAT_CONFIG=true env variable
now that we have moved to eslint v9.

***NO_CI***
2024-08-26 12:52:48 -07:00
Deyaaeldeen Almahallawi 620aafbc03
[Event Hubs] [Bicep] Factor out KV definition (#30894)
Moving to a modular bicep definition so that we can share bits and
pieces between all of them. This PR factors out the key vault definition
so other bicep scripts can import it too. For now, it lives next to the
event hub's test-resources.bicep script but I'll consider moving it to a
central place once other libraries move to import it.

The PR also edits the script to make it more compact.

Live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4079360&view=results
2024-08-26 09:51:06 -07:00
Jeremy Meng 5adb09d715 [engsys] upgrade dev dependency eslint to v9
***NO_CI***

- bump eslint version to ^9.9.0
- [eslint-plugin] remove eslint-plugin-import for now. Will re-visit until it supports eslint v9
2024-08-23 16:37:40 -07:00
Jeremy Meng 2ce3c5feb4 [eslint-plugin] upgrade typescript-eslint to v8
***NO_CI***

- bump typescript-eslint dependencies version to ~8.2.0

- [eslint-plugin] suppress new linting errors appearing with v8

- [eslint-plugin] react to removed typescript-eslint property

  related PR https://github.com/typescript-eslint/typescript-eslint/pull/9025

- [eslint-plugin] turn off @typescript-eslint/no-unused-expressions

  as no-unused-expressions is already reported by eslint

- [dev-tool] fix new linting errors

- Remove @typescript-eslint/ban-types that no longer exists

  and replace with more specific rules wherever applicable.

- [cosmosdb] combine the test eslint config with the main one

- delete catch expression when caught error is not used

- fix or suppress linting errors in code files
2024-08-23 10:19:23 -07:00
Jeremy Meng 4ab6590ffe Apply automated migration to eslint flat config 2024-08-22 11:43:19 -07:00
Deyaaeldeen Almahallawi 9f926ce30d
[Event Hubs] Fix link (#30844) 2024-08-21 20:13:43 +00:00
Deyaaeldeen Almahallawi 62349ada36
[Event Hubs] Stash connection strings in KV (#30786)
Remove all secrets from the test and samples environment by moving them
to a key vault. This makes Event Hubs 100% secret leak proof. After this
PR is merged, the [bicep
warnings](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4068500&view=logs&j=43701d7e-216c-59bf-08d1-1efd0c7ac90a&t=ab7504d1-0931-5f5b-4856-14ba60b3e108&l=23)
about exposing secrets will be gone.

Live tests succeeded in
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4068840&view=results
2024-08-21 09:47:03 -07:00
Jeremy Meng af6ccc6765
[eslint] move eventhub and servicebus to flat config (#30807)
- replace .eslintrc.json with eslint.config.mjs
- fix linting errors
  - URL is in global scope on all of our supported platforms
- we use "buffer" npm package for browsers support so suppressing errors
2024-08-20 08:45:49 -07:00
Jeremy Meng 0854e57c06
[linting] move monitor-opentelemetry-exporter to use flat config (#30792)
- add a config in eslint-plugin-azure-sdk for linting with type
information
- remove .eslint* and replace with eslint.config.mjs
- remove --ext from linting NPM scripts
- fix linting error: URL is now available in global scope on our
supported platforms.
2024-08-16 17:18:54 -07:00
Deyaaeldeen Almahallawi 95a2131813
[Event Hubs] Migrate from ARM to bicep (#30778)
successful live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4056540&view=results
2024-08-16 10:03:15 -07:00
Jeremy Meng 405c244bb1 [linting] move perf tests to use eslint flat config
***NO_CI***

- add one flat config file for perf tests

- update NPM scripts of these packages to use that flat config for perf tests

  As eslint v8 still not switched to flat config by default, this change
  temporarily uses `cross-env` to set `ESLINT_USE_FLAT_CONFIG=true`

  Once we moved to eslint v9 the env var can be removed.
2024-08-15 10:56:56 -07:00
Deyaaeldeen Almahallawi f1e5bcf058
[Event Hubs] Re-enable tracing tests (#30760)
By depending on `@azure-tools/test-utils-vitest`.
2024-08-14 18:39:57 -07:00
Deyaaeldeen Almahallawi 04e383e6f9
Upgrade tshy to v2 (#30747)
And in some cases downgrade from v3 to v2 (in event hubs and in
core-sse).
2024-08-13 16:01:59 -07:00
Deyaaeldeen Almahallawi 43d495aa99
[Event Hubs] Unpin deps (#30729)
Fixes a browser version mismatch issue in live pipelines.

Successful live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4045087&view=results
2024-08-13 10:03:18 -07:00
Deyaaeldeen Almahallawi d19f8fb5e5
[Event Hubs] Abstract event receiver and processor in tests (#30687)
So consumer group name can be loaded from the environment variable.

Live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4039773&view=results
2024-08-09 17:42:04 -07:00
Deyaaeldeen Almahallawi 94492c74bd
[Event Hubs] Standardize consumer group name env var (#30653)
Addresses
https://github.com/Azure/azure-sdk-for-js/issues/30203#issuecomment-2268593415
2024-08-05 23:00:42 -07:00
Jeremy Meng 7b6d6fee86
[docs][mock-hub] fix broken link after the samples refactoring (#30652) 2024-08-05 11:04:32 -07:00
Deyaaeldeen Almahallawi 8dfd5a7e29
[Event Hubs] Cleanup IoT Hub samples (#30641)
They now reference the environment variable created by the arm template.
2024-08-04 11:05:41 -07:00
Deyaaeldeen Almahallawi 085100584e
[Event Hubs Checkpoint Store Tables] Migrate to TSHY and vitest (#30639)
As the title says.

Live run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4021464&view=results
2024-08-02 22:16:59 -07:00
Deyaaeldeen Almahallawi 55682acf66
[mockhub] Migrate to TSHY and vitest (#30634)
- migrates mockhub to TSHY and vitest
- stubs a test suite
- add a review folder
- migrates samples to be published by dev-tool

/cc @harshanalluru
2024-08-02 16:51:09 -07:00
Deyaaeldeen Almahallawi 3e7496983c
[eventhub] cleanup (#30631)
deletes outdated files from the service directory.
2024-08-02 11:45:48 -07:00
Deyaaeldeen Almahallawi 689d583ddf
[Event Hubs Checkpoint Store] Migrate to TSHY and vitest (#30620)
### Packages impacted by this PR
@azure/eventhubs-checkpointstore-blob

### Issues associated with this PR

N/A

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

- migrates to use TSHY and vitest
- uses storage endpoint instead of storage connection string in the
tests
- enables browser testing
- updates test-resources.json accordingly
- fixes a behavior where an error is being wrapped in another

Live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4018408&view=results

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

N/A

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

N/A

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

N/A

### 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-02 11:06:26 -07:00
Jeremy Meng 0c6305124d
[appconf, etc.] upgrade dependency `@azure/abort-controller` version to v2 (#30600)
- upgrade for app-configuration

- upgrade for ai-language-conversations

- upgrade for container-registry

- upgrade for event hubs checkpoint stores

- upgrade for mock-hub
2024-08-01 11:02:23 -07:00
Deyaaeldeen Almahallawi ea4c874241
[Event Hubs] Fix browser bundling (#30592)
The browser tests are
[failing](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4009481&view=logs&j=8f098e13-557e-5a76-9331-06424800e0fa&t=52fc44a1-b208-5374-c579-e601a962726b)
because some test suites import test-utils that imports chai@^4.0.0
which conflicts with chai@^5.0.0 that vitest depends on. This PR
consolidates the tests that depend on test-utils in one test suite and
excludes it from the browser tests for now.

Live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4013779&view=results
2024-07-31 18:51:12 -07:00
Deyaaeldeen Almahallawi 7fc55f6aaa
[vitest] Use verbose reporter (#30581)
The verbose reporter writes out the status of each unit test after it
gets executed. This is inline with our experience with mocha before and
it helps us track progress better in real time.
2024-07-31 11:38:00 -07:00
Deyaaeldeen Almahallawi 1456e89237
[Event Hubs] Update sample (#30582)
Addresses issue #4 in
https://github.com/Azure/azure-sdk-for-js/issues/30555.
2024-07-31 10:06:17 -07:00
Deyaaeldeen Almahallawi a1d93c49ad
[Event Hubs] Migrate to use TSHY and vitest (#30421)
### Packages impacted by this PR
@azure/event-hubs

### Issues associated with this PR

N/A

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

This PR does the following:
- migrates Event Hubs client library to the new world of using TSHY for
building the library and using vitest as the test runner
- consolidates client building in a single module and uses fully
qualified name spaces and token credentials to build clients instead of
using connection strings
- runs mock-hub once instead of in every test module
- disables min/max testing and samples testing because they're not
playing well with TSHY and vitest at the moment. I'll open an issue to
track turning them back on once the testing pipelines have been
upgraded.

Live Tests are passing:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4000037&view=results

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

N/A

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

N/A

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

N/A

### 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-07-30 12:04:11 -07:00
Ben Broderick Phillips 73193a2bab
Default to sub config file paths/svc connection for public + sovereign live tests (#30530)
This doesn't cover the many files still using secret sub configs with
custom principals, those will be migrated separately. This changes the
defaults to use file-based sub configs and service connections
everywhere else. It is intended to be merged after/alongside federated
auth mode becoming the default.

Relies on https://github.com/Azure/azure-sdk-tools/pull/8680
2024-07-25 16:07:48 -04:00
Jeremy Meng 3a68e456b2 [Samples] update "src/**.ts" to "src/**/*.ts" in tsconfig.json
Previously dev-tool has been fixed to generate correct include path in samples
tsconfig.json but samples were not updated.

This PR fixes the samples tsconfig.json in one run; otherwise with the recent
branch protection policy changes, when individual packages re-publish samples,
js-core team would have to approve the tsconfig.json changes.

***NO_CI***
2024-07-24 13:53:00 +00:00