Skip to content

Commit

Permalink
Merge pull request #1247 from tableau/pv/fix-pacakger
Browse files Browse the repository at this point in the history
Fix null oauth version check
  • Loading branch information
pvanderknyff committed Jul 23, 2024
2 parents ae18eb0 + 6a42061 commit a081a9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions connector-packager/connector_packager/jar_jdk_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def get_min_support_version(file_list: List[ConnectorFile], cur_min_version_tabl
reasons.append("Support for multiple OAuth configs was added in the 2023.1 release")
elif (oauthConfigs is not None and len(oauthConfigs) == 1):
firstConfig = oauthConfigs[0]
if firstConfig.attrib['file'] == "null_config" and 2024.1 > float(min_version_tableau):
min_version_tableau = "2024.1"
reasons.append("Connector uses Null OAuth Config, which was added in the 2024.1 release")
if firstConfig.attrib['file'] == "null_config" and 2023.3 > float(min_version_tableau):
min_version_tableau = "2023.3"
reasons.append("Connector uses Null OAuth Config, which was added in the 2023.3 release")

if version.parse(cur_min_version_tableau) > version.parse(min_version_tableau):
reasons.append("min-tableau-version set to " + cur_min_version_tableau + ", since that is higher than calculated version of " + min_version_tableau)
Expand Down
2 changes: 1 addition & 1 deletion connector-packager/tests/test_jar_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def test_jdk_create_jar_with_null_oauth_config(self):

manifest = ET.parse(path_to_extracted_manifest)
self.assertEqual(manifest.getroot().get("min-version-tableau"),
VERSION_2024_1, "wrong min-version-tableau attr or doesn't exist")
VERSION_2023_3, "wrong min-version-tableau attr or doesn't exist")

if dest_dir.exists():
shutil.rmtree(dest_dir)

0 comments on commit a081a9d

Please sign in to comment.