-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-17353: [Release][R] Validate binaries version #14396
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -738,14 +738,16 @@ class Target(Serializable): | |
| (currently only an email address where the notification should be sent). | ||
| """ | ||
|
|
||
| def __init__(self, head, branch, remote, version, email=None): | ||
| def __init__(self, head, branch, remote, version, r_version, email=None): | ||
| self.head = head | ||
| self.email = email | ||
| self.branch = branch | ||
| self.remote = remote | ||
| self.github_repo = "/".join(_parse_github_user_repo(remote)) | ||
| self.version = version | ||
| self.r_version = r_version | ||
| self.no_rc_version = re.sub(r'-rc\d+\Z', '', version) | ||
| self.no_rc_r_version = re.sub(r'-rc\d+\Z', '', r_version) | ||
| # TODO(ARROW-17552): Remove "master" from default_branch after | ||
| # migration to "main". | ||
| self.default_branch = ['main', 'master'] | ||
|
|
@@ -791,8 +793,39 @@ def from_repo(cls, repo, head=None, branch=None, remote=None, version=None, | |
| if email is None: | ||
| email = repo.user_email | ||
|
|
||
| version_dev_match = re.match(r".*\.dev(\d+)$", version) | ||
| if version_dev_match: | ||
| with open(f"{repo.path}/r/DESCRIPTION") as description_file: | ||
| description = description_file.read() | ||
| r_version_pattern = re.compile(r"^Version:\s*(.*)$", | ||
| re.MULTILINE) | ||
| r_version = re.findall(r_version_pattern, description)[0] | ||
| if r_version: | ||
| version_dev = int(version_dev_match[1]) | ||
| # "1_0000_00_00 +" is for generating a greater version | ||
| # than YYYYMMDD. For example, 1_0000_00_01 | ||
| # (version_dev == 1 case) is greater than 2022_10_16. | ||
| # | ||
| # Why do we need a greater version than YYYYMMDD? It's | ||
| # for keeping backward compatibility. We used | ||
| # MAJOR.MINOR.PATCH.YYYYMMDD as our nightly package | ||
| # version. (See also ARROW-16403). If we use "9000 + | ||
| # version_dev" here, a developer that used | ||
| # 9.0.0.20221016 can't upgrade to the later nightly | ||
| # package unless we release 10.0.0. Because 9.0.0.9234 | ||
| # or something is less than 9.0.0.20221016. | ||
| r_version_dev = 1_0000_00_00 + version_dev | ||
| # version: 10.0.0.dev234 | ||
| # r_version: 9.0.0.9000 | ||
| # -> 9.0.0.100000234 | ||
| r_version = re.sub(r"\.9000\Z", f".{r_version_dev}", r_version) | ||
| else: | ||
| r_version = version | ||
| else: | ||
| r_version = version | ||
|
|
||
| return cls(head=head, email=email, branch=branch, remote=remote, | ||
| version=version) | ||
| version=version, r_version=r_version) | ||
|
|
||
| def is_default_branch(self): | ||
| # TODO(ARROW-17552): Switch the condition to "is" instead of "in" | ||
|
|
@@ -1105,7 +1138,10 @@ def from_config(cls, config, target, tasks=None, groups=None, params=None): | |
| 'version': target.version, | ||
| 'no_rc_version': target.no_rc_version, | ||
| 'no_rc_semver_version': target.no_rc_semver_version, | ||
| 'no_rc_snapshot_version': target.no_rc_snapshot_version} | ||
| 'no_rc_snapshot_version': target.no_rc_snapshot_version, | ||
| 'r_version': target.r_version, | ||
| 'no_rc_r_version': target.no_rc_r_version, | ||
| } | ||
| for task_name, task in task_definitions.items(): | ||
| task = task.copy() | ||
| artifacts = task.pop('artifacts', None) or [] # because of yaml | ||
|
|
@@ -1260,6 +1296,7 @@ def validate(self): | |
| branch='master', | ||
| remote='https://github.com/apache/arrow', | ||
| version='1.0.0dev123', | ||
| r_version='0.13.0.100000123', | ||
| email='[email protected]' | ||
| ) | ||
| job = Job.from_config(config=self, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This version is only used for nightly builds (which are uploaded to nightlies.a.o) and for crossbow jobs triggered manually right? Is there a reason we need to move to the "dev version" numbering or could we just use
datetimeto stick with the existing YYYYMMDD numbering?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.
Right.
YYYYMMDDversion.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.
OK I see, thanks for explaining. I have no strong opinion on this. @nealrichardson what do you think?
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.
As long as the x.y.z version number is the same as the current release and the "dev version" in the nightly is > 9000, I don't feel strongly. It's not clear to me how it's less work to turn 100000234 into a specific commit than it is to convert YYYYMMDD--still gotta look that up somewhere--in practice all that matters is that the nightly package version number is greater than last night's release and less than the next major release.
Uh oh!
There was an error while loading. Please reload this page.
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.
Ah, sorry. "without extra work" is exaggerated...
We need to do the following to show the commit for
1000000234:$ git log "master~$[$(git describe --tags master | cut -d- -f4) - (1000000234 - 1000000000)]"I'll resolve conflict and merge this for 10.0.0.
If we find any problem with this approach, we can try another approach for 11.0.0 or later.