File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 9898        run : | 
9999          pip install pytest-timeout 
100100
101+ name : Wait for OpenSearch to be ready 
102+         run : | 
103+           set -e 
104+           host="${{ env.OPENSEARCH_HOST:-localhost }}" 
105+           port="${{ env.OPENSEARCH_PORT:-9202 }}" 
106+           url="http://$host:$port/_cluster/health" 
107+           echo "Waiting for OpenSearch at $url" 
108+           for i in $(seq 1 60); do 
109+             if curl -sS "$url" | grep -E '"status":"(yellow|green)"' >/dev/null 2>&1; then 
110+               echo "OpenSearch is ready" 
111+               curl -sS "http://$host:$port" || true  
112+               break 
113+             fi 
114+             echo "OpenSearch not ready yet ($i/60) — sleeping 5s" 
115+             sleep 5 
116+           done 
117+           # Final check: fail the job if still not ready 
118+           if ! curl -sS "$url" | grep -E '"status":"(yellow|green)"' >/dev/null 2>&1; then 
119+             echo "OpenSearch failed to become ready within timeout" 
120+             curl -sS "http://$host:$port" || true  
121+             exit 1 
122+           fi 
123+ 
101124name : Debug OpenSearch/Elasticsearch status 
102125        run : | 
103126          echo "Root response:" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments