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

Fix #8305: failed to generate the changelog between HLC and Modular #8332

Merged
merged 14 commits into from
May 28, 2024

Conversation

wanlwanl
Copy link
Member

@wanlwanl wanlwanl commented May 24, 2024

Generated CHANGELOG.md (2024-05-24):

HLC

# Release History
    
## 4.0.0 (2024-05-24)
    
**Breaking Changes**

  - Interface SuppressionsListOptionalParams no longer has parameter skipToken
    
## 3.2.0 (2023-08-03)

**Features**

- Class AdvisorManagementClient has a new signature
- Interface RecommendationsListNextOptionalParams no longer has parameter filter
- Interface RecommendationsListNextOptionalParams no longer has parameter skipToken
- Interface RecommendationsListNextOptionalParams no longer has parameter top
- Interface SuppressionsListNextOptionalParams no longer has parameter skipToken
- Interface SuppressionsListNextOptionalParams no longer has parameter top

## 3.1.0 (2022-11-14)

**Features**

- Added Interface ConfigData
- Added Interface ResourceRecommendationBase
- Added Interface SuppressionContract

## 3.0.3 (2022-10-08)

**Bugs Fixed**

- revert credential scopes

## 3.0.2 (2022-09-30)

**Bugs Fixed**

- fix better user experience of credential scopes in government cloud

## 3.0.1 (2022-03-22)

**features**

- bug fix

## 3.0.0 (2021-12-29)

The package of @azure/arm-advisor is using our next generation design principles since version 3.0.0, which contains breaking changes.

To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).

To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).

To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).

Modular

Use sdk from failed PR: Azure/azure-sdk-for-js#29770

# Release History
    
## 2.0.0 (2024-05-24)
    
**Features**

  - Added Interface ArmOperationStatus
  - Added Interface DataProductsCatalogsOperations
  - Added Interface DataProductsOperations
  - Added Interface DataTypesOperations
  - Added Interface NetworkAnalyticsClientOptions
  - Added Interface OperationsOperations
  - Added Interface PagedAsyncIterableIterator
  - Added Interface PagedOperation
  - Added Interface PageSettings
  - Added Interface RestorePollerOptions
  - Added Class NetworkAnalyticsClient
  - Added Type Alias ContinuablePage
  - Added Type Alias ResourceProvisioningState
  - Added function restorePoller

**Breaking Changes**

  - Removed operation group DataProducts
  - Removed operation group DataProductsCatalogs
  - Removed operation group DataTypes
  - Removed operation group Operations
  - Deleted Class MicrosoftNetworkAnalytics
  - Interface DataProductsCreateOptionalParams no longer has parameter resumeFrom
  - Interface DataProductsDeleteOptionalParams no longer has parameter resumeFrom
  - Interface DataProductsUpdateOptionalParams no longer has parameter resumeFrom
  - Interface DataTypesCreateOptionalParams no longer has parameter resumeFrom
  - Interface DataTypesDeleteDataOptionalParams no longer has parameter resumeFrom
  - Interface DataTypesDeleteOptionalParams no longer has parameter resumeFrom
  - Interface DataTypesUpdateOptionalParams no longer has parameter resumeFrom
  - Type of parameter tags of interface DataProductUpdate is changed from {
        [propertyName: string]: string;
    } to Record<string, string>
  - Type of parameter info of interface ErrorAdditionalInfo is changed from Record<string, unknown> to Record<string, any>
  - Type of parameter userAssignedIdentities of interface ManagedServiceIdentity is changed from {
        [propertyName: string]: UserAssignedIdentity;
    } to Record<string, UserAssignedIdentity>
  - Type of parameter tags of interface TrackedResource is changed from {
        [propertyName: string]: string;
    } to Record<string, string>
  - Removed Enum KnownActionType
  - Removed Enum KnownBypass
  - Removed Enum KnownControlState
  - Removed Enum KnownCreatedByType
  - Removed Enum KnownDataProductUserRole
  - Removed Enum KnownDataTypeState
  - Removed Enum KnownDefaultAction
  - Removed Enum KnownManagedServiceIdentityType
  - Removed Enum KnownOrigin
  - Removed Enum KnownProvisioningState
  - Removed Enum KnownVersions
  - Removed function getContinuationToken
    
    
## 1.0.0 (2024-01-24)

The package of @azure/arm-networkanalytics is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).

@wanlwanl wanlwanl changed the title Fix #8305: failed to generate the changelog between HLC and Modular Fix bug: js-sdk-release-tool failed to detect api-version in modular client May 24, 2024
@wanlwanl wanlwanl changed the title Fix bug: js-sdk-release-tool failed to detect api-version in modular client Fix #8305: failed to generate the changelog between HLC and Modular May 24, 2024
@wanlwanl wanlwanl marked this pull request as ready for review May 27, 2024 05:39
@wanlwanl wanlwanl requested review from qiaozha and MaryGao as code owners May 27, 2024 05:39
tools/js-sdk-release-tools/src/common/types.ts Outdated Show resolved Hide resolved
process.exit(1);
}
// TODO: use a more concrete rule to find xxx.api.md
return path.join(packageRoot, 'review', fileNames[fileNames.length - 1]);
Copy link
Member

Choose a reason for hiding this comment

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

what does dev-tool run api-extractor give us? is it the same as what openai/review folder get? Also I think it's a little risk to pick up the last one as sort order might be different vary on the system?

Copy link
Contributor

Choose a reason for hiding this comment

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

the filenames are sorted here const fileNames = fs.readdirSync(reviewDir).sort();. the current naming convension should give the same result.

but I just find I should make extract it from package name.
e.g. package is "@azure/arm-networkanalytics"
and the api view is named arm-networkanalytics.api.md, which can be extracted from package name.

Copy link
Contributor

Choose a reason for hiding this comment

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

the filenames are sorted here const fileNames = fs.readdirSync(reviewDir).sort();. the current naming convension should give the same result.

but I just find I should make extract it from package name. e.g. package is "@azure/arm-networkanalytics" and the api view is named arm-networkanalytics.api.md, which can be extracted from package name.

just double check the dev-tool code,
the root export report name is <unscopedPackageName>.api.md
and ./subpath export will be <unscopedPackageName>-subpath .api.md

so this solution should be fine

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the investigation. I am a little doubt about the sort order actually, different os may have different behavior ? not sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the string sort is keep consistent by javascript.

let apiMdFileLocal = path.join(packagePath, 'review', fs.readdirSync(path.join(packagePath, 'review'))[0]);
const npmPackageRoot = path.join(packagePath, 'changelog-temp', 'package');
const apiMdFileNPM = getApiReviewPath(npmPackageRoot);
const apiMdFileLocal = getApiReviewPath(packagePath);
Copy link
Member

Choose a reason for hiding this comment

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

maybe not a high priority for now but should we error out if it's comparing between RLC and HLC? or Modular api layer and HLC ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like all sdk type should error out in a general way. plan to start a new pr to do it

Copy link
Contributor

Choose a reason for hiding this comment

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

leave a TODO in code

Copy link
Member

@qiaozha qiaozha left a comment

Choose a reason for hiding this comment

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

LGTM.

@qiaozha
Copy link
Member

qiaozha commented May 28, 2024

/check-enforcer override

@qiaozha qiaozha merged commit a488537 into Azure:main May 28, 2024
4 checks passed
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