Skip to content

Deployment system#157

Merged
pyramation merged 16 commits intomainfrom
deployment-system
Jul 21, 2025
Merged

Deployment system#157
pyramation merged 16 commits intomainfrom
deployment-system

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

No description provided.

- Add error metadata columns (error_message, error_code, stack_trace) to events table
- Create EventLogger utility for logging events outside main transaction
- Modify deploy/revert procedures to log failure events externally
- Update tests to expect failure events even in transaction mode
- Ensure fail events persist when deployment transactions roll back

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Add sanitizeStackTrace method to EventLogger to normalize file paths
- Remove absolute paths from stack traces to prevent CI/local mismatches
- Update snapshots with normalized stack traces

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Handle /launchql/launchql/ paths in CI environment
- Ensure proper normalization of all absolute path patterns
- Local tests now pass with correct snapshots

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Change event types from 'fail' to original event types (deploy/revert/verify)
- Move stack trace sanitization to test fixture only
- Update tests to reflect new event type behavior
- Sanitize stack traces with comprehensive rules for testing

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Handle CI paths (/__w/launchql/launchql/) before local paths for better specificity
- Update snapshots to reflect proper path normalization
- All deploy-failure-scenarios tests now pass locally

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Fixed bug where cleanEvents was using events.rows instead of sanitizedEvents
- This ensures stack traces are properly sanitized for CI compatibility
- All deploy-failure-scenarios tests now pass with updated snapshots

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
…and add verify event logging

- Modified sanitizeStackTrace to use process.cwd() instead of hardcoded paths
- Added eventLogger.logEvent calls for verify operations with error metadata
- Confirmed test event count of 4 is intentional (transaction vs non-transaction comparison)

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
…ndling behavior

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
…snapshots or fixtures

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Add test for verify failure when referencing non-existent table
- Remove duplicate event logging in verify method, keep detailed version
- Follows existing test patterns for failure scenarios

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Remove duplicate event logging in verify method - now only logs once with detailed error info
- Add proper type casting (::TEXT) to SQL INSERT statements in event logger
- Modify verify method to throw errors on verification failure for better error handling
- Add verify failure test for non-existent table reference scenario

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Change test to use expect().toThrow() style instead of try/catch
- Remove duplicate event logging in verify method, keeping only detailed logging in normal failure path

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Remove duplicate basic event logging from else block
- Make verification failures throw errors to trigger rich logging in catch block
- Rich logging now captures error message, error code, and stack trace
- Update test expectations to match new error message format
- Update snapshots to reflect rich error information

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Remove stack_trace column from launchql_migrate.events table schema
- Remove stackTrace property from EventLogEntry interface
- Update SQL INSERT statements to exclude stack_trace column
- Remove stackTrace from all logEvent calls in client.ts
- Remove stack_trace from test fixture queries
- Remove sanitizeStackTrace method that was only used for event logging
- Update test snapshots to reflect stack_trace removal

All tests pass with updated snapshots.

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
@pyramation pyramation merged commit 1e03be2 into main Jul 21, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant