Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
71d45ed
Tests/increase coverage (#45)
coccyx Feb 25, 2025
0e2e5e4
Adding deploy steps
coccyx Feb 25, 2025
a01295c
Removed modinput and Splunk app support (#47)
coccyx Feb 28, 2025
c81b8b2
Removed modinput and Splunk app support (#48)
coccyx Mar 2, 2025
5ecb7ea
Adding fix for long intervals not shutting down in a reasonable time …
coccyx Mar 2, 2025
7ac1543
adding LLM context generator script (#50)
coccyx Mar 2, 2025
b4dbcd0
Last commit to up version to 0.11.0
coccyx Mar 2, 2025
f53c124
Updating API (#52)
coccyx Mar 16, 2025
670a5a3
Adding new UI (#53)
coccyx Mar 18, 2025
4bbbd3b
trying to fix CICD
coccyx Mar 18, 2025
63544ce
Fixed deploy_lambdas.sh and merged remote changes
coccyx Mar 18, 2025
ac64f28
fixed merge conflicts in ci.yml
coccyx Mar 18, 2025
e6bc41e
fixed deploy_lambdas.sh and moved building UI to the main build step
coccyx Mar 18, 2025
128aea8
adding more logging for deploy_lambdas.sh
coccyx Mar 18, 2025
6fc5ffc
Fixed parameter overrides format and added requirements.txt
coccyx Mar 19, 2025
ce666ed
Fixed AWS region to use us-east-1 consistently
coccyx Mar 19, 2025
13b9379
Trying to fix deploy_lambdas.sh to get the right certificate ARN.
coccyx Apr 18, 2025
a340872
Some debug statements and fixes for getting the certificate ARN.
coccyx Apr 18, 2025
7d342cd
Trying one more time
coccyx Apr 18, 2025
109c629
Stupid AI. You can only output the actual thing you want to return fr…
coccyx Apr 18, 2025
dadb80a
Merging master into dev
coccyx Apr 19, 2025
6cefb4f
Bug/shutdown fix (#56)
coccyx Apr 19, 2025
45b46ff
Bump golang.org/x/net from 0.35.0 to 0.38.0 (#55)
dependabot[bot] Apr 19, 2025
f2bda10
fixing merge conflicts
coccyx Nov 12, 2025
67711bf
whoops fixing merge conflicts again
coccyx Nov 12, 2025
b643e7a
Feature/better deploy (#67)
coccyx Nov 12, 2025
1a19b80
Bug/outputterrace (#69)
coccyx Nov 12, 2025
e6b4199
fixing deploy lambdas error hopefully
coccyx Nov 12, 2025
2e73532
trying to fix deploy
coccyx Nov 12, 2025
8057700
trying again
coccyx Nov 12, 2025
bef86b9
adding some policies to IAM
coccyx Nov 13, 2025
48f0b44
Merge branch 'master' into dev
coccyx Feb 2, 2026
7d3063d
Add GitHub OAuth authentication for configuration management (#74)
coccyx Feb 2, 2026
b818415
Feature/GitHub oauth (#75)
coccyx Feb 2, 2026
591901a
Feature/GitHub oauth (#76)
coccyx Feb 2, 2026
34aab3a
Redesign UI with dark developer-focused theme (#78)
coccyx Feb 5, 2026
55db9ac
Unify create/edit screens with execution panel and collapsible JSON b…
coccyx Feb 5, 2026
a00bf98
Improve test coverage from 52% to 75% with simplified test helpers (#81)
coccyx Mar 3, 2026
25aeee5
DRY quick wins: reduce boilerplate with no behavior change
coccyx Mar 3, 2026
360e843
Replace deprecated io/ioutil with io and os equivalents
coccyx Mar 3, 2026
f62dd46
Deduplicate Splunk HEC field transform into template.TransformHECFields
coccyx Mar 3, 2026
f6d48c2
Add HTTP helper with proper resource cleanup and error type
coccyx Mar 3, 2026
60d50c9
Improve error handling: return parse errors, log marshal errors
coccyx Mar 3, 2026
ca608ae
Fix logger package name to match directory (logging -> logger)
coccyx Mar 3, 2026
7a5e408
Split config.go into focused files for better maintainability
coccyx Mar 3, 2026
d5899ed
Fix concurrency safety: sync.Once for ROT init, replace deprecated oa…
coccyx Mar 3, 2026
19c5635
Fix flaky TestTCPRFC5424Output by trimming trailing newline
coccyx Mar 3, 2026
cd5bbcb
Add integration test suite and optimize string building in token gene…
coccyx Mar 3, 2026
785cc87
Simplify review: remove redundancies, fix error wrapping, optimize loops
coccyx Mar 3, 2026
8d75496
Bump version to 0.13.0 for dev release
coccyx Mar 3, 2026
2e5e2f9
Harden config auth and fix UI test/build flow (#82)
coccyx Mar 6, 2026
654321c
fixing staging API url
coccyx Mar 10, 2026
9d35f3c
fixing the UI
coccyx Mar 10, 2026
18dd226
fixing deploys on master pushes
coccyx Mar 10, 2026
1f35225
Merge master into dev to reconcile diverged histories
coccyx Mar 10, 2026
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
58 changes: 17 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,86 +52,62 @@ jobs:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: docker build -t clintsharp/gogen .

# Deployment steps run on both master and dev branches
# Deployment steps only run on dev branch; production deploys are handled by release.yml
- name: Configure AWS Credentials
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
if: github.ref == 'refs/heads/dev'
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Deploy Build Artifacts to S3
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: |
if [ "${{ github.ref }}" = "refs/heads/master" ]; then
aws s3 sync build s3://gogen-artifacts-prod --delete
else
aws s3 sync build s3://gogen-artifacts-staging --delete
fi

- name: Run Docker Push Script
if: github.ref == 'refs/heads/master'
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: bash docker-push.sh
if: github.ref == 'refs/heads/dev'
run: aws s3 sync build s3://gogen-artifacts-staging --delete

- name: Setup Node.js
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
if: github.ref == 'refs/heads/dev'
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Deploy UI
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
if: github.ref == 'refs/heads/dev'
run: |
chmod +x ui/deploy_ui.sh
if [ "${{ github.ref }}" = "refs/heads/master" ]; then
ui/deploy_ui.sh
else
ui/deploy_ui.sh -e staging
fi
ui/deploy_ui.sh -e staging

deploy-lambdas:
runs-on: ubuntu-latest
needs: build
# Skip if this is a tag push (handled by release workflow)
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && startsWith(github.ref, 'refs/tags/') == false
# Production deploys are handled by release.yml on tagged commits
if: github.ref == 'refs/heads/dev'
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.13'

- name: Install AWS SAM CLI
run: |
python -m pip install --upgrade pip
pip install aws-sam-cli boto3 botocore awscli

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Deploy Lambda Functions
env:
# Set ROLE_ARN based on the branch
ROLE_ARN: ${{ github.ref == 'refs/heads/master' && secrets.PROD_LAMBDA_ROLE_ARN || secrets.STAGING_LAMBDA_ROLE_ARN }}
# Set GitHub OAuth credentials based on the branch
GITHUB_OAUTH_CLIENT_ID: ${{ github.ref == 'refs/heads/master' && secrets.PROD_GITHUB_OAUTH_CLIENT_ID || secrets.STAGING_GITHUB_OAUTH_CLIENT_ID }}
GITHUB_OAUTH_CLIENT_SECRET: ${{ github.ref == 'refs/heads/master' && secrets.PROD_GITHUB_OAUTH_CLIENT_SECRET || secrets.STAGING_GITHUB_OAUTH_CLIENT_SECRET }}
ROLE_ARN: ${{ secrets.STAGING_LAMBDA_ROLE_ARN }}
GITHUB_OAUTH_CLIENT_ID: ${{ secrets.STAGING_GITHUB_OAUTH_CLIENT_ID }}
GITHUB_OAUTH_CLIENT_SECRET: ${{ secrets.STAGING_GITHUB_OAUTH_CLIENT_SECRET }}
run: |
cd gogen-api
if [ "${{ github.ref }}" = "refs/heads/master" ]; then
# Prod deployment
bash deploy_lambdas.sh
else
# Staging deployment
bash deploy_lambdas.sh -e staging
fi
bash deploy_lambdas.sh -e staging
28 changes: 25 additions & 3 deletions gogen-api/iam_policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,33 @@
"Resource": "*"
},
{
"Sid": "DynamoDBDescribePermissions",
"Sid": "CloudFrontListPermissions",
"Effect": "Allow",
"Action": "dynamodb:DescribeTable",
"Action": "cloudfront:ListDistributions",
"Resource": "*"
},
{
"Sid": "CloudFrontInvalidationPermissions",
"Effect": "Allow",
"Action": "cloudfront:CreateInvalidation",
"Resource": [
"arn:aws:cloudfront::715681304208:distribution/E1YKFKA6Y16FT0",
"arn:aws:cloudfront::715681304208:distribution/E2PCMI0RQZI3B7"
]
},
{
"Sid": "DynamoDBPermissions",
"Effect": "Allow",
"Action": [
"dynamodb:Scan",
"dynamodb:Query",
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:UpdateItem",
"dynamodb:DeleteItem"
],
"Resource": [
"arn:aws:dynamodb:*:*:table/gogen-api-prod-gogen",
"arn:aws:dynamodb:*:*:table/gogen",
"arn:aws:dynamodb:*:*:table/gogen-staging"
]
}
Expand Down
4 changes: 2 additions & 2 deletions ui/.env.staging
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VITE_API_URL=/api
VITE_API_URL=https://staging-api.gogen.io/v1
VITE_GITHUB_CLIENT_ID=Ov23liep3eAw002qddGU
VITE_GITHUB_REDIRECT_URI=https://staging.gogen.io/auth/callback
VITE_GITHUB_REDIRECT_URI=https://staging.gogen.io/auth/callback
14 changes: 14 additions & 0 deletions ui/deploy_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,18 @@ fi
echo "Deploying to s3://$BUCKET/"
aws s3 sync dist/ "s3://$BUCKET/" --delete

# Invalidate CloudFront cache
echo "Looking up CloudFront distribution for $BUCKET..."
DISTRIBUTION_ID=$(aws cloudfront list-distributions \
--query "DistributionList.Items[?Aliases.Items[?@=='${BUCKET}']].Id | [0]" \
--output text)

if [ -z "$DISTRIBUTION_ID" ] || [ "$DISTRIBUTION_ID" = "None" ]; then
echo "Warning: No CloudFront distribution found for $BUCKET. Skipping cache invalidation."
else
echo "Invalidating CloudFront distribution $DISTRIBUTION_ID..."
aws cloudfront create-invalidation --distribution-id "$DISTRIBUTION_ID" --paths "/*"
echo "CloudFront invalidation created."
fi

echo "Deployment completed successfully for $ENVIRONMENT environment!"
11 changes: 3 additions & 8 deletions ui/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ interface Config {
githubRedirectUri: string;
}

function getEnvValue(name: string): string {
const value = process.env[name];
return value ?? '';
}

export const config: Config = {
apiBaseUrl: getEnvValue('VITE_API_URL'),
githubClientId: getEnvValue('VITE_GITHUB_CLIENT_ID'),
githubRedirectUri: getEnvValue('VITE_GITHUB_REDIRECT_URI'),
apiBaseUrl: process.env.VITE_API_URL ?? '',
githubClientId: process.env.VITE_GITHUB_CLIENT_ID ?? '',
githubRedirectUri: process.env.VITE_GITHUB_REDIRECT_URI ?? '',
};
Loading