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

chore(common): unify pull-request creation scripts #9888

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

mcdurdin
Copy link
Member

@mcdurdin mcdurdin commented Oct 29, 2023

Fixes #9886.

Note: keyboards repo has a similar script, which we could unify in the future.

@keymanapp-test-bot skip

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Oct 29, 2023

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot added this to the A17S25 milestone Oct 29, 2023
Copy link
Contributor

@jahorton jahorton left a comment

Choose a reason for hiding this comment

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

LGTM, I think. I don't have cached brainspace for all the ci build helper infrastructure, so I'm not 100% confident... but yeah, everything looks right.

git push origin "$branch"
builder_echo "Push complete"

hub pull-request -f --no-edit -l auto
Copy link
Contributor

Choose a reason for hiding this comment

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

It's "probably fine" for our CI agents, so long as we note the requirement... just noting that this assumes hub is available. Is that documented somewhere?

Asking because I don't have (or need) hub installed in my personal dev-environment, and I don't think it's listed in our dev prerequisite list. Not sure where we'd document extra resources needed for the agents.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, given this is just for CI. Note that this is listed in the reqs in the comments for the script.


builder_echo blue "Testing ci_open_pull_request"

ci_open_pull_request "$test_repo" "test/ci" "chore: testing CI"
Copy link
Contributor

Choose a reason for hiding this comment

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

So... does the test actually make a real pull request to the destination site (ci-test-repo) when run and leave it up? No cleanup for the results of this call?

Granted, I suppose that might be why ci-test-repo is there - to prevent pollution of our production repos with test PRs of this type?

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. And yes. You can even look at said repo and see my test PRs (now manually cleaned up). Given the script is designed for manual run, I figured that was okay.

#
# Prevents 'clear' on exit of mingw64 bash shell
# TODO: is this script still necessary or is /web/ci.sh a complete replacement?
Copy link
Contributor

Choose a reason for hiding this comment

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

This script was in its prior state due to the half-and-half state for the s.keyman.com build action. At the time, we didn't want the .sh script to actually commit the PR and changes... but prepping them was fine.

So, now that ./ci.sh prepare:s-keyman-com is no longer just preparing the files for the PR but also pushing the commit (and making the PR) itself... nah, should be fine to fully fold in the remaining bits into the ci.sh script. It was not a full replacement, but it seems your solution to #9886 is to make (or... "has made"?) ci.sh a full replacement.


Re: this question and the one from #9886 -

why is s_keyman_com.sh in web/src/tools/testing? Seems like the wrong place for this.

Ok, yeah, not sure why I ended up putting it there. Does seem like more of a 'building' one, but... oh well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I briefly looked on TC Web configs. Apparently the Release (push release to s.keyman.com) is still using Powershell. 😕

Copy link
Member Author

Choose a reason for hiding this comment

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

s_keyman_com.sh seems redundant now -- it is never called afaict. Should we remove it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've updated the TC Web configs to skip the git commit phase if .build-builder is present. We'll need to port this PR back to 16.0 as well, and then we can convert the entire script into a bash call.

@keymanapp keymanapp deleted a comment from keymanapp-test-bot bot Oct 30, 2023
@mcdurdin mcdurdin merged commit 60725b2 into master Oct 30, 2023
2 checks passed
@mcdurdin mcdurdin deleted the chore/common/open-pull-request-script branch October 30, 2023 02:01
mcdurdin added a commit that referenced this pull request Oct 30, 2023
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 17.0.202-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(web): keymanweb release build push to s.keyman.com is no longer working with new PR/auth mechanism
4 participants