Skip to content

Add logging format and tests for k8s/deployment module#148

Merged
fedemaleh merged 3 commits intobetafrom
feature/k8s-deployment-logging-and-tests
Feb 9, 2026
Merged

Add logging format and tests for k8s/deployment module#148
fedemaleh merged 3 commits intobetafrom
feature/k8s-deployment-logging-and-tests

Conversation

@fedemaleh
Copy link
Copy Markdown
Collaborator

Summary

  • Apply standardized logging format (🔍, ✅, ❌, 📝, 💡, 🔧, 📋) to all k8s/deployment scripts
  • Add comprehensive bats unit tests with full message assertions and error coverage
  • Add error handling with troubleshooting hints for all failure cases

Scripts Updated (16 total)

  • k8s/apply_templates
  • k8s/deployment/build_context
  • k8s/deployment/build_deployment
  • k8s/deployment/delete_cluster_objects
  • k8s/deployment/delete_ingress_finalizer
  • k8s/deployment/kill_instances
  • k8s/deployment/notify_active_domains
  • k8s/deployment/print_failed_deployment_hints
  • k8s/deployment/scale_deployments
  • k8s/deployment/verify_http_route_reconciliation
  • k8s/deployment/verify_ingress_reconciliation
  • k8s/deployment/verify_networking_reconciliation
  • k8s/deployment/wait_deployment_active
  • k8s/deployment/networking/gateway/route_traffic
  • k8s/deployment/networking/gateway/rollback_traffic
  • k8s/deployment/networking/gateway/ingress/route_traffic

Test Files Added (17 total)

All tests follow best practices:

  • Full message assertions with actual computed values
  • Consolidated test cases (not one test per message)
  • Error case coverage with full troubleshooting verification
  • Fast execution (mocked sleep, minimal timeouts)

Test plan

  • All 139 bats tests pass
  • Scripts display proper logging format
  • Error messages include 💡 Possible causes and 🔧 How to fix sections

@fedemaleh fedemaleh force-pushed the feature/k8s-deployment-logging-and-tests branch from b00f512 to 335bc8a Compare February 6, 2026 18:03
Comment thread k8s/deployment/networking/gateway/rollback_traffic Outdated
Comment thread k8s/deployment/scale_deployments
@fedemaleh fedemaleh force-pushed the feature/k8s-deployment-logging-and-tests branch from 335bc8a to a501ca8 Compare February 6, 2026 20:48
@fedemaleh fedemaleh force-pushed the feature/k8s-deployment-logging-and-tests branch from 3152fb9 to 98d96b4 Compare February 6, 2026 21:22
ignacioboud
ignacioboud previously approved these changes Feb 9, 2026
Comment thread k8s/deployment/build_context Outdated
@fedemaleh fedemaleh merged commit f900f98 into beta Feb 9, 2026
@fedemaleh fedemaleh deleted the feature/k8s-deployment-logging-and-tests branch February 9, 2026 13:06
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.

2 participants