-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
migrate skaraMirror.sh to be a python script #52
base: master
Are you sure you want to change the base?
Conversation
7e60998
to
06975b8
Compare
7ca792f
to
423b80e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to put down what I said in the PMC call earlier. I'm broadly neutral on this hence this just being a "review comment", but here is some food for thought for anyone else looking at this:
- Since this is a rewrite (and is 538 lines instead of the 319 we have at present for the shell script) there is always a risk of introducing new and exciting bugs
- This would diverge from almost everything else in this space that we have which is written in shell
- Testing is nice, but we could implement suitable tests fairly simply on top of shell scripts, so I'm not sure I see python's
unittest
as a compelling reason in itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicks but overall this has test coverage in a higher order language and I think that's a good thing.
@@ -0,0 +1,4 @@ | |||
[flake8] | |||
ignore = | |||
# E501 line too long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# E501 line too long | |
# E501 line too long |
|
||
jobs: | ||
linter: | ||
# Name the Job |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment in the wrong place and probably not needed
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Markdown lint complains about the issue templates | ||
FILTER_REGEX_EXCLUDE: .github/ISSUE_TEMPLATE/* | ||
# Lots of shellcheck errors - need fixing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a TODO or a new issue for this.
# Apply patches if required | ||
apply_patches_if_needed(workspace, github_repo) | ||
|
||
# Find the latest and previous release tags that is not in releaseTagExcludeList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Find the latest and previous release tags that is not in releaseTagExcludeList | |
# Find the latest and previous release tags that are not in releaseTagExcludeList |
) | ||
newAdoptTags.append(adoptTag) | ||
|
||
if repo.git.rev_parse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scoping of this if or the print below seems off?
): | ||
print(repo.git.log("--oneline", "origin/release..release")) | ||
|
||
# Find the latest and previous release tags that is not in releaseTagExcludeList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Find the latest and previous release tags that is not in releaseTagExcludeList | |
# Find the latest and previous release tags that are not in releaseTagExcludeList |
remote.fetch(**{"tags": True}) | ||
|
||
|
||
def perform_merge_into_release_from_master(workspace, github_repo, branch): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long Python function is Long :-). I think there's some natural places where smaller, well named functions can be extracted
if os.path.exists(main_workflow_file) and not is_patch_applied( | ||
main_workflow_file, "- dev" | ||
): | ||
patch_file = os.path.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scoping seems off here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A block has been put on this Pull Request as this repository is temporarily under a code freeze due to an ongoing release cycle.
If this pull request needs to be merged during the release cycle then please comment /merge
and a PMC member will be able to remove the block.
If the code freeze is over you can remove this block by commenting /thaw
.
This gives us a lot more control over the mirror scripts and allows us to better test the code.
This script was used to generate https://github.com/gdams/jdk22u as a test.