Re: [PR] Add pre-requisite check in release.py [kafka]

2023-10-26 Thread via GitHub


divijvaidya merged PR #14636:
URL: https://github.com/apache/kafka/pull/14636


-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] Add pre-requisite check in release.py [kafka]

2023-10-26 Thread via GitHub


Owen-CH-Leung commented on code in PR #14636:
URL: https://github.com/apache/kafka/pull/14636#discussion_r1372728989


##
release.py:
##
@@ -491,6 +491,25 @@ def command_release_announcement_email():
 Do you have all of of these setup? (y/n): """ % (PREFS_FILE, json.dumps(prefs, 
indent=2))):
 fail("Please try again once you have all the prerequisites ready.")
 
+apache_id = sanitize_input("Please enter your apache-id: ")
+
+print("Begin to check if you have met all the pre-requisites for the release 
process")
+test_maven = cmd_output("mvn -v")
+if "Apache Maven" in test_maven:
+print("Pre-requisite met: You have maven cli in place")
+else:
+fail("Pre-requisite not met: You need to install maven CLI")

Review Comment:
   Thanks. I added try catch block and it should now exit nicely when any 
pre-requitsites were not met. Can you try again ? Let me know.



-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] Add pre-requisite check in release.py [kafka]

2023-10-25 Thread via GitHub


divijvaidya commented on code in PR #14636:
URL: https://github.com/apache/kafka/pull/14636#discussion_r1372147994


##
release.py:
##
@@ -491,6 +491,25 @@ def command_release_announcement_email():
 Do you have all of of these setup? (y/n): """ % (PREFS_FILE, json.dumps(prefs, 
indent=2))):
 fail("Please try again once you have all the prerequisites ready.")
 
+apache_id = sanitize_input("Please enter your apache-id: ")
+
+print("Begin to check if you have met all the pre-requisites for the release 
process")
+test_maven = cmd_output("mvn -v")
+if "Apache Maven" in test_maven:
+print("Pre-requisite met: You have maven cli in place")
+else:
+fail("Pre-requisite not met: You need to install maven CLI")

Review Comment:
   I tested it and it did not fail so nicely for me :)
   
   ```
   Do you have all of of these setup? (y/n): y
   Please enter your apache-id: divijv
   Begin to check if you have met all the pre-requisites for the release process
   Traceback (most recent call last):
 File "/opt/kafka/./release.py", line 497, in 
   test_maven = cmd_output("mvn -v")
 File "/opt/kafka/./release.py", line 140, in cmd_output
   return subprocess.check_output(cmd, *args, stderr=subprocess.STDOUT, 
**kwargs).decode('utf-8')
 File "/usr/lib64/python3.9/subprocess.py", line 424, in check_output
   return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
 File "/usr/lib64/python3.9/subprocess.py", line 505, in run
   with Popen(*popenargs, **kwargs) as process:
 File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
   self._execute_child(args, executable, preexec_fn, close_fds,
 File "/usr/lib64/python3.9/subprocess.py", line 1821, in _execute_child
   raise child_exception_type(errno_num, err_msg, err_filename)
   FileNotFoundError: [Errno 2] No such file or directory: 'mvn'
   ```



-- 
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-unsubscr...@kafka.apache.org

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



[PR] Add pre-requisite check in release.py [kafka]

2023-10-25 Thread via GitHub


Owen-CH-Leung opened a new pull request, #14636:
URL: https://github.com/apache/kafka/pull/14636

   As per the request in 
[KAFKA-15200](https://issues.apache.org/jira/browse/KAFKA-15200), This PR adds 
pre-requitsite-check in the `release.py` before the release process begins
   
   ### Committer Checklist (excluded from commit message)
   - [x] Verify design and implementation 
   - [x] Verify test coverage and CI build status
   - [x] 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-unsubscr...@kafka.apache.org

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