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

Changes required for sdk-repo based emitter pipelines #9147

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

hallipr
Copy link
Member

@hallipr hallipr commented Oct 11, 2024

Changes required by pr Azure/azure-sdk-for-net#46511

Chages tested in pipeline run internal/4224817

archetype-typespec-emitter.yml:

  • Created using logic from /eng/pipelines/templates/stages/archetype-autorest-preview.yml

create-authenticated-npmrc.yml:

  • Moved into eng/common to support archetype-typespec-emitter.yml

CommandInvocation-Helpers.ps1:

  • Converted Invoke-LoggedCommand to CmdLet to support -ErrorAction parameter
  • Added $AllowedExitCodes parameter to support commands with expected non-zero exit codes
  • Added Set-ConsoleEncoding parameter. This is needed to force utf-8, non-ansi output of some commands.

New-RegenerateMatrix.ps1:

  • Pass the $OnlyTypeSpec parameter to the language specific implementation of Get-${Language}-DirectoriesForGeneration and only filter packages with it in New-RegenerateMatrix if there's no language override.

New-EmitterPackageJson.ps1:
I wanted to simplify the way branded packages can force emitter peer pinning in emitter-package.json without having to restate all of the unbranded emitter's peer dependencies. By adding a custom section to package.json we can list the devDependencies that should be forwarded to emitter-package.json for peer pinning.

instead of:

  "peerDependencies": {
    "@azure-tools/typespec-azure-core": ">=0.46.0 <1.0.0 || ~0.47.0-0",
    "@azure-tools/typespec-client-generator-core": ">=0.46.0 <1.0.0 || ~0.47.0-0",
    "@typespec/compiler": ">=0.60.0 <1.0.0 || ~0.61.0-0",
    "@typespec/http": ">=0.60.0 <1.0.0 || ~0.61.0-0",
    "@typespec/openapi": ">=0.60.0 <1.0.0 || ~0.61.0-0",
    "@typespec/rest": ">=0.60.0 <1.0.0 || ~0.61.0-0",
    "@typespec/versioning": ">=0.60.0 <1.0.0 || ~0.61.0-0"
   }
  "devDependencies": {
    "@azure-tools/typespec-azure-core": "0.46.0",
    "@azure-tools/typespec-client-generator-core": "0.46.2",
    "@typespec/compiler": "0.60.0",
    "@typespec/http": "0.60.0",
    "@typespec/openapi": "0.60.0",
    "@typespec/rest": "0.60.0",
    "@typespec/versioning": "0.60.0",
    
    "@eslint/js": "^9.2.0",
    "@types/node": "~18.13.0"
  }

we can:

  "devDependencies": {
    "@azure-tools/typespec-azure-core": "0.46.0",
    "@azure-tools/typespec-client-generator-core": "0.46.2",
    "@typespec/compiler": "0.60.0",
    "@typespec/http": "0.60.0",
    "@typespec/openapi": "0.60.0",
    "@typespec/rest": "0.60.0",
    "@typespec/versioning": "0.60.0",
    
    "@eslint/js": "^9.2.0",
    "@types/node": "~18.13.0"
  },
  "azure-sdk/emitter-package-json-pinning": [
    "@azure-tools/typespec-azure-core",
    "@azure-tools/typespec-client-generator-core",
    "@typespec/compiler",
    "@typespec/http",
    "@typespec/openapi",
    "@typespec/rest",
    "@typespec/versioning"
  ]

@hallipr hallipr requested a review from a team as a code owner October 11, 2024 22:13
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

A few comments but nothing blocking.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

azure-sdk added a commit to Azure/azure-sdk-for-js that referenced this pull request Oct 16, 2024
@hallipr hallipr merged commit 4909002 into Azure:main Oct 16, 2024
12 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.

4 participants