You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/10/13 16:53:47 UTC

[GitHub] [kafka] mimaison opened a new pull request #11394: KAFKA-13284: Use sftp to upload artifacts in release.py

mimaison opened a new pull request #11394:
URL: https://github.com/apache/kafka/pull/11394


   - automatically upload artifacts to Apache Home using sftp
   - fix the logic to find JDK 17
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] dajac commented on a change in pull request #11394: KAFKA-13284: Use sftp to upload artifacts in release.py

Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #11394:
URL: https://github.com/apache/kafka/pull/11394#discussion_r729834094



##########
File path: release.py
##########
@@ -621,7 +631,8 @@ def select_gpg_key():
 cmd("Listing artifacts to be uploaded:", "ls -R %s" % artifacts_dir)
 
 cmd("Zipping artifacts", "tar -czf %s.tar.gz %s" % (artifact_name, artifact_name), cwd=work_dir)
-if not user_ok("Have you uploaded artifacts in %s, listed above, to public_html in your Apache home directory (y/n)?: " % artifacts_dir):
+sftp_upload(artifacts_dir)

Review comment:
       I meant `public_html` directory.




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mimaison merged pull request #11394: KAFKA-13284: Use sftp to upload artifacts in release.py

Posted by GitBox <gi...@apache.org>.
mimaison merged pull request #11394:
URL: https://github.com/apache/kafka/pull/11394


   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mimaison commented on a change in pull request #11394: KAFKA-13284: Use sftp to upload artifacts in release.py

Posted by GitBox <gi...@apache.org>.
mimaison commented on a change in pull request #11394:
URL: https://github.com/apache/kafka/pull/11394#discussion_r729805385



##########
File path: release.py
##########
@@ -178,6 +178,16 @@ def sftp_mkdir(dir):
         # This is ok. The command fails if the directory already exists
         pass
 
+def sftp_upload(dir):
+    try:
+       cmd_str  = """
+cd public_html
+put -r %s
+""" % dir
+       cmd("Uploading '%s' under public_html in your Apache home directory" % dir, "sftp -b - %s@home.apache.org" % apache_id, stdin=cmd_str, allow_failure=True, num_retries=3)

Review comment:
       Yes like it used to work with rsync

##########
File path: release.py
##########
@@ -621,7 +631,8 @@ def select_gpg_key():
 cmd("Listing artifacts to be uploaded:", "ls -R %s" % artifacts_dir)
 
 cmd("Zipping artifacts", "tar -czf %s.tar.gz %s" % (artifact_name, artifact_name), cwd=work_dir)
-if not user_ok("Have you uploaded artifacts in %s, listed above, to public_html in your Apache home directory (y/n)?: " % artifacts_dir):
+sftp_upload(artifacts_dir)

Review comment:
       Yes that's what I understood. I've made the changes, testing it now ...

##########
File path: release.py
##########
@@ -621,7 +631,8 @@ def select_gpg_key():
 cmd("Listing artifacts to be uploaded:", "ls -R %s" % artifacts_dir)
 
 cmd("Zipping artifacts", "tar -czf %s.tar.gz %s" % (artifact_name, artifact_name), cwd=work_dir)
-if not user_ok("Have you uploaded artifacts in %s, listed above, to public_html in your Apache home directory (y/n)?: " % artifacts_dir):
+sftp_upload(artifacts_dir)

Review comment:
       Thanks for the suggestion, I pushed an update




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mimaison commented on a change in pull request #11394: KAFKA-13284: Use sftp to upload artifacts in release.py

Posted by GitBox <gi...@apache.org>.
mimaison commented on a change in pull request #11394:
URL: https://github.com/apache/kafka/pull/11394#discussion_r728264561



##########
File path: release.py
##########
@@ -207,10 +217,10 @@ def get_jdk(prefs, version):
     jdk_java_home = get_pref(prefs, 'jdk%d' % version, lambda: raw_input("Enter the path for JAVA_HOME for a JDK%d compiler (blank to use default JAVA_HOME): " % version))
     jdk_env = dict(os.environ) if jdk_java_home.strip() else None
     if jdk_env is not None: jdk_env['JAVA_HOME'] = jdk_java_home
-    javaVersion = cmd_output("%s/bin/java -version" % jdk_java_home, env=jdk_env)
-    if version == 8 and "1.8.0" not in javaVersion:
+    java_version = cmd_output("%s/bin/java -version" % jdk_java_home, env=jdk_env)
+    if version == 8 and "1.8.0" not in java_version:
       fail("JDK 8 is required")
-    elif "%d.0" % version not in javaVersion:
+    elif "%d" % version not in java_version:

Review comment:
       OpenJDK 17 version:
   ```
   openjdk version "17" 2021-09-14
   OpenJDK Runtime Environment Temurin-17+35 (build 17+35)
   OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing)
   ```




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org