Skip to content

Commit 888a2cf

Browse files
Merge remote-tracking branch 'upstream/main' into feature/support-string-cp-splitting
2 parents 8c7e4a3 + 1be1fef commit 888a2cf

6 files changed

Lines changed: 288 additions & 4 deletions

File tree

.azure-pipelines/nightly.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ resources:
1919
- repository: self
2020
type: git
2121
ref: refs/heads/main
22-
- repository: MicroBuildTemplate
22+
- repository: CustomPipelineTemplates
2323
type: git
2424
name: 1ESPipelineTemplates/MicroBuildTemplate
25+
ref: refs/tags/release
2526
trigger: none
2627
extends:
27-
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
28+
template: azure-pipelines/MicroBuild.1ES.Official.yml@CustomPipelineTemplates
2829
parameters:
2930
pool:
3031
name: MSEngSS-MicroBuild2022-1ES
@@ -38,6 +39,7 @@ extends:
3839
signing:
3940
enabled: true
4041
signType: real
42+
signWithProd: true
4143
zipSources: false
4244
feedSource: 'https://mseng.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
4345
outputs:
@@ -111,6 +113,8 @@ extends:
111113
displayName: Sign extension
112114
inputs:
113115
script: dotnet %MBSIGN_APPFOLDER%/ddsignfiles.dll /file:extension.signature.p7s /certs:4014052
116+
env:
117+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
114118
- task: CopyFiles@2
115119
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
116120
inputs:

.azure-pipelines/rc.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ resources:
1414
- repository: self
1515
type: git
1616
ref: refs/heads/main
17-
- repository: MicroBuildTemplate
17+
- repository: CustomPipelineTemplates
1818
type: git
1919
name: 1ESPipelineTemplates/MicroBuildTemplate
20+
ref: refs/tags/release
2021
trigger: none
2122
extends:
22-
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
23+
template: azure-pipelines/MicroBuild.1ES.Official.yml@CustomPipelineTemplates
2324
parameters:
2425
pool:
2526
name: MSEngSS-MicroBuild2022-1ES
@@ -33,6 +34,7 @@ extends:
3334
signing:
3435
enabled: true
3536
signType: real
37+
signWithProd: true
3638
zipSources: false
3739
feedSource: 'https://mseng.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
3840
outputs:
@@ -109,6 +111,8 @@ extends:
109111
displayName: Sign extension
110112
inputs:
111113
script: dotnet %MBSIGN_APPFOLDER%/ddsignfiles.dll /file:extension.signature.p7s /certs:4014052
114+
env:
115+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
112116
- task: CopyFiles@2
113117
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
114118
inputs:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This pipeline is used to release the VS Code Java Debug extension from the nightly/stable build.
2+
# It contains following steps:
3+
# 1. Download the plugin artifact from the nightly/stable build pipeline.
4+
# 2. Publish the plugin to the marketplace.
5+
6+
name: $(Date:yyyyMMdd).$(Rev:r) # Use the current date and a revision number for the build name.
7+
8+
variables:
9+
- name: Codeql.Enabled
10+
value: true
11+
resources:
12+
repositories:
13+
- repository: self
14+
type: git
15+
ref: refs/heads/main
16+
- repository: 1esPipelines
17+
type: git
18+
name: 1ESPipelineTemplates/1ESPipelineTemplates
19+
ref: refs/tags/release
20+
trigger: none
21+
extends:
22+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
23+
parameters:
24+
pool:
25+
os: linux
26+
name: 1ES_JavaTooling_Pool
27+
image: 1ES_JavaTooling_Ubuntu-2004
28+
stages:
29+
- stage: Release
30+
jobs:
31+
- job: Job
32+
displayName: Release VS Code Java Debug Extension
33+
templateContext:
34+
type: releaseJob
35+
isProduction: true
36+
inputs:
37+
- input: pipelineArtifact
38+
buildType: specific
39+
project: $(AzDo.ProjectId) # Azure DevOps project ID
40+
definition: $(AzDo.BuildPipelineId) # artifact build pipeline ID
41+
artifactName: vsix
42+
downloadType: specific
43+
targetPath: '$(Build.SourcesDirectory)'
44+
steps:
45+
- task: UseNode@1
46+
displayName: 'Use Node.js 20.x'
47+
inputs:
48+
version: '20.x'
49+
- task: AzureCLI@2
50+
displayName: 'Publish Extension'
51+
inputs:
52+
azureSubscription: 'VSCode-Ext-Publishing'
53+
scriptType: pscore
54+
scriptLocation: inlineScript
55+
inlineScript: 'npx @vscode/vsce@latest publish -i ''$(Build.SourcesDirectory)/extension.vsix'' --manifestPath ''$(Build.SourcesDirectory)/extension.manifest'' --signaturePath ''$(Build.SourcesDirectory)/extension.signature.p7s'' --azure-credential'

.azure-pipelines/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This pipeline is used to release the VS Code Java Debug extension from the nightly/stable build.
2+
# It contains following steps:
3+
# 1. Download the plugin artifact from the nightly/stable build pipeline.
4+
# 2. Publish the plugin to the marketplace.
5+
6+
name: $(Date:yyyyMMdd).$(Rev:r) # Use the current date and a revision number for the build name.
7+
8+
variables:
9+
- name: Codeql.Enabled
10+
value: true
11+
resources:
12+
repositories:
13+
- repository: self
14+
type: git
15+
ref: refs/heads/main
16+
- repository: 1esPipelines
17+
type: git
18+
name: 1ESPipelineTemplates/1ESPipelineTemplates
19+
ref: refs/tags/release
20+
trigger: none
21+
extends:
22+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
23+
parameters:
24+
pool:
25+
os: linux
26+
name: 1ES_JavaTooling_Pool
27+
image: 1ES_JavaTooling_Ubuntu-2004
28+
stages:
29+
- stage: Release
30+
jobs:
31+
- job: Job
32+
displayName: Release VS Code Java Debug Extension
33+
templateContext:
34+
type: releaseJob
35+
isProduction: true
36+
inputs:
37+
- input: pipelineArtifact
38+
buildType: specific
39+
project: $(AzDo.ProjectId) # Azure DevOps project ID
40+
definition: $(AzDo.BuildPipelineId) # artifact build pipeline ID
41+
artifactName: vsix
42+
downloadType: specific
43+
targetPath: '$(Build.SourcesDirectory)'
44+
steps:
45+
- task: UseNode@1
46+
displayName: 'Use Node.js 20.x'
47+
inputs:
48+
version: '20.x'
49+
- task: AzureCLI@2
50+
displayName: 'Publish Extension'
51+
inputs:
52+
azureSubscription: 'VSCode-Ext-Publishing'
53+
scriptType: pscore
54+
scriptLocation: inlineScript
55+
inlineScript: 'npx @vscode/vsce@latest publish -i ''$(Build.SourcesDirectory)/extension.vsix'' --manifestPath ''$(Build.SourcesDirectory)/extension.manifest'' --signaturePath ''$(Build.SourcesDirectory)/extension.signature.p7s'' --azure-credential'

.github/llms.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Extension Pack for Java
2+
3+
Extension Pack for Java is a collection of popular extensions that can help write, test and debug Java applications in Visual Studio Code. By installing Extension Pack for Java, the following extensions are installed:
4+
5+
- [📦 Language Support for Java™ by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)
6+
- Code Navigation
7+
- Auto Completion
8+
- Refactoring
9+
- Code Snippets
10+
- [📦 Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug)
11+
- Debugging
12+
- [📦 Test Runner for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test)
13+
- Run & Debug JUnit/TestNG Test Cases
14+
- [📦 Maven for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven)
15+
- Project Scaffolding
16+
- Custom Goals
17+
- [📦 Gradle for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle)
18+
- View Gradle tasks and project dependencies
19+
- Gradle file authoring
20+
- Import Gradle projects via [Gradle Build Server](https://github.com/microsoft/build-server-for-gradle)
21+
- [📦 Project Manager for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency)
22+
- Manage Java projects, referenced libraries, resource files, packages, classes, and class members
23+
- [📦 Visual Studio IntelliCode](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode)
24+
- AI-assisted development
25+
- Completion list ranked by AI
26+
27+
## Label
28+
29+
When labeling an issue, follow the rules below per label category:
30+
31+
### General Rules
32+
33+
- Analyze if the issue is related with the scope of using extensions for Java development. If not, STOP labelling IMMEDIATELY.
34+
- Assign label per category.
35+
- If a category is not applicable or you're unsure, you may skip it.
36+
- Do not assign multiple labels within the same category, unless explicitly allowed as an exception.
37+
38+
### Issue Type Labels
39+
40+
- [bug]: Primary label for real bug issues
41+
- [enhancement]: Primary label for enhancement issues
42+
- [documentation]: Primary label for documentation issues
43+
- [question]: Primary label for question issues

.github/workflows/triage-agent.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: AI Triage - Label and Comment on New Issues
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
workflow_dispatch:
7+
inputs:
8+
issue_number:
9+
description: 'Issue number to triage (manual run). e.g. 123'
10+
required: true
11+
12+
permissions:
13+
issues: write
14+
contents: read
15+
16+
jobs:
17+
label_and_comment:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v2
23+
24+
- name: Get issue data
25+
id: get_issue
26+
uses: actions/github-script@v6
27+
with:
28+
script: |
29+
const eventName = context.eventName;
30+
let issue;
31+
if (eventName === 'workflow_dispatch') {
32+
const inputs = context.payload.inputs || {};
33+
const issueNumber = inputs.issue_number || inputs.issueNumber;
34+
if (!issueNumber) core.setFailed('Input issue_number is required for manual run.');
35+
const { data } = await github.rest.issues.get({
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
issue_number: parseInt(issueNumber, 10),
39+
});
40+
issue = data;
41+
} else if (context.payload.issue) {
42+
issue = context.payload.issue;
43+
} else {
44+
core.setFailed('No issue information found in the event payload.');
45+
}
46+
core.setOutput('id', String(issue.number));
47+
core.setOutput('user', String((issue.user && issue.user.login) || ''));
48+
core.setOutput('title', String(issue.title || ''));
49+
core.setOutput('body', String(issue.body || ''));
50+
const labelNames = (issue.labels || []).map(label => label.name);
51+
core.setOutput('labels', JSON.stringify(labelNames));
52+
53+
- name: Call Azure Function
54+
id: call_azure_function
55+
env:
56+
PAYLOAD: >-
57+
{
58+
"authToken": "${{ secrets.GITHUB_TOKEN }}",
59+
"repoId": "microsoft/vscode-java-debug",
60+
"issueData": {
61+
"id": ${{ steps.get_issue.outputs.id }},
62+
"user": ${{ toJson(steps.get_issue.outputs.user) }},
63+
"title": ${{ toJson(steps.get_issue.outputs.title) }},
64+
"body": ${{ toJson(steps.get_issue.outputs.body) }},
65+
"labels": ${{ steps.get_issue.outputs.labels }}
66+
},
67+
"mode": "DirectUpdate"
68+
}
69+
70+
run: |
71+
# Make the HTTP request with improved error handling and timeouts
72+
echo "Making request to triage agent..."
73+
74+
# Add timeout handling and better error detection
75+
set +e # Don't exit on curl failure
76+
response=$(timeout ${{ vars.TRIAGE_AGENT_TIMEOUT }} curl \
77+
--max-time 0 \
78+
--connect-timeout 30 \
79+
--fail-with-body \
80+
--silent \
81+
--show-error \
82+
--write-out "HTTPSTATUS:%{http_code}" \
83+
--header "Content-Type: application/json" \
84+
--request POST \
85+
--data "$PAYLOAD" \
86+
${{ secrets.TRIAGE_FUNCTION_LINK }} 2>&1)
87+
88+
curl_exit_code=$?
89+
set -e # Re-enable exit on error
90+
91+
echo "Curl exit code: $curl_exit_code"
92+
93+
# Check if curl command timed out or failed
94+
if [ $curl_exit_code -eq 124 ]; then
95+
echo "❌ Request timed out after 650 seconds"
96+
exit 1
97+
elif [ $curl_exit_code -ne 0 ]; then
98+
echo "❌ Curl command failed with exit code: $curl_exit_code"
99+
echo "Response: $response"
100+
exit 1
101+
fi
102+
103+
# Extract HTTP status code and response body
104+
http_code=$(echo "$response" | grep -o "HTTPSTATUS:[0-9]*" | cut -d: -f2)
105+
response_body=$(echo "$response" | sed 's/HTTPSTATUS:[0-9]*$//')
106+
107+
echo "HTTP Status Code: $http_code"
108+
109+
# Validate HTTP status code
110+
if [ -z "$http_code" ]; then
111+
echo "❌ Failed to extract HTTP status code from response"
112+
echo "Raw response: $response"
113+
exit 1
114+
fi
115+
116+
# Check if the request was successful
117+
if [ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]; then
118+
echo "✅ Azure Function call succeeded"
119+
else
120+
echo "❌ Azure Function call failed with status code: $http_code"
121+
echo "Response: $response_body"
122+
exit 1
123+
fi

0 commit comments

Comments
 (0)