Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
5e16b00
fix(github/actions): waiting webhooked started before launch k6
42atomys Jul 9, 2022
0dc9ba2
chore: reboot rework
42atomys Jul 19, 2025
5a8adef
chore: remove load test result
42atomys Jul 19, 2025
8a93774
refactor core, add rate limiting, and improve tests
42atomys Jul 20, 2025
7e7af1e
chore: ignore load testing results
42atomys Jul 21, 2025
2f6a2fc
fix: allow custom the config init path
42atomys Jul 21, 2025
2bb0a63
refactor: de-dup hook decoding field
42atomys Jul 21, 2025
c0591f9
chore: remove legacy function
42atomys Jul 21, 2025
6140932
refactor: de-dup template context
42atomys Jul 21, 2025
097779b
chore: any over interface
42atomys Jul 21, 2025
34e3d95
chore: resolve typo on request
42atomys Jul 21, 2025
900935f
refactor: remove global variables and use di
42atomys Jul 21, 2025
8fbc101
chore: unified error handling with errorf
42atomys Jul 21, 2025
20902e6
fix: buff err chan to prevent go routine leak
42atomys Jul 21, 2025
06e5834
fix: somes edges fixes
42atomys Jul 21, 2025
7f0fed1
chore: remove unused type
42atomys Jul 21, 2025
c899314
fix: uninitialized postgres map
42atomys Jul 21, 2025
771f0fd
fix: lot of fixes due to integrations tests
42atomys Jul 25, 2025
f901d1e
chore: move to a maintained repo of amqp
42atomys Jul 29, 2025
0289569
test(integrations): setup full suite of integrations tests
42atomys Jul 29, 2025
dd283b4
test(integrations): setup full suite of integrations tests
42atomys Jul 29, 2025
d625d81
Merge branch 'chore/readme-refactor' of https://github.com/42atomys/w…
42atomys Jul 29, 2025
fe26ff4
refactor: complete ci suite
42atomys Jul 29, 2025
9fc1784
fix: somes fixes raised by ci
42atomys Jul 29, 2025
2f01e7d
fix: workflow configs for benchmarks and CI
42atomys Jul 29, 2025
989719e
chore: upgrade mapstructure
42atomys Jul 29, 2025
8cfd03b
fix: nancy usage
42atomys Jul 29, 2025
98be509
chore: upgrade go deps
42atomys Jul 29, 2025
2fbce9d
chore: upgrade to go 1.24
42atomys Jul 29, 2025
9f1114c
fix: remove lint deps to uni-tests
42atomys Jul 29, 2025
18aacaa
chore: bump go version on ci
42atomys Jul 29, 2025
bfb4d47
fix: bump go version on security workflow
42atomys Jul 29, 2025
7e775ce
fix: bump version for license check
42atomys Jul 29, 2025
f624810
fix: reduce file perms
42atomys Jul 29, 2025
871c33a
fix: standardize has int32
42atomys Jul 29, 2025
3734105
test: somes improvements
42atomys Jul 29, 2025
5d85c62
test: some adjustements for load testing
42atomys Jul 29, 2025
5e0d22b
test: add benchmarks
42atomys Jul 29, 2025
a5be466
fix: errcheck on benchmarks
42atomys Jul 29, 2025
7cf2475
test: resolves new issues
42atomys Jul 29, 2025
af9b6c9
chore: remove useless matrix and settings
42atomys Jul 29, 2025
ed4d579
refactor: change test integration declaration with env var
42atomys Jul 30, 2025
3bd537c
chore: test localhost for integration test
42atomys Jul 30, 2025
a848357
Revert "chore: test localhost for integration test"
42atomys Jul 30, 2025
cceb874
chore: another test for cci run
42atomys Jul 30, 2025
831709c
fix: get configuration from env instead of static definition
42atomys Jul 30, 2025
7d5f92f
fix: remove database creation from test
42atomys Jul 30, 2025
ab4a530
test: use unit tag to separate tests
42atomys Jul 30, 2025
385e852
fix: prevent duplications of integrations runs
42atomys Jul 30, 2025
cd0e48c
fix: invalid postgres database on tes
42atomys Jul 30, 2025
2b98f6f
fix: add tags to enchmarks
42atomys Jul 30, 2025
9435b47
chore: upload codecov reports from integrations too
42atomys Jul 30, 2025
0e16e11
chore: somes changes for codecov
42atomys Jul 30, 2025
d6ef574
ci: somes changes on workflows to allow more lisibility
42atomys Jul 30, 2025
176466f
chore: add docker build to taskfile
42atomys Jul 30, 2025
fd3a88d
fix: task correct var usage
42atomys Jul 30, 2025
8d0d937
chore: remove docker scout as require login
42atomys Jul 30, 2025
2203246
fix: add go build tag to docker build
42atomys Jul 30, 2025
d1e4ac4
chore: move task var on global scope
42atomys Jul 30, 2025
080d2d7
test: somes new tests cases
42atomys Jul 30, 2025
cddd052
test: add more unit test across the app
42atomys Jul 31, 2025
ed800be
test: few more unit tests
42atomys Jul 31, 2025
aed9e3f
test: add test for flags
42atomys Jul 31, 2025
a907dd7
fix: disable log on test and benchamrks to reduce noise
42atomys Aug 5, 2025
deed5db
fix: suppress zerolog output in benchmark tests
42atomys Aug 5, 2025
5a5e7c3
chore: run ci
42atomys Aug 5, 2025
9a0407b
fix: install task on benchmark workflow
42atomys Aug 5, 2025
0aba24e
chore: remove uploads on benchmarks
42atomys Aug 6, 2025
9084b73
chore: remove storing of benchmarks results
42atomys Aug 9, 2025
01548d1
perf: move log init to main function
42atomys Aug 9, 2025
d751182
chore: remove version benchmark
42atomys Aug 9, 2025
17ab097
chore: reduce benchmark test count from 5 to 4
42atomys Aug 9, 2025
c859d2e
fix(test): increase time sleep for github runner
42atomys Aug 9, 2025
f27ec78
chore: remove unused benchmarks from cmd
42atomys Aug 9, 2025
c9eabca
fix: disable logs on benchmarks
42atomys Aug 9, 2025
06b5b97
fix: resolve benchmars too long issue
42atomys Aug 16, 2025
54ef4ff
fix: remove test file
42atomys Aug 16, 2025
c54ae5c
chore: gitingore test file
42atomys Aug 16, 2025
b1cc0de
chore: changing license to AGPL-3.0 + commercial license
42atomys Aug 16, 2025
3208526
chore: rework LICENSE and CONTRIBUTING files
42atomys Aug 28, 2025
d642164
chore: update docs and licensing
42atomys Aug 29, 2025
8c6fb2b
fix: increase lisibility of readme images
42atomys Aug 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 17 additions & 39 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,66 @@
"dockerComposeFile": "docker-compose.yaml",
"service": "workspace",
"workspaceFolder": "/workspace",

"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": true,
"username": "devcontainer",
"userUid": "1001",
"userGid": "1001"
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/eitsupi/devcontainer-features/go-task:1": {},
"ghcr.io/dhoeric/features/k6:1": {},
"ghcr.io/devcontainers-extra/features/apt-get-packages": {
"packages": [
"redis-tools",
"postgresql-client"
]
}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.coverMode": "atomic",
"go.coverOnSave": true,
"go.disableConcurrentTests": true,
"go.testTags": "unit,integration",
"go.buildTags": "unit,integration",
"editor.formatOnSave": true,
"go.lintTool": "golangci-lint",
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"gopls": {
"ui.completion.usePlaceholders": true,
// Experimental settings
"completeUnimported": true, // autocomplete unimported packages
"deepCompletion": true, // enable deep completion
"staticcheck": true
},
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll": true
"source.organizeImports": "always",
"source.fixAll": "always"
},
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.suggestSelection": "first",
"git.autofetch": true,
"files.autoGuessEncoding": true,
"files.encoding": "utf8",
"workbench.editor.decorations.badges": true,
"workbench.editor.decorations.colors": true,
"go.delveConfig": {
"apiVersion": 2,
"showGlobalVariables": false
},
"editor.inlineSuggest.enabled": true,
"editor.rulers": [80],
"editor.rulers": [
80
],
"search.useGlobalIgnoreFiles": true,
"search.useParentIgnoreFiles": true,
"workbench.productIconTheme": "fluent-icons",
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go",
"aaron-bond.better-comments",
"IBM.output-colorizer",
"miguelsolorio.fluent-icons",
"jasonnutter.vscode-codeowners",
"cschleiden.vscode-github-actions",
"eamodio.gitlens",
"jinliming2.vscode-go-template",
"quicktype.quicktype"
"redhat.vscode-yaml"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8080 // webhooked port
],

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode",
"portsAttributes": {
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.1'
services:
workspace:
image: mcr.microsoft.com/devcontainers/go:1.0.0-1.20-bookworm
image: mcr.microsoft.com/devcontainers/base:debian
volumes:
- ..:/workspace:cached
environment:
Expand Down Expand Up @@ -43,5 +43,6 @@ services:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Per default all source code is owned by @42Atomys
* @42Atomys
72 changes: 72 additions & 0 deletions .github/cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Configuration for git-cliff changelog generator
# https://github.com/orhun/git-cliff

[changelog]
# Changelog header
header = """
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

"""
# Template for the changelog body
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [Unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.breaking %}[**BREAKING**] {% endif %}{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# Remove the leading and trailing whitespace from the templates
trim = true
# Changelog footer
footer = """
<!-- generated by git-cliff -->
"""

[git]
# Parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# Filter out the commits that are not conventional
filter_unconventional = true
# Process each line of a commit as an individual commit
split_commits = false
# Regex for preprocessing the commit messages
commit_preprocessors = [
# Remove issue numbers from commits
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
]
# Regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 2 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 3 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 4 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🔐 Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
]
# Protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# Filter out the commits that are not matched by commit parsers
filter_commits = false
# Sort the tags topologically
topo_order = false
# Sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
63 changes: 63 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Configuration for PR labeler
# https://github.com/actions/labeler

# Add 'aspect/documentation 📚' label to any change in docs folder
aspect/documentation 📚:
- changed-files:
- any-glob-to-any-file:
- 'docs/**'
- '*.md'
- LICENSE

# Add 'aspect/tests 🧪' label to any change in test files
aspect/tests 🧪:
- changed-files:
- any-glob-to-any-file:
- '**/*_test.go'
- 'tests/**'

# Add 'aspect/ci ⚙️' label to any change in GitHub Actions
aspect/ci ⚙️:
- changed-files:
- any-glob-to-any-file:
- '.github/workflows/**'
- '.goreleaser.yaml'
- 'Dockerfile'

# Add 'aspect/depencencies 📦️' label to any dependency update
aspect/depencencies 📦️:
- changed-files:
- any-glob-to-any-file:
- 'go.mod'
- 'go.sum'
- '.github/dependabot.yml'

# Add 'aspect/security 🔒' label to security-related files
aspect/security 🔒:
- changed-files:
- any-glob-to-any-file:
- 'security/**'

# Add 'aspect/storage 💾' label to storage-related changes
aspect/storage 💾:
- changed-files:
- any-glob-to-any-file:
- 'storage/**'

# Add 'aspect/internal 🏗️' label to internal related stuffs
aspect/internal 🏗️:
- changed-files:
- any-glob-to-any-file:
- 'cmd/**'
- 'internal/**'
- 'semaphore/**'
- 'format/**'

# Add 'aspect/docker 🐳' label to Docker-related changes
aspect/docker 🐳:
- changed-files:
- any-glob-to-any-file:
- 'Dockerfile'
- '.dockerignore'
- 'docker-compose.yml'
- '.devcontainer/**'
Binary file modified .github/profile/webhooked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Description

<!-- A clear and concise description of what this PR does. -->
<!-- Link the related issue with "Fix #1" or "Resolve #1" -->

---

## Breaking changes?

yes / no

---

## Contributor License Agreement (CLA)

By submitting this PR, I confirm that:

- I wrote this code myself **or** I have the right to submit it
- I agree that my contribution will be licensed under:
- **AGPL-3.0** (Community Edition)
- **Enterprise Edition License** (for commercial customers)
- If contributing as part of my job, I have permission from my employer to contribute

✅ No extra signatures needed — submitting this PR means I agree.

---

## Checklist

- [ ] I have linked the related issue to this pull request
- [ ] I have added or updated tests related to my changes
- [ ] I have updated the documentation if needed
- [ ] I only marked this PR as **Ready for Review** once all items are checked

---

## Additional context

<!-- Add any other context about your PR here. -->
88 changes: 88 additions & 0 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Benchmarks

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: write
deployments: write

jobs:
benchmark:
name: Performance Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: |
go install golang.org/x/perf/cmd/benchstat@latest
go mod download

- name: Run benchmarks
run: |
task benchmarks

load-test-benchmark:
name: Load Test Benchmark
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true

- name: Install k6
run: |
curl https://github.com/grafana/k6/releases/download/v0.53.0/k6-v0.53.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1
sudo mv k6 /usr/local/bin/

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build application
run: task build

- name: Run load test benchmark
env:
REDIS_HOST: localhost
REDIS_PORT: 6379
run: |
./bin/webhooked serve --port 8081 --config tests/loadtesting/webhooks.tests.yaml &
sleep 5
k6 run tests/loadtesting/k6_load_script.js
Loading
Loading