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

Fix null oauth version check #1247

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading