Skip to content

Commit

Permalink
Extract latest beam version directly from the request (#31487)
Browse files Browse the repository at this point in the history
Co-authored-by: Yi Hu <yathu@google.com>
  • Loading branch information
tvalentyn and Abacn authored Jun 4, 2024
1 parent bd0ba38 commit a5738c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/trigger_files/beam_PostCommit_XVR_Flink.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run"
"comment": "Modify this file in a trivial way to cause this test suite to run",
"modification": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import shutil
import subprocess
import sys
from pkg_resources import parse_version


def main():
Expand Down Expand Up @@ -63,14 +62,7 @@ def main():
if options.beam_version == 'latest':
info = json.load(
urllib.request.urlopen("https://pypi.org/pypi/apache_beam/json"))

def maybe_strict_version(s):
try:
return parse_version(s)
except:
return parse_version('0.0')

beam_version = max(info['releases'], key=maybe_strict_version)
beam_version = info['info']['version']
beam_package = 'apache_beam[gcp,aws,azure,dataframe]==' + beam_version
elif (os.path.exists(options.beam_version)
or options.beam_version.startswith('http://')
Expand Down

0 comments on commit a5738c1

Please sign in to comment.