Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-Deploy error on Push to CDN #9757

Open
rafaelromcar-parabol opened this issue May 17, 2024 · 7 comments · May be fixed by #9819
Open

Pre-Deploy error on Push to CDN #9757

rafaelromcar-parabol opened this issue May 17, 2024 · 7 comments · May be fixed by #9819
Assignees
Labels
bug p2 Needs to be addressed on a reasonable timescale

Comments

@rafaelromcar-parabol
Copy link
Contributor

Issue - Bug

  • How serious is the bug? P2
  • OS: macOS / Linux / Windows / ?
  • Browser: Chrome / Safari / Lynx / ? + version
  • Node version: node --version
  • NPM version: npm --version
  • RethinkDB version: rethinkdb --version

App version v7.31.0

Error experienced in Staging with data that might have not been consistent

ServerID 177                                                                                                                                                                                                       
🚀 Predeploy Started v7.31.0 sha:a256820b703d822bad970e6e2f86b07b451a2135                                                                                                                                          
👴 RethinkDB Migration Started                                                                                                                                                                                     
[migrate-rethinkdb] No new migrations                                                                                                                                                                              
👴 RethinkDB Migration Complete                                                                                                                                                                                    
🐘 Postgres Migration Started                                                                                                                                                                                      
🔩 Postgres Extension Checks Started                                                                                                                                                                               
   pgvector                                                                                                                                                                                                        
🔩 Postgres Extension Checks Completed                                                                                                                                                                             
PostgreSQL - No migrations to run!                                                                                                                                                                                 
🐘 Postgres Migration Complete                                                                                                                                                                                     
🔗 QueryMap Persistence Started                                                                                                                                                                                    
⛓️ Prime Integrationgs Started                                                                                                                                                                                      
⛅️ Push to CDN Started                                                                                                                                                                                             
⛓️ Prime Integrations Complete                                                                                                                                                                                      
ReqlDriverError: The connection was closed before the query could be completed                                                                                                                                     
ReqlDriverError: The connection was closed before the query could be completed                                                                                                                                     
🔗 QueryMap Persistence Complete: 0 records added                                                                                                                                                                  
/home/node/parabol/dist/preDeploy.js:17107                                                                                                                                                                         
        if (parsedObjToReturn[textNodeName]) {                                                                                                                                                                     
                             ^                                                                                                                                                                                     
                                                                                                                                                                                                                   
TypeError: Cannot read properties of undefined (reading '#text')                                                                                                                                                   
  Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.                                                                                                       
    at /home/node/parabol/dist/preDeploy.js:17107:30                                                                                                                                                               
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)                                                                                                                                  
    at async parseXmlErrorBody (/home/node/parabol/dist/preDeploy.js:17116:19)                                                                                                                                     
    at async de_CommandError (/home/node/parabol/dist/preDeploy.js:6482:15)                                                                                                                                        
    at async /home/node/parabol/dist/preDeploy.js:44487:24                                                                                                                                                         
    at async /home/node/parabol/dist/preDeploy.js:1883:20                                                                                                                                                          
    at async /home/node/parabol/dist/preDeploy.js:44371:46                                                                                                                                                         
    at async /home/node/parabol/dist/preDeploy.js:12205:20                                                                                                                                                         
    at async /home/node/parabol/dist/preDeploy.js:1231:24                                                                                                                                                          
    at async /home/node/parabol/dist/preDeploy.js:1254:20 {                                                                                                                                                        
  '$metadata': { attempts: 1, totalRetryDelay: 0 }                                                                                                                                                                 
}                                                                                                                                                                                                                  
                                                                                                                                                                                                                   
Node.js v20.11.0

Then, after trying to reproduce on Staging and failing to do so, I experienced it again in one of our PPMIs. This was the sequence:

  • Upgraded the application from 7.24.0 to 7.31.0 and pre-deploy was executed and ran without any problem. No errors were thrown.
  • Redeployed again to modify some configuration parameters and pre-deploy failed with the following:
Warning: Ignoring extra certs from `./packages/server/postgres/cacerts`, load failed: error:80000002:system library::No such file or directory
🚀 Predeploy Started v7.31.0 sha:a256820b703d822bad970e6e2f86b07b451a2135
👴 RethinkDB Migration Started
[migrate-rethinkdb] No new migrations
👴 RethinkDB Migration Complete
🐘 Postgres Migration Started
🔩 Postgres Extension Checks Started
   pgvector: skipping check (POSTGRES_USE_PGVECTOR !== true)
🔩 Postgres Extension Checks Completed
PostgreSQL - No migrations to run!
🐘 Postgres Migration Complete
🔗 QueryMap Persistence Started
⛓️ Prime Integrationgs Started
⛅️ Push to CDN Started
⛓️ Prime Integrations Complete
ReqlDriverError: The connection was closed before the query could be completed
🔗 QueryMap Persistence Complete: 0 records added


/home/node/parabol/dist/preDeploy.js:17107
        if (parsedObjToReturn[textNodeName]) {
                             ^

TypeError: Cannot read properties of undefined (reading '#text')
  Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.
    at /home/node/parabol/dist/preDeploy.js:17107:30
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async parseXmlErrorBody (/home/node/parabol/dist/preDeploy.js:17116:19)
    at async de_CommandError (/home/node/parabol/dist/preDeploy.js:6482:15)
    at async /home/node/parabol/dist/preDeploy.js:44487:24
    at async /home/node/parabol/dist/preDeploy.js:1883:20
    at async /home/node/parabol/dist/preDeploy.js:44371:46
    at async /home/node/parabol/dist/preDeploy.js:12205:20
    at async /home/node/parabol/dist/preDeploy.js:1231:24
    at async /home/node/parabol/dist/preDeploy.js:1254:20 {
  '$metadata': { attempts: 1, totalRetryDelay: 0 }
}

Node.js v20.11.0

I tried running pre-deploy again and no luck. The client has not complained about anything and it looks like they have been using AWS without any trouble so far. I could not reproduce on Staging or using an on-demand-env.

Acceptance Criteria (optional)

Pre-Deploy does not throw that error
Triage is performed to find the root cause of the bug, timeboxed to ~1 hour.

Estimated effort: 1 hour to triage. More if root cause is already identified.

@jordanh jordanh added the p2 Needs to be addressed on a reasonable timescale label May 20, 2024
@jordanh
Copy link
Contributor

jordanh commented May 20, 2024

Promoting this one to this cycle; thank you for reporting/capturing @rafaelromcar-parabol

@rafaelromcar-parabol
Copy link
Contributor Author

It happened again on v7.35.0.

@Dschoordsch Dschoordsch self-assigned this Jun 4, 2024
@Dschoordsch
Copy link
Contributor

This can be reproduced locally by

yarn build
yarn predeploy

but does not happen every time. It's the s3 client trying to push but getting a 520 response.

@Dschoordsch
Copy link
Contributor

Happens also on 3.588 (latest)

@Dschoordsch
Copy link
Contributor

Dschoordsch commented Jun 4, 2024

It happens in the function regionRedirectMiddleware(clientConfig) in both versions.

@Dschoordsch
Copy link
Contributor

The 520 response comes from Cloudflare and the S3 client does not know how to deal with it, so it treats it as 'CLIENT_ERROR' which means it's not retry-able. I'm looking if implementing a custom retry policy could solve this.

@Dschoordsch Dschoordsch linked a pull request Jun 4, 2024 that will close this issue
7 tasks
@rafaelromcar-parabol
Copy link
Contributor Author

Happened again in production 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p2 Needs to be addressed on a reasonable timescale
Projects
Status: No status
Status: In review
Development

Successfully merging a pull request may close this issue.

3 participants