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

KAFKA-13284: Use sftp to upload artifacts in release.py #11394

Merged
merged 2 commits into from
Oct 18, 2021

Conversation

mimaison
Copy link
Member

  • 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)

- automatically upload artifacts to Apache Home using sftp
- fix the logic to find JDK 17
release.py Outdated
fail("JDK 8 is required")
elif "%d.0" % version not in javaVersion:
elif "%d" % version not in java_version:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor

@dajac dajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I left a few comments.

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also call sftp_mkdir before to ensure that the directory exists?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant public_html directory.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, I pushed an update

release.py Outdated
cd public_html
put -r %s
""" % dir
cmd("Uploading '%s' under public_html in your Apache home directory" % dir, "sftp -b - %[email protected]" % apache_id, stdin=cmd_str, allow_failure=True, num_retries=3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that we assume that the relevant key is in the ssh-agent, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes like it used to work with rsync

Copy link
Contributor

@dajac dajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mimaison mimaison merged commit 48575a9 into apache:trunk Oct 18, 2021
@mimaison mimaison deleted the KAFKA-13284 branch October 18, 2021 08:11
xdgrulez pushed a commit to xdgrulez/kafka that referenced this pull request Dec 22, 2021
- automatically upload artifacts to Apache Home using sftp
- fix the logic to find JDK 17

Reviewers: David Jacot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants