Skip to content

Latest commit

 

History

History
219 lines (165 loc) · 5.58 KB

CREATE_PR_INSTRUCTIONS.md

File metadata and controls

219 lines (165 loc) · 5.58 KB

How to Create the Pull Request

Since I encountered permission issues when trying to push to the remote repository, you'll need to create the pull request manually. Here are the step-by-step instructions:

Step 1: Push Your Branch to Remote Repository

First, push the feature branch to GitHub:

# Push the feature branch
git push -u origin feature/tenant-flags-data-export-docker-ws-security

If you encounter permission issues, you may need to:

  1. Check your GitHub permissions for the repository
  2. Ensure you're using the correct GitHub account
  3. Contact the repository maintainer for push permissions

Step 2: Create Pull Request on GitHub

Once the branch is pushed, create a pull request:

Option A: Via GitHub Web UI

  1. Go to: https://github.com/SubStream-Protocol/SubStream-Protocol-Backend
  2. Click on "Pull Requests" tab
  3. Click "New pull request"
  4. Select your branch: feature/tenant-flags-data-export-docker-ws-security
  5. Click "Create pull request"

Option B: Via GitHub CLI

gh pr create --title "feat: Implement four critical features - tenant flags, data export, Docker K8s, and WebSocket rate limiting" --body-file PR_TEMPLATE.md

Step 3: Fill in Pull Request Details

Use the following information for the PR:

Title:

feat: Implement four critical features - tenant flags, data export, Docker K8s, and WebSocket rate limiting

Description:

Copy the content from PR_TEMPLATE.md file I created for you. It contains:

  • Comprehensive feature descriptions
  • Testing information
  • Performance impact
  • Security considerations
  • Breaking changes
  • Migration requirements
  • Deployment instructions
  • Acceptance criteria validation

Labels:

  • architecture
  • security
  • performance
  • feature
  • docker
  • kubernetes

Reviewers:

  • Add appropriate team members or maintainers

Assignees:

  • Assign to yourself or relevant team members

Step 4: Run Pre-merge Checks

Before merging, ensure these checks pass:

Automated Checks:

  • CI/CD pipeline passes
  • All tests pass
  • Code coverage meets requirements
  • Security scans pass
  • Docker build succeeds

Manual Checks:

  • Database migrations run successfully
  • Feature initialization works: node scripts/initializeFeatures.js
  • Implementation verification passes: node scripts/verifyImplementation.js
  • Local development environment works
  • Docker container runs correctly

Step 5: Review Process

Code Review Checklist:

  • Code follows project style guidelines
  • Security best practices implemented
  • Performance requirements met
  • Error handling is comprehensive
  • Documentation is complete
  • Tests are thorough

Functional Review:

  • Feature flags work correctly
  • Data export functions properly
  • WebSocket rate limiting is effective
  • Docker deployment works
  • Kubernetes deployment works

Step 6: Merge Strategy

Recommended Merge Strategy:

  • Squash and merge to keep commit history clean
  • Ensure PR description is comprehensive for future reference
  • Delete feature branch after merge

Alternative:

  • Create merge commit if you want to preserve the development history

Step 7: Post-Merge Actions

After the PR is merged:

Database Migration:

# Deploy to staging first
npm run migrate

# Verify migration success
npm run migrate:list

Feature Initialization:

# Initialize features for existing tenants
node scripts/initializeFeatures.js

# Verify implementation
node scripts/verifyImplementation.js

Deployment:

# Build and deploy Docker image
docker build -t substream-backend:latest .
docker push your-registry/substream-backend:latest

# Deploy to Kubernetes
kubectl apply -f k8s/
kubectl rollout status deployment/substream-backend -n substream

Monitoring:

  • Set up monitoring for new metrics
  • Configure alerts for rate limiting violations
  • Monitor feature flag performance
  • Track data export job queue health

Step 8: Documentation Updates

After deployment:

  • Update API documentation
  • Update user guides
  • Update deployment guides
  • Create feature announcements
  • Update internal documentation

Troubleshooting

If Push Fails:

  1. Check GitHub permissions
  2. Verify remote URL: git remote -v
  3. Ensure you're on correct branch: git branch
  4. Try force push if needed: git push --force-with-lease

If PR Creation Fails:

  1. Ensure branch is pushed to remote
  2. Check for merge conflicts
  3. Verify branch is up to date with main
  4. Contact repository maintainers

If Tests Fail:

  1. Check environment variables
  2. Verify Redis is running
  3. Check database connection
  4. Review test logs for specific errors

Quick Commands Summary

# Push branch
git push -u origin feature/tenant-flags-data-export-docker-ws-security

# Create PR (GitHub CLI)
gh pr create --title "feat: Implement four critical features" --body-file PR_TEMPLATE.md

# Run migrations
npm run migrate

# Initialize features
node scripts/initializeFeatures.js

# Verify implementation
node scripts/verifyImplementation.js

# Run tests
npm test

# Build Docker image
docker build -t substream-backend:latest .

# Deploy to K8s
kubectl apply -f k8s/

Contact Information

If you encounter any issues during the PR creation process:

  • Development Team: dev-team@substream.app
  • Repository Maintainers: Check GitHub repository settings
  • For permission issues: Contact your GitHub organization admin

Remember: This implementation addresses four critical issues and provides enterprise-grade features. Take time to review thoroughly before merging to production!