Skip to content

MINOR: update release.py#5374

Merged
mjsax merged 1 commit intoapache:trunkfrom
mjsax:minor-update-release-script
Jul 17, 2018
Merged

MINOR: update release.py#5374
mjsax merged 1 commit intoapache:trunkfrom
mjsax:minor-update-release-script

Conversation

@mjsax
Copy link
Copy Markdown
Member

@mjsax mjsax commented Jul 16, 2018

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Jul 16, 2018

This is for trunk and can be cherry-picked to 2.0. For 1.1, I hope that @lindong28 is doing a PR after 1.1.1 is released.

I updated 1.0, 0.11.0 and 0.10.2 with other PRs already.

@lindong28 lindong28 self-assigned this Jul 17, 2018
Copy link
Copy Markdown
Contributor

@ewencp ewencp left a comment

Choose a reason for hiding this comment

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

one question, but iirc these are from some earlier branch anyway. as long as things match up ok, LGTM

Comment thread release.py
sftp_cmds = """
put %s %s
""" % (local_path, remote_path)
cmd("Uploading artifacts in %s to your Apache home directory" % root, "sftp -b - %s@home.apache.org" % apache_id, stdin=sftp_cmds)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason we needed to rearrange this? I think it was already slow and when I had it doing individual commands for each action it took even longer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah it is very slow and put -r should be much faster. I recall there is comment that says we can not do put -r due to bug in some version. put -r in sftp works for me on my RHEL 7 desktop. I might make sense to provide a commented code path in the release.py so that we can optionally choose to use put -r if it is supported.

I recall Matthias said in the other PR that this change is to make the sftp upload more interactive.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The upload takes long, and the script seems to be frozen at this point. Re-arranging allows to report progress and makes the script more "interactive" (it prints stuff regularly). It might make the upload slower, but it's IMHO a better tradeoff. We put the same changes in the other PRs that are already merged.

I actually killed the script multiple times preparing the bug-fix releases because I thought it's dead and started to investigate, until I found out it's just doing the upload in the background and it takes forever. Overall, I wasted more time by this, that the slow down of reporting progress during upload.

It's of course a personal preference and if you don't like it at all, we can go back to the old behavior. However, the script is not used on a daily bases and thus I think, the performance impact is not too important compared to improved user experience.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

makes sense, probably ideal solution would be to just get the output from commands printing incrementally instead of all at once at the end (or something more efficient than the sftp we are currently stuck with...).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

probably ideal solution would be to just get the output from commands printing incrementally instead of all at once at the end

Cannot follow here. With the change, we call sftp per file and report progress per file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's fine as is, I was just saying that if we could stream a single sftp processes output, that would be faster & more efficient.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#9070 apparently reduces the time from 2 hours to 5 minutes. sftp per file seems pretty slow even for something that is not used frequently. Not sure if it became slower over time or something specific to John's connection though. :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It was always slow. This PR only made the script print stuff to stdout regularly--before this PR, the script was uploading silently for a loooong time and one could think it froze (even if it was just doing/uploading stuff). This PR was not to make the upload faster, just to make the script appear alive :)

Copy link
Copy Markdown
Member

@lindong28 lindong28 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 patch. LGTM. Yeah I have a similar patch ready for 1.1 branch.

@mjsax mjsax merged commit 41abfcb into apache:trunk Jul 17, 2018
mjsax added a commit that referenced this pull request Jul 17, 2018
Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>, Dong Lin <dolin@linkedin.com>
@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Jul 17, 2018

Merged to trunk and cherry-picked to 2.0

@mjsax mjsax deleted the minor-update-release-script branch July 17, 2018 20:13
@vvcephei vvcephei mentioned this pull request Jul 24, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants