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

feat: 15.2.2 release #367

Merged
merged 35 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
07829ba
wip: Create 15.2.1-beta builds
JacobiClark Sep 9, 2024
4d655b1
feat: advanced features has agent check UI
aaronm-2112 Sep 24, 2024
b0e1811
chore: spawn builds
aaronm-2112 Sep 24, 2024
5c23a96
wip: agent status slot toggle
aaronm-2112 Sep 25, 2024
2e3be7c
style: 🎨 fix code style issues with Prettier
fairdataihub-bot Sep 25, 2024
b59e40d
wip: Fixed check for Pennsieve agent error messages
JacobiClark Sep 25, 2024
5cb8d85
wip: Add new entry to known Pennsieve Agent issues
JacobiClark Sep 25, 2024
995f9ae
fix: remove duplicate known Pennsieve agent error strings
JacobiClark Sep 25, 2024
98f43eb
wip: Added try catch to Pennsieve agent db file unlinking
JacobiClark Sep 25, 2024
9097a30
wip: Added link to fix pennsieve agent db files manually
JacobiClark Sep 25, 2024
f9488f4
refactor: mutation observer shows pull manifest btn
aaronm-2112 Sep 25, 2024
cd1bcea
style: 🎨 fix code style issues with Prettier
fairdataihub-bot Sep 25, 2024
c6a883e
fix: start over hides and shows manfiest sections properly
aaronm-2112 Sep 26, 2024
4a97d12
style: 🎨 fix code style issues with Prettier
fairdataihub-bot Sep 26, 2024
089d9b9
wip: banner image agent check
aaronm-2112 Sep 26, 2024
9bd7782
style: 🎨 fix code style issues with Prettier
fairdataihub-bot Sep 26, 2024
3eb2094
feat: pennsieve agent check added to advanced features banner image
aaronm-2112 Sep 27, 2024
4d9f22f
fix: ps_upload_to_ds errors before retry vary initialization and caus…
aaronm-2112 Sep 30, 2024
834ebea
fix: SODA-Pennsieve key existing turns it into the default profile no…
aaronm-2112 Oct 4, 2024
868121b
fix: SODA-Pennsieve accounts not properly moved to soda-pennsieve and…
aaronm-2112 Oct 4, 2024
dcf9502
Merge pull request #363 from fairdataihub/fix-soda-pennsieve-key-default
aaronm-2112 Oct 4, 2024
526f73a
refactor: mutation observer creation moved to a function
aaronm-2112 Oct 6, 2024
fd6b0df
refactor: remove unused code and comments
aaronm-2112 Oct 6, 2024
f03b7b5
Merge pull request #364 from fairdataihub/add-pennsieve-agent-slot-ad…
aaronm-2112 Oct 6, 2024
27dc9e8
Merge pull request #365 from fairdataihub/files_to_rename_bad_reference
aaronm-2112 Oct 6, 2024
b467b08
refactor: direct users to contact us page if upload keeps failing
aaronm-2112 Oct 7, 2024
e8f8bc9
chore: remove console logs
aaronm-2112 Oct 7, 2024
c3d3e0c
chore: remove log statements that have no value or can cause crashes/…
aaronm-2112 Oct 7, 2024
479d539
chore: update changelog with 15.2.2 fixes done by aaronm-2112
aaronm-2112 Oct 7, 2024
6f0739a
wip: update changelog
aaronm-2112 Oct 7, 2024
829b4a7
chore: update version number
aaronm-2112 Oct 8, 2024
756527a
feat: Update CHANGELOG
JacobiClark Oct 8, 2024
910899b
chore: update the announcements
aaronm-2112 Oct 8, 2024
e958a83
Merge branch 'staging' into pre-staging
aaronm-2112 Oct 9, 2024
a191694
build: update api version
aaronm-2112 Oct 9, 2024
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
1 change: 0 additions & 1 deletion .github/workflows/Build-and-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- main
- staging
- pre-staging
- empty-folders-files-hotfix

jobs:
deploy-on-linux:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/Build-and-deploy-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- main
- staging
- pre-staging
- empty-folders-files-hotfix

jobs:
deploy-on-mac:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/Build-and-deploy-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- main
- staging
- pre-staging
- empty-folders-files-hotfix

jobs:
deploy-on-windows:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to SODA will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v15.2.2 - 2024-10-09

## Bug Fixes:

- Fixed an issue with the Pennsieve agent version check not being able to detect old versions of the Pennsieve agent (The agent found at https://github.com/Pennsieve/agent).
- Fixed an issue in how SODA reads the config.ini file that made it so that if the account name 'SODA-Pennsieve' exists it is always used for authentication with Pennsieve even when a defualt_profile key exists in the config.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (documentation): Typo in 'default_profile'

The word 'defualt_profile' is misspelled. It should be 'default_profile'.

- Fixed an issue in the manifest creation and banner image upload/edit features of the `Advanced Features` tab that made it so users without Pennsieve Agents were not directed to the Pennsieve Agent download page. Instead they were told 'the pennsieve agent is not running.'
- It was possible for an upload to fail early in 'Prepare Datasets Step-by-Step' and 'Upload Dataset' such that the catch statement referenced a variable that was not yet defined. This has been fixed.

## v15.2.0 - 2024-08-21

## Feature Additions:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "soda-for-sparc",
"procductName": "SODA for SPARC",
"version": "15.2.2-beta",
"version": "15.2.2",
"description": "Keep Calm and Curate",
"main": "./out/main/index.js",
"author": "SODA Team",
Expand Down
4 changes: 2 additions & 2 deletions src/pyflask/configUtils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def lowercase_account_names(config, account_name, configpath):

# add the section back with the lowercase account name
config.add_section(formatted_account_name)
config.set(formatted_account_name, "api_token", config.get(formatted_account_name, "api_token"))
config.set(formatted_account_name, "api_secret", config.get(formatted_account_name, "api_secret"))
config.set(formatted_account_name, "api_token", config.get(account_name, "api_token"))
config.set(formatted_account_name, "api_secret", config.get(account_name, "api_secret"))

# set the global default_profile option to lowercase
config.set("global", "default_profile", formatted_account_name)
Expand Down
14 changes: 9 additions & 5 deletions src/pyflask/curate/curate.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,10 +907,7 @@ def recursive_dataset_scan(
list_copy_files, list_move_files = recursive_dataset_scan(
folder, folderpath, list_copy_files, list_move_files
)
for file in list_copy_files:
namespace_logger.info(f"file to copy: {file}")
for file in list_move_files:
namespace_logger.info(f"file to move: {file}")

# 3. Add high-level metadata files in the list
if "metadata-files" in soda_json_structure.keys():
namespace_logger.info("generate_dataset_locally (optional) step 3 handling metadata-files")
Expand Down Expand Up @@ -1900,6 +1897,11 @@ def build_create_folder_request(folder_name, folder_parent_id, dataset_id):

bytes_file_path_dict = {}

# retry variables instantiated outside function
list_of_files_to_rename = {}
renamed_files_counter = 0


def ps_upload_to_dataset(soda_json_structure, ps, ds, resume=False):
global namespace_logger

Expand All @@ -1925,7 +1927,9 @@ def ps_upload_to_dataset(soda_json_structure, ps, ds, resume=False):
global elapsed_time
global manifest_id
global origin_manifest_id
global main_curate_status
global main_curate_status
global list_of_files_to_rename
global renamed_files_counter


total_files = 0
Expand Down
9 changes: 5 additions & 4 deletions src/pyflask/datasets/compare_local_remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

def import_subfolders(subfolder, path):
global PENNSIEVE_URL
global namespace_logger
global pennsieve_dataset_paths
folder_id = subfolder["id"]
try:
Expand All @@ -38,7 +39,7 @@ def import_subfolders(subfolder, path):
for folder_name, folder in subfolder["folders"].items():
import_subfolders(folder, f"{path}/{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand Down Expand Up @@ -72,7 +73,7 @@ def import_pennsieve_dataset(dataset_id, path):
for folder_name, folder in pennsieve_dataset_structure["folders"].items():
import_subfolders(folder, f"{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand Down Expand Up @@ -100,7 +101,7 @@ def import_local_dataset(path):
for folder_name, folder in local_dataset_structure["folders"].items():
import_local_subfolders(folder, f"{path}/{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand All @@ -125,7 +126,7 @@ def import_local_subfolders(subfolder, path):
for folder_name, folder in subfolder["folders"].items():
import_local_subfolders(folder, f"{path}/{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand Down
1 change: 0 additions & 1 deletion src/pyflask/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def reserve_dataset_doi(dataset): # sourcery skip: extract-method
doi_request.raise_for_status()
return {"doi": doi_request.json()["doi"]}
except Exception as e:
print(e)
abort(e.response.status_code, e.response.json().get('message'))


Expand Down
14 changes: 8 additions & 6 deletions src/pyflask/manageDatasets/manage_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,7 @@ def bf_get_accounts():
sections = config.sections()
global namespace_logger

if SODA_SPARC_API_KEY in sections:
lowercase_account_names(config, SODA_SPARC_API_KEY, configpath)
with contextlib.suppress(Exception):
get_access_token()
return SODA_SPARC_API_KEY.lower()
elif "global" in sections:
if "global" in sections:
if "default_profile" in config["global"]:
default_profile = config["global"]["default_profile"]
if default_profile in sections:
Expand All @@ -282,6 +277,13 @@ def bf_get_accounts():
except Exception as e:
namespace_logger.info("Failed to authenticate the stored token")
abort(401, e)

elif SODA_SPARC_API_KEY in sections:
lowercase_account_names(config, SODA_SPARC_API_KEY, configpath)
with contextlib.suppress(Exception):
get_access_token()
return SODA_SPARC_API_KEY.lower()

else:
namespace_logger.info("No default account found")
for account in sections:
Expand Down
2 changes: 1 addition & 1 deletion src/pyflask/startup/minimumApiVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def get_api_version():



return {'version': os.getenv('API_VERSION', "15.2.2-beta")}
return {'version': os.getenv('API_VERSION', "15.2.2")}


Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const addDatasetAndOrganizationCardComponents = () => {
currentParentTab: "add_edit_banner_parent-tab",
action: "delete",
section: "individual-question manage-dataset",
dataNext: "div_add_edit_banner",
dataNext: "div_add_edit_banner_image_agent_check",
fields: [
FIELD_OPTIONS.ACCOUNT_EDITABLE,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const CLOSE_SODA_BUTTON_TEXT = "Close SODA";
const KNOWN_ERROR_MESSAGES = [
"UNIQUE constraint failed:",
"NotAuthorizedException: Incorrect username or password.",
"401 Error Creating new UserSettings",
"UserSettings" /* If the error message contains "UserSettings", it is likely solved by deleting the Pennsieve Agent database files */,
];

// Utility Functions
Expand All @@ -22,13 +22,24 @@ const deletePennsieveAgentDBFilesAndRestart = async () => {
"/.pennsieve/pennsieve_agent.db-wal",
];

for (const file of filesToDelete) {
const filePath = `${window.homeDirectory}${file}`;
if (window.fs.existsSync(filePath)) {
await window.fs.unlink(filePath);
try {
// Stop the Pennsieve agent to free up the database files
await window.spawn.stopPennsieveAgent();

// Delete the Pennsieve agent database files
for (const file of filesToDelete) {
const filePath = `${window.homeDirectory}${file}`;
if (window.fs.existsSync(filePath)) {
await window.fs.unlink(filePath);
} else {
console.error(`Unable to find Pennsieve agent DB file: ${filePath}`);
}
}
} catch (error) {
console.error("Error deleting Pennsieve agent DB files:", error);
}

// Restart the Pennsieve agent check
await window.checkPennsieveAgent();
};

Expand Down Expand Up @@ -61,8 +72,14 @@ const PennsieveAgentErrorMessageDisplay = ({ errorMessage }) => {
<>
<Text>
This is a known issue with the Pennsieve Agent. It can typically be resolved by
deleting the local Pennsieve Agent database files. Would you like SODA to do this
and restart the Agent?
deleting the local Pennsieve Agent database files. You can refer to the
<ExternalLink
href="https://docs.sodaforsparc.io/docs/common-errors/trouble-starting-the-pennsieve-agent-in-soda"
buttonText="SODA documentation"
buttonType="anchor"
/>
for information on how to fix the issue manually. SODA can also attempt to fix the
issue for you. Would you like to have SODA try to fix the issue?
</Text>
<Group justify="center" mt="sm">
<Button onClick={deletePennsieveAgentDBFilesAndRestart}>
Expand Down Expand Up @@ -108,6 +125,7 @@ const PennsieveAgentCheckDisplay = () => {
postPennsieveAgentCheckAction,
} = useGlobalStore();

// If the Pennsieve agent check is in progress, display a loading spinner
if (pennsieveAgentCheckInProgress === true) {
return (
<FullWidthContainer>
Expand All @@ -121,6 +139,7 @@ const PennsieveAgentCheckDisplay = () => {
);
}

// If an error message title and message are present, display the error message
if (pennsieveAgentCheckError?.title && pennsieveAgentCheckError?.message) {
return (
<FullWidthContainer>
Expand All @@ -142,6 +161,7 @@ const PennsieveAgentCheckDisplay = () => {
);
}

// If the Pennsieve agent is not installed, display a message with a download link
if (pennsieveAgentInstalled === false) {
return (
<FullWidthContainer>
Expand Down Expand Up @@ -176,14 +196,16 @@ const PennsieveAgentCheckDisplay = () => {
);
}

if (pennsieveAgentOutputErrorMessage === true) {
// If the Pennsieve agent check returned an error message, display the error message
if (pennsieveAgentOutputErrorMessage != null) {
return (
<FullWidthContainer>
<PennsieveAgentErrorMessageDisplay errorMessage={pennsieveAgentOutputErrorMessage} />
</FullWidthContainer>
);
}

// If the Pennsieve agent is not up to date, display a message with a download link to the latest version
if (pennsieveAgentUpToDate === false) {
return (
<FullWidthContainer>
Expand Down Expand Up @@ -223,6 +245,7 @@ const PennsieveAgentCheckDisplay = () => {
);
}

// If the Pennsieve agent check was successful (no flags occurred), display a success message
return (
<FullWidthContainer>
<Stack mt="sm" align="center" mx="sm">
Expand Down
Loading
Loading