Skip to content

Commit cf97a55

Browse files
authored
Merge branch 'main' into issues/1565
2 parents 02a9181 + 97be390 commit cf97a55

File tree

19 files changed

+1006
-7
lines changed

19 files changed

+1006
-7
lines changed

.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/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @testforstephen @jdneo
1+
* @testforstephen @jdneo @wenytang-ms @chagong

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

0 commit comments

Comments
 (0)