Skip to content

Commit 14a8156

Browse files
committed
Merge branch 'main' into feature/formatter
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
2 parents cda50e7 + 8b83b2e commit 14a8156

File tree

98 files changed

+16518
-8064
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+16518
-8064
lines changed

.eslintrc.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
node-version: '20'
1515
- uses: actions/checkout@v2
1616

17-
- run: npm install
17+
- run: npm ci
1818

1919
- run: npm install -g vsce ovsx
2020

.github/workflows/webpack_ci.yaml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: NodeJS with Webpack
22

3-
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
3+
on: pull_request
84

95
jobs:
106
build:
@@ -22,9 +18,14 @@ jobs:
2218
with:
2319
node-version: ${{ matrix.node-version }}
2420

21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Type check
25+
run: npm run typings
26+
2527
- name: Build and package
2628
run: |
27-
npm install
2829
npx webpack
2930
npm install -g vsce
3031
vsce package
@@ -35,18 +36,41 @@ jobs:
3536
cat $GITHUB_ENV
3637
3738
- name: Upload dist artifacts
38-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4
3940
with:
4041
name: test_vsix
4142
path: ${{env.vsix_name}}
4243

44+
- name: Find Comment
45+
uses: peter-evans/find-comment@v1
46+
id: fc
47+
with:
48+
issue-number: ${{ github.event.pull_request.number }}
49+
comment-author: 'github-actions[bot]'
50+
body-includes: new build is available
51+
4352
- name: Post comment
53+
continue-on-error: true
54+
if: steps.fc.outputs.comment-id == ''
4455
uses: actions/github-script@v5
4556
with:
4657
script: |
4758
github.rest.issues.createComment({
4859
issue_number: context.issue.number,
4960
owner: context.repo.owner,
5061
repo: context.repo.repo,
51-
body: '👋 A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.\n * [Download here.](https://github.com/halcyon-tech/vscode-db2i/actions/runs/${{ github.run_id }})\n'
62+
body: '👋 A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.\n * [Download here.](https://github.com/codefori/vscode-db2i/actions/runs/${{ github.run_id }})\n* [Read more about how to test](https://github.com/codefori/vscode-db2i/blob/master/.github/pr_testing_template.md)'
5263
})
64+
65+
- name: Update comment
66+
continue-on-error: true
67+
if: steps.fc.outputs.comment-id != ''
68+
uses: peter-evans/create-or-update-comment@v1
69+
with:
70+
edit-mode: replace
71+
comment-id: ${{ steps.fc.outputs.comment-id }}
72+
body: |
73+
👋 A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.
74+
75+
* [Download here.](https://github.com/codefori/vscode-db2i/actions/runs/${{ github.run_id }})
76+
* [Read more about how to test](https://github.com/codefori/vscode-db2i/blob/master/.github/pr_testing_template.md)

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ node_modules
22
.vscode-test/
33
*.vsix
44
.DS_Store
5-
dist
6-
types
5+
dist

.prompts/self-analyst.prompt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
temperature: 0.3
2+
description: Analyze and identify patterns in SELF errors on IBM i
3+
---
4+
<system>
5+
You are a highly experienced SQL error logging specialist with deep expertise in the SQL Error Logging Facility (SELF) on IBM i. Your knowledge extends across the entire SQLSTATE code set, SQL diagnostic logs, error resolution techniques, and performance optimization in Db2 for i. Your primary goal is to guide users through identifying the root causes of SQL errors and warnings, helping them enhance their system's stability and performance.
6+
7+
When responding to user queries:
8+
- Offer detailed, structured explanations of error causes and potential resolutions.
9+
- Provide examples of similar issues and proven best practices.
10+
- Use your expertise to suggest preventive measures for future error mitigation.
11+
- Highlight any trends or patterns in the errors and suggest long-term improvements to error-handling strategies and system configuration.
12+
- Include references to specific IBM i documentation where applicable.
13+
14+
Keep in mind the need for both short-term fixes and strategies for long-term stability and performance.
15+
</system>
16+
17+
{{{ db2i "*SELF"}}}
18+
{{{ input }}}
19+
20+
As a database administrator, perform a thorough analysis of the SELF errors logged on the IBM i system. Look for recurring error patterns, identify root causes, and provide actionable recommendations for resolving these issues and improving future error handling.

.prompts/self-report.prompt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
temperature: 0.3
2+
description: Generate a report on SELF error
3+
---
4+
<system>
5+
You are an expert in the SQL Error Logging Facility (SELF) on IBM i, a specialized tool designed for capturing, logging, and analyzing SQL errors and warnings in Db2 for i environments. Your expertise includes in-depth knowledge of SQLSTATE codes, SQL error handling, diagnostic logs, and optimizing error reporting for performance. Your goal is to offer precise, actionable guidance on configuring, using, and troubleshooting SELF, ensuring users can identify root causes, improve error handling strategies, and maintain optimal performance.
6+
7+
When responding to user queries:
8+
- Provide clear, step-by-step explanations and direct references to relevant documentation.
9+
- Identify potential edge cases, focusing on how to prevent, detect, and resolve errors efficiently.
10+
- Address both short-term fixes and long-term best practices for robust error logging and system reliability.
11+
</system>
12+
13+
{{{ input }}}
14+
15+
Please analyze the provided SELF error using the following guidelines:
16+
17+
1. **Error Analysis**:
18+
- Examine the error message, SQLSTATE code, and relevant diagnostic information.
19+
- Identify the root cause and potential contributing factors.
20+
21+
2. **SQL Context**:
22+
- Provide the SQL statement or context that likely triggered the error.
23+
- Explain any relevant patterns or operations in the SQL code that could lead to similar issues.
24+
25+
3. **Resolution Guidance**:
26+
- Offer specific recommendations for resolving the error.
27+
- Suggest ways to prevent similar errors in future queries or operations.
28+
29+
4. **Diagnostic Insights**:
30+
- Analyze the diagnostic logs, explaining their significance and how they relate to the identified issue.
31+
32+
5. **Performance Considerations**:
33+
- Discuss any performance implications related to the error and error-handling process.
34+
- Provide tips for optimizing SELF configurations to minimize performance impact during error logging.

.vscode/launch.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,24 @@
3131
"preLaunchTask": "${defaultBuildTask}",
3232
"sourceMaps": true,
3333
"env": {
34-
"testing": "true"
34+
"db2_testing": "true"
35+
}
36+
},
37+
{
38+
"name": "Launch Tests (Specific)",
39+
"type": "extensionHost",
40+
"request": "launch",
41+
"args": [
42+
"--extensionDevelopmentPath=${workspaceFolder}"
43+
],
44+
"outFiles": [
45+
"${workspaceFolder}/dist/**/*.js"
46+
],
47+
"preLaunchTask": "${defaultBuildTask}",
48+
"sourceMaps": true,
49+
"env": {
50+
"db2_testing": "true",
51+
"db2_specific": "true"
3552
}
3653
},
3754
]

.vscode/tasks.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
"type": "npm",
88
"script": "webpack-dev",
99
"problemMatcher": "$ts-webpack-watch",
10+
"isBackground": false,
11+
1012
"presentation": {
1113
"reveal": "never"
1214
},
1315
"group": {
1416
"kind": "build",
15-
"isDefault": true
17+
"isDefault": true,
1618
}
1719
}
1820
]

.vscodeignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ vsc-extension-quickstart.md
1010
media/main.png
1111
node_modules
1212
src
13-
types
1413
.github
1514
src/dsc.ts

media/context.png

28.9 KB
Loading

0 commit comments

Comments
 (0)