lhotari commented on a change in pull request #14825:
URL: https://github.com/apache/pulsar/pull/14825#discussion_r833603104



##########
File path: site2/tools/build-site.sh
##########
@@ -66,13 +66,14 @@ cd ${ROOT_DIR}/site2/website
 yarn
 yarn write-translations
 
-if [ "$CROWDIN_DOCUSAURUS_API_KEY" != "UNSET" ]; then
+# The crowdin upload and download take a long time to run, and have resulted 
in timeouts. In order to ensure that the
+# website is still able to get published, we only run the download and upload 
if current hour is 0-5.
+# This leads to executing crowdin-upload and crowdin-download once per day 
when website build is scheduled
+# to run with cron expression '0 */6 * * *'
+CURRENT_HOUR=$(date +%H)
+if [[ "$CROWDIN_DOCUSAURUS_API_KEY" != "UNSET" || $CURRENT_HOUR -lt 6 ]]; then
   # upload only if environment variable CROWDIN_UPLOAD=1 is set
-  # or current hour is 0-5
-  # this leads to executing crowdin-upload once per day when website build is 
scheduled
-  # to run with cron expression '0 */6 * * *'
-  CURRENT_HOUR=$(date +%H)
-  if [[ "$CROWDIN_UPLOAD" == "1" || $CURRENT_HOUR -lt 6 ]]; then
+  if [[ "$CROWDIN_UPLOAD" == "1" ]]; then
     yarn run crowdin-upload
   fi
   yarn run crowdin-download

Review comment:
       I'm fine in making the change that you have proposed.
   
   I'm just thinking that when both crowdin-upload and crowdin-download will 
happen once a day, that might be so slow that it never completes. For context, 
I made the original `$CURRENT_HOUR -lt 6` hack in 
https://github.com/apache/pulsar/pull/10794 . That was a quick fix to get the 
website build to complete by running crowdin-upload once per day. 
   One possible solution here would be to schedule crowdin-upload and 
crowdin-download in different time slots. 
   However, it would be better to get them scheduled in completely separate 
jobs to fix the problem. That might be the only way to get the website build 
stable.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to