Skip to content

Commit 8429e84

Browse files
authored
Merge pull request #3 from initia-labs/feat/executor-audit
audit and comments
2 parents 222d087 + 830dc18 commit 8429e84

Some content is hidden

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

56 files changed

+1699
-489
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @initia-labs/core

.github/ISSUE_TEMPLATE/bug_report.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Additional context**
24+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/lint.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Lint
2+
# This workflow is run on every pull request and push to master
3+
# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed.
4+
on:
5+
pull_request:
6+
paths:
7+
- "**.go"
8+
- "go.mod"
9+
- "go.sum"
10+
push:
11+
branches:
12+
- main
13+
- "release/*"
14+
paths:
15+
- "**.go"
16+
- "go.mod"
17+
- "go.sum"
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
golangci:
25+
env:
26+
GOLANGCI_LINT_VERSION: v1.59.1
27+
name: golangci-lint
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-go@v5
32+
with:
33+
go-version: 1.22
34+
check-latest: true
35+
- uses: technote-space/[email protected]
36+
id: git_diff
37+
with:
38+
PATTERNS: |
39+
**/**.go
40+
go.mod
41+
go.sum
42+
# install golangci-lint
43+
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
44+
- name: run go linters (long)
45+
if: env.GIT_DIFF
46+
id: lint_long
47+
run: |
48+
make lint
49+
env:
50+
GIT_DIFF: ${{ env.GIT_DIFF }}
51+
- uses: technote-space/[email protected]
52+
if: steps.lint_long.outcome == 'skipped'
53+
with:
54+
PATTERNS: |
55+
**/**.go
56+
go.mod
57+
go.sum
58+
- name: run go linters (short)
59+
if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF
60+
run: |
61+
make lint
62+
env:
63+
GIT_DIFF: ${{ env.GIT_DIFF }}
64+
LINT_DIFF: 1
65+
# Use --check or --exit-code when available (Go 1.19?)
66+
# https://github.com/golang/go/issues/27005
67+
tidy:
68+
runs-on: ubuntu-latest
69+
name: tidy
70+
steps:
71+
- uses: actions/checkout@v4
72+
- name: Setup go
73+
uses: actions/setup-go@v5
74+
with:
75+
go-version: 1.22
76+
check-latest: true
77+
- run: |
78+
go mod tidy
79+
CHANGES_IN_REPO=$(git status --porcelain)
80+
if [[ -n "$CHANGES_IN_REPO" ]]; then
81+
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
82+
git status && git --no-pager diff
83+
exit 1
84+
fi

.github/workflows/test.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build & Test
2+
on:
3+
pull_request:
4+
paths:
5+
- "**.go"
6+
push:
7+
branches:
8+
- main
9+
- "release/*"
10+
paths:
11+
- "**.go"
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
test:
19+
name: Run test
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/setup-go@v3
23+
with:
24+
go-version: 1.22
25+
- name: Install openssl
26+
run: sudo apt-get install libssl-dev
27+
- uses: actions/checkout@v3
28+
- uses: technote-space/get-diff-action@v4
29+
with:
30+
PATTERNS: |
31+
**/**.go
32+
go.mod
33+
go.sum
34+
- name: build
35+
run: |
36+
make build
37+
- name: test
38+
if: env.GIT_DIFF
39+
run: |
40+
go test ./... -mod=readonly -timeout 12m
41+
env:
42+
GIT_DIFF: ${{ env.GIT_DIFF }}

.gitignore

+15-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
executor.json
1+
executor.json
2+
3+
# Go specific
4+
*.exe
5+
*.dll
6+
*.so
7+
*.dylib
8+
*.test
9+
*.out
10+
11+
# Build output
12+
build/
13+
14+
# Dependency directories
15+
vendor/

LICENSE

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
Business Source License 1.1
2+
3+
License text copyright © 2023 MariaDB plc, All Rights Reserved.
4+
“Business Source License” is a trademark of MariaDB plc.
5+
6+
-----------------------------------------------------------------------------
7+
8+
Parameters
9+
10+
Licensor: Initia Foundation
11+
12+
Licensed Work: Initia
13+
The Licensed Work is (c) 2023 Initia Foundation
14+
15+
Additional Use Grant: None
16+
17+
Change Date: 2028-01-01
18+
19+
Change License: GNU Lesser General Public License v3.0 or later
20+
21+
For information about alternative licensing arrangements for the Software,
22+
please visit: https://mariadb.com/products/mariadb-enterprise
23+
24+
-----------------------------------------------------------------------------
25+
26+
Terms
27+
28+
The Licensor hereby grants you the right to copy, modify, create derivative
29+
works, redistribute, and make non-production use of the Licensed Work. The
30+
Licensor may make an Additional Use Grant, above, permitting limited
31+
production use.
32+
33+
Effective on the Change Date, or the fourth anniversary of the first publicly
34+
available distribution of a specific version of the Licensed Work under this
35+
License, whichever comes first, the Licensor hereby grants you rights under
36+
the terms of the Change License, and the rights granted in the paragraph
37+
above terminate.
38+
39+
If your use of the Licensed Work does not comply with the requirements
40+
currently in effect as described in this License, you must purchase a
41+
commercial license from the Licensor, its affiliated entities, or authorized
42+
resellers, or you must refrain from using the Licensed Work.
43+
44+
All copies of the original and modified Licensed Work, and derivative works
45+
of the Licensed Work, are subject to this License. This License applies
46+
separately for each version of the Licensed Work and the Change Date may vary
47+
for each version of the Licensed Work released by Licensor.
48+
49+
You must conspicuously display this License on each original or modified copy
50+
of the Licensed Work. If you receive the Licensed Work in original or
51+
modified form from a third party, the terms and conditions set forth in this
52+
License apply to your use of that work.
53+
54+
Any use of the Licensed Work in violation of this License will automatically
55+
terminate your rights under this License for the current and all other
56+
versions of the Licensed Work.
57+
58+
This License does not grant you any right in any trademark or logo of
59+
Licensor or its affiliates (provided that you may use a trademark or logo of
60+
Licensor as expressly required by this License).
61+
62+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
63+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
64+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
65+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
66+
TITLE.
67+
68+
MariaDB hereby grants you permission to use this License’s text to license
69+
your works, and to refer to it using the trademark “Business Source License”,
70+
as long as you comply with the Covenants of Licensor below.
71+
72+
-----------------------------------------------------------------------------
73+
74+
Covenants of Licensor
75+
76+
In consideration of the right to use this License’s text and the “Business
77+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
78+
other recipients of the licensed work to be provided by Licensor:
79+
80+
1. To specify as the Change License the GPL Version 2.0 or any later version,
81+
or a license that is compatible with GPL Version 2.0 or a later version,
82+
where “compatible” means that software provided under the Change License can
83+
be included in a program with software provided under GPL Version 2.0 or a
84+
later version. Licensor may specify additional Change Licenses without
85+
limitation.
86+
87+
2. To either: (a) specify an additional grant of rights to use that does not
88+
impose any additional restriction on the right granted in this License, as
89+
the Additional Use Grant; or (b) insert the text “None”.
90+
91+
3. To specify a Change Date.
92+
93+
4. Not to modify this License in any other way.
94+
95+
-----------------------------------------------------------------------------
96+
97+
Notice
98+
99+
The Business Source License (this document, or the “License”) is not an Open
100+
Source license. However, the Licensed Work will eventually be made available
101+
under an Open Source License, as stated in this License.
102+
103+
For more information on the use of the Business Source License for MariaDB
104+
products, please visit the MariaDB Business Source License FAQ at
105+
https://mariadb.com/bsl-faq-mariadb.
106+
107+
For more information on the use of the Business Source License generally,
108+
please visit the Adopting and Developing Business Source License FAQ at
109+
https://mariadb.com/bsl-faq-adopting.

LICENSE.header

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SPDX-License-Identifier: BUSL-1.1
2+
3+
Copyright (C) 2023, Initia Foundation. All rights reserved.
4+
Use of this software is govered by the Business Source License included
5+
in the LICENSE file of this repository and at www.mariadb.com/bsl11.
6+
7+
ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY
8+
TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER
9+
VERSIONS OF THE LICENSED WORK.
10+
11+
THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF
12+
LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF
13+
LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE).
14+
15+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
16+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
17+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
19+
TITLE.

0 commit comments

Comments
 (0)