Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fae060b
Initial plan
Copilot Feb 17, 2026
6087852
Add Protocol 16/17 constants and DECFLOAT support
Copilot Feb 17, 2026
a719353
Update documentation and add DECFLOAT implementation warnings
Copilot Feb 17, 2026
d1887e6
Add comprehensive PR summary documentation
Copilot Feb 17, 2026
544adb4
Add debug logging for Protocol 16/17 connection issues
Copilot Feb 17, 2026
1634557
Fix authData encoding in op_cont_auth - send as buffer not string
Copilot Feb 17, 2026
377aa44
Fix keys field encoding - read as buffer not string
Copilot Feb 17, 2026
03b6004
Fix op_cont_auth response parsing - read plist and pkeys as buffers
Copilot Feb 17, 2026
098a29e
Add comprehensive fix summary documentation
Copilot Feb 17, 2026
1b1e7b3
Fix op_cont_auth to use _pendingAccept instead of undefined accept
Copilot Feb 18, 2026
6920b11
Add comprehensive connection fix documentation
Copilot Feb 18, 2026
cb84f2d
Add complete fix summary covering all 4 bugs resolved
Copilot Feb 18, 2026
08ab05e
Fix alignment calculation in sendOpContAuth causing login errors
Copilot Feb 18, 2026
73624d5
Add login error fix documentation
Copilot Feb 18, 2026
a9451f0
Add final comprehensive summary of all 5 fixes
Copilot Feb 18, 2026
604249d
Add Firebird log display on test failure in CI
Copilot Mar 23, 2026
d8959ed
Add comprehensive CI debugging guide documentation
Copilot Mar 23, 2026
da23b71
Add quick reference guide for Firebird log feature
Copilot Mar 23, 2026
5fdd78e
Revert auth fixes, keep only Protocol 16/17 and new data types
Copilot Mar 25, 2026
99edf30
Add comprehensive summary of minimal changes approach
Copilot Mar 25, 2026
ecf4632
Merge branch 'master' into copilot/implement-protocol-16-support
mariuz Mar 25, 2026
ae39c73
WIP: IEEE 754 DECFLOAT implementation with tests (partial)
Copilot Mar 26, 2026
97a1e82
Fix IEEE 754 DECFLOAT encoding/decoding - all tests pass
Copilot Mar 26, 2026
dd2a201
Update documentation to reflect full IEEE 754 DECFLOAT implementation
Copilot Mar 26, 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
18 changes: 18 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,21 @@ jobs:
run: |
export FIREBIRD_DATA=/firebird/data
npm test

- name: Show Firebird log on failure
if: failure()
run: |
echo "=========================================="
echo "Firebird Server Log (last 100 lines):"
echo "=========================================="
docker exec firebird tail -n 100 /firebird/log/firebird.log || echo "Could not read firebird.log"
echo ""
echo "=========================================="
echo "Docker container status:"
echo "=========================================="
docker ps -a
echo ""
echo "=========================================="
echo "Docker container logs:"
echo "=========================================="
docker logs firebird --tail 50
148 changes: 148 additions & 0 deletions CI_DEBUGGING_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# CI Debugging Guide

## Firebird Log Display on Test Failures

### Overview
When tests fail in the CI pipeline, the workflow automatically displays Firebird server logs to help with debugging. This feature was added to make it easier to diagnose connection, authentication, and other Firebird-related issues.

### What Gets Displayed

When a test fails, the following information is automatically shown:

1. **Firebird Server Log** (last 100 lines)
- Location: `/firebird/log/firebird.log` inside the Docker container
- Contains Firebird server events, errors, warnings, and diagnostic information
- Useful for diagnosing authentication failures, connection issues, and SQL errors

2. **Docker Container Status**
- Shows if the Firebird container is running, stopped, or has exited
- Displays container ID, image, status, and ports
- Command: `docker ps -a`

3. **Docker Container Logs** (last 50 lines)
- Shows the stdout/stderr output from the Firebird container
- Includes startup messages and any runtime errors
- Command: `docker logs firebird --tail 50`

### How It Works

The workflow uses GitHub Actions' conditional execution:

```yaml
- name: Show Firebird log on failure
if: failure()
run: |
# Display Firebird log
docker exec firebird tail -n 100 /firebird/log/firebird.log || echo "Could not read firebird.log"
# Display container status
docker ps -a
# Display container logs
docker logs firebird --tail 50
```

**Key Features:**
- Only runs when previous steps fail (`if: failure()`)
- No performance impact on successful builds
- Gracefully handles missing log file with fallback message
- Works with all Firebird versions (3, 4, 5)

### Interpreting the Output

#### Common Firebird Log Patterns

**Authentication Failures:**
```
INET/inet_error: read errno = 104
login by SYSDBA failed (authentication failed)
```

**Connection Issues:**
```
INET/inet_error: connect errno = 111
connection refused
```

**Database Errors:**
```
Database: /firebird/data/test.fdb
validation error
```

#### Docker Container Status

**Running Container:**
```
CONTAINER ID IMAGE STATUS
abc123... firebirdsql/firebird:5 Up 2 minutes
```

**Stopped Container:**
```
CONTAINER ID IMAGE STATUS
abc123... firebirdsql/firebird:5 Exited (1) 2 minutes ago
```

### Testing Locally

To test the Firebird log display locally:

1. Start Firebird Docker container:
```bash
docker run -d --name firebird \
-e FIREBIRD_ROOT_PASSWORD="masterkey" \
-p 3050:3050 \
firebirdsql/firebird:5
```

2. View Firebird log:
```bash
docker exec firebird tail -n 100 /firebird/log/firebird.log
```

3. Check container status:
```bash
docker ps -a
```

4. View container logs:
```bash
docker logs firebird --tail 50
```

### Troubleshooting

**"Could not read firebird.log" message:**
- The log file may not exist yet (Firebird hasn't started)
- The log path may be different (though it's standard across versions 3-5)
- Check the Docker container logs for more information

**No output shown:**
- Verify the step ran (check GitHub Actions logs)
- Ensure the `if: failure()` condition was triggered
- Check that the Firebird container is running

**Container not found:**
- The container may have been removed before this step ran
- Check earlier steps in the workflow for container lifecycle issues

### Related Documentation

- [Firebird Documentation](https://firebirdsql.org/en/documentation/)
- [GitHub Actions Conditional Execution](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif)
- [Docker Logging](https://docs.docker.com/config/containers/logging/)

### Contributing

If you encounter issues with the log display or have suggestions for improvement:

1. Check if the Firebird log path has changed in newer versions
2. Verify the Docker container name matches (`firebird`)
3. Test with different Firebird versions (3, 4, 5)
4. Submit an issue or pull request with your findings

### Version History

- **2026-03-23**: Initial implementation
- Added automatic Firebird log display on test failure
- Includes Docker container status and logs
- Works with Firebird 3, 4, and 5
145 changes: 145 additions & 0 deletions FIREBIRD_LOG_FEATURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Firebird Log Display Feature

## Quick Reference

### What Was Added
Automatic display of Firebird server logs when CI tests fail.

### Where
- **Implementation**: `.github/workflows/node.js.yml` (lines 77-93)
- **Documentation**: `CI_DEBUGGING_GUIDE.md`

### When It Runs
Only when tests fail in CI (uses `if: failure()` condition)

### What It Shows
1. Last 100 lines of Firebird server log
2. Docker container status
3. Last 50 lines of Docker container logs

## Quick Commands

### View logs locally:
```bash
# Start Firebird container
docker run -d --name firebird \
-e FIREBIRD_ROOT_PASSWORD="masterkey" \
-p 3050:3050 \
firebirdsql/firebird:5

# View Firebird log
docker exec firebird tail -n 100 /firebird/log/firebird.log

# Check container status
docker ps -a

# View container logs
docker logs firebird --tail 50
```

### Test the workflow locally:
```bash
# Validate YAML syntax
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/node.js.yml'))"
```

## Implementation Details

### GitHub Actions Step
```yaml
- name: Show Firebird log on failure
if: failure()
run: |
echo "=========================================="
echo "Firebird Server Log (last 100 lines):"
echo "=========================================="
docker exec firebird tail -n 100 /firebird/log/firebird.log || echo "Could not read firebird.log"
echo ""
echo "=========================================="
echo "Docker container status:"
echo "=========================================="
docker ps -a
echo ""
echo "=========================================="
echo "Docker container logs:"
echo "=========================================="
docker logs firebird --tail 50
```

### Key Features
- ✅ Conditional execution (only on failure)
- ✅ Graceful error handling
- ✅ Formatted output with clear sections
- ✅ Works with Firebird 3, 4, and 5
- ✅ Zero performance impact on successful builds

## Common Issues & Solutions

### Issue: "Could not read firebird.log"
**Solution**: Check Docker container logs, the file might not exist yet

### Issue: Container not found
**Solution**: Verify container name is "firebird" and it's still running

### Issue: Empty log output
**Solution**: Firebird might not have written logs yet, check startup time

## Firebird Log Locations

### In Docker Container
- **Log file**: `/firebird/log/firebird.log`
- **Config**: `/firebird/etc/firebird.conf`
- **Install**: `/opt/firebird`

### Consistent Across Versions
The log path is the same for:
- Firebird 3.x
- Firebird 4.x
- Firebird 5.x

## Maintenance

### If log path changes:
1. Update `.github/workflows/node.js.yml`
2. Update `CI_DEBUGGING_GUIDE.md`
3. Test with all Firebird versions

### If more lines needed:
- Change `tail -n 100` to desired number
- Change `--tail 50` for Docker logs

### If additional diagnostics needed:
Add new echo sections in the workflow step

## Related Files

- `.github/workflows/node.js.yml` - CI workflow with log display
- `CI_DEBUGGING_GUIDE.md` - Comprehensive debugging guide
- `README.md` - Main project documentation

## Version History

- **2026-03-23**: Initial implementation
- Added conditional log display on test failure
- Created comprehensive documentation
- Tested with Firebird 3, 4, 5

## Contributing

To improve this feature:
1. Test with different Firebird versions
2. Verify log paths remain consistent
3. Submit issues or PRs with enhancements
4. Update documentation as needed

## Support

For questions or issues:
1. Check `CI_DEBUGGING_GUIDE.md` for troubleshooting
2. Review GitHub Actions logs for the step execution
3. Test locally using provided commands
4. Submit an issue if problems persist

---

**Note**: This feature is designed for CI environments. For local development, use the Docker commands directly.
Loading
Loading