-
Notifications
You must be signed in to change notification settings - Fork 15
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
Merge hotfixes into devel #1326
Conversation
[DAPS-Deps] update Checker Ver
…epo service instead of hard coding
hotfix port mapping
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
…thread-counts 1321 feature config settings core thread counts
Reviewer's Guide by SourceryThis pull request merges hotfixes from the release branch into the development branch. It updates version numbers, modifies configuration scripts to utilize environment variables, disables Docker cache during image builds, and includes other minor fixes and updates. Sequence diagram for generating core configsequenceDiagram
participant Script
participant Environment
Script->>Environment: Check if DATAFED_CORE_CLIENT_THREADS is set
alt DATAFED_CORE_CLIENT_THREADS is not set
Script->>Script: Set local_DATAFED_CORE_CLIENT_THREADS to default "2"
else DATAFED_CORE_CLIENT_THREADS is set
Script->>Environment: Get DATAFED_CORE_CLIENT_THREADS value
Environment-->>Script: Returns DATAFED_CORE_CLIENT_THREADS value
Script->>Script: Set local_DATAFED_CORE_CLIENT_THREADS to DATAFED_CORE_CLIENT_THREADS value
end
Script->>Environment: Check if DATAFED_CORE_TASK_THREADS is set
alt DATAFED_CORE_TASK_THREADS is not set
Script->>Script: Set local_DATAFED_CORE_TASK_THREADS to default "2"
else DATAFED_CORE_TASK_THREADS is set
Script->>Environment: Get DATAFED_CORE_TASK_THREADS value
Environment-->>Script: Returns DATAFED_CORE_TASK_THREADS value
Script->>Script: Set local_DATAFED_CORE_TASK_THREADS to DATAFED_CORE_TASK_THREADS value
end
Sequence diagram for generating repo configsequenceDiagram
participant Script
participant Environment
Script->>Environment: Check if DATAFED_DOMAIN is set
alt DATAFED_DOMAIN is not set
Script->>Script: Set local_DATAFED_DOMAIN to default "datafed.ornl.gov"
else DATAFED_DOMAIN is set
Script->>Environment: Get DATAFED_DOMAIN value
Environment-->>Script: Returns DATAFED_DOMAIN value
Script->>Script: Set local_DATAFED_DOMAIN to DATAFED_DOMAIN value
end
Script->>Environment: Check if DATAFED_DEFAULT_LOG_PATH is set
alt DATAFED_DEFAULT_LOG_PATH is not set
Script->>Script: Set local_DATAFED_LOG_PATH to default "/tmp/datafed/"
else DATAFED_DEFAULT_LOG_PATH is set
Script->>Environment: Get DATAFED_DEFAULT_LOG_PATH value
Environment-->>Script: Returns DATAFED_DEFAULT_LOG_PATH value
Script->>Script: Set local_DATAFED_LOG_PATH to DATAFED_DEFAULT_LOG_PATH value
end
Script->>Environment: Check if DATAFED_SERVER_PORT is set
alt DATAFED_SERVER_PORT is not set
Script->>Script: Set local_DATAFED_SERVER_PORT to default "7512"
else DATAFED_SERVER_PORT is set
Script->>Environment: Get DATAFED_SERVER_PORT value
Environment-->>Script: Returns DATAFED_SERVER_PORT value
Script->>Script: Set local_DATAFED_SERVER_PORT to DATAFED_SERVER_PORT value
end
Updated class diagram for Version.cmakeclassDiagram
class Version {
DATAFED_RELEASE_YEAR
DATAFED_RELEASE_MONTH
DATAFED_RELEASE_DAY
DATAFED_RELEASE_HOUR
DATAFED_RELEASE_MINUTE
DATAFED_COMMON_LIB_MAJOR
DATAFED_COMMON_LIB_MINOR
DATAFED_COMMON_LIB_PATCH
DATAFED_COMMON_PROTOCOL_API_MAJOR
DATAFED_COMMON_PROTOCOL_API_MINOR
DATAFED_COMMON_PROTOCOL_API_PATCH
DATAFED_CORE_MAJOR
DATAFED_CORE_MINOR
DATAFED_CORE_PATCH
DATAFED_FOXX_MAJOR
DATAFED_FOXX_MINOR
DATAFED_FOXX_PATCH
DATAFED_FOXX_API_MAJOR
DATAFED_FOXX_API_MINOR
DATAFED_FOXX_API_PATCH
DATAFED_WEB_MAJOR
DATAFED_WEB_MINOR
DATAFED_WEB_PATCH
DATAFED_REPO_MAJOR
DATAFED_REPO_MINOR
DATAFED_REPO_PATCH
DATAFED_AUTHZ_MAJOR
DATAFED_AUTHZ_MINOR
DATAFED_AUTHZ_PATCH
DATAFED_PYTHON_CLIENT_MAJOR
DATAFED_PYTHON_CLIENT_MINOR
DATAFED_PYTHON_CLIENT_PATCH
DATAFED_PYTHON_CLIENT_RELEASE_TYPE
DATAFED_PYTHON_CLIENT_PRE_RELEASE_IDENTIFER
}
note for Version "Version numbers have been updated."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @t-ramz - I've reviewed your changes - here's some feedback:
Overall Comments:
- The removal of the format-check.yml workflow seems like a significant change; can you confirm that formatting will still be checked?
- The addition of
--no-cache
to the docker build commands is a good way to ensure that the images are rebuilt from scratch, but it will increase build times.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
* Merge hotfixes into devel (#1326) * [DAPS-DEPS] Update cpp-py-formatter to 0.3.0 * [DAPS-DEPS] Update cpp-py-formatter to 0.3.1 * [DAPS-DEPS] Update ver, add push * updated versions for release * Update project.rst * Update format-check.yml * Pull in version numbers appropriately * Avoid build cache * Aggressive prune * Trigger rebuild * generate_repo_config.sh Accept env variable for datafed server from repo service instead of hard coding * Allow core config thread options to be read in from env * Add changelog comment * Adjust deployment version number * Fix Version month * Update CHANGELOG.md Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --------- Co-authored-by: Aaron Perez <perezam@ornl.gov> Co-authored-by: Blake Nedved <nedvedba@ornl.gov> Co-authored-by: Joshua S Brown <joshbro42867@yahoo.com> Co-authored-by: JoshuaSBrown <brownjs@ornl.gov> Co-authored-by: Anthony Ramirez <ramirezat@ornl.gov> Co-authored-by: nedvedba <145805866+nedvedba@users.noreply.github.com> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Feature DAPS 1215 foxx UserGetAccessTokenRequest mapped collection support (#1284) * Begin prototyping required code for mapped collection token retrieval. * SDMS_Auth.proto Add optional fields to UserGetAccessTokenRequest and UserAccessTokenReply to support finding correct tokens * user_router.js Add baseline query params and checks. DatabaseAPI.cpp & DatabaseAPI.hpp Use updated names and types. ClientWorker.cpp Update comments. * user_router.js Add logic for finding token based on collection; add token match and missing match cases * Return necessary data from Database to refresh tokens. Mock data on dir/list to test out changes. * user_router.js Add check for existence of Globus collection * user_router.js Remove existence check, move to filter method; Add notes on covered cases; add notes on code * datafed-ws.js Temporary handling of need consent response. * user_router.js Add queryParam validation for new params via joilib. ClientWorker.cpp Add refresh token try/catch to send through flow if refresh fails * datafed-ws.js Use correct converted casing for protobuf messages; redirect to error when needs_consent * datafed-ws.js No redirect, show error directly in list. * datafed-ws.js Early return to prevent further requests * support.js Update AccessTokenType enum. user_token.js New class introduced for handling logic for validating params when getting tokens and building GetAccessToken responses. user_router.js Replace logic with calls to new lib * user_token.js Add jsdoc definition for return type and format function. user_router.js Remove unnecessary comment. * user_token.js More jsdoc definition; Add validation for collection token document required fields. user_token.test.js Add preliminary unit tests for static methods. * CMakeLists.txt Add new unit tests to build. user_token.test.js Modify naming to match convention. * CMakeLists.txt Fix variable get. user_token.js Fix export. * user_fixture.js Add new user for get/token tests. user_router.test.js Add simple tests for get/token endpoint. user_token.js Fix naming for token document scopes field. user_token.test.js Changes for scope field bugfix. * user_router.js Formatting; Throw error if more than one token matches, add note about token type. * ClientWorker.cpp Address some TODOs and extraneous comments. DatabaseAPI.cpp Remove TODOs. SDMS_Auth.proto Remove unused field. * user_token.js Update formatUserToken to always return object values. DatabaseAPI.cpp Add note on possibly missing field. user_token.test.js Update tests to check for new expected values. * user_router.js Clean up some comments for clarity. datafed-ws.js Formatting. * ClientWorker.cpp Rewrite comment regarding mapped token refresh. * user_token.js Formatting. * CHANGELOG.md update for feature * user_router.js Re-introduce accidentally removed `globus_collection` object. * CMakeLists.txt Remove comment about necessity * Update token lookup logic to use `byExample`, add test case for missing Globus collection. Add globus_coll fixture. * SDMS_Auth.proto Change UserAccessTokenReply needs_consent to optional field. * user_router.js Update token/get to default to start consent flow when collection tokens are present. user_router.test.js Update test from error to needs_consent. * Formatting changes. --------- Co-authored-by: Anthony Ramirez <ramirezat@ornl.gov> * [DLT-1110] Implement Consent Required Action (3/4 & 4/4) (#1242) * [DLT-1110] Refactor browse into component and use CSS * [DAPS-1110] Update * [DAPS-1110] Update web server * [DAPS-1110] add refactors * [DAPS-1110] Prettier * [DAPS-1110] Refactor tests * [DAPS-1110] Remove .. in ep ls, remove logs * [DAPS-1110] Add sinon, remove dead code * [DAPS-1110] Address transfer start button bug * [DAPS-1110] eslint, update api.test.js to reflect usage * [DAPS-1110] format * [DAPS-1110] Correct bug * JSON parse error fix (#1328) * DatabaseAPI.cpp Pull in json dependency, use json object to serialize request payload * Replace json serialization in more locations where parseSearchRequest is being called. * Add comments around locations that will need json serialization * Convert missed body append to serialization format * typo * Refactoring DatabaseAPI.cpp to incorporate json serialization * More serialization work * Pull in changes from 1214 for dataPut * Bring in changes from 1214 for dataGet * DatabaseAPI.cpp Fix error with missing curly brace. Some formatting that is likely wrong. Serialize up to original point. Need to validate. * Add missing scope resolution * More typos * More typos. Scoping * Remove non-existant vars * declare body * Formatting * Formatting and verification of updates * Replace most places * Formatting * Remove redeclaration * DatabaseAPI.cpp Remove some comments. * DatabaseAPI.cpp Add missing push_back * Adding braces * Prevent Double Escaping string, by using nlohmann json parse to read in value. * remove escapeJSON calls, redundant with nlohmann json dump * Allow parsing for metric data to be run in parallel for now, output messages when old serialization is used. * Ensure ASCII setting. * Upgrade debug to warning. --------- Co-authored-by: Anthony Ramirez <ramirezat@ornl.gov> Co-authored-by: Austin Hampton <amh107@latech.edu> Co-authored-by: Joshua S Brown <joshbro42867@yahoo.com> * Feature - Mapped Collection Token Support (#1334) * Begin prototyping required code for mapped collection token retrieval. * SDMS_Auth.proto Add optional fields to UserGetAccessTokenRequest and UserAccessTokenReply to support finding correct tokens * user_router.js Add baseline query params and checks. DatabaseAPI.cpp & DatabaseAPI.hpp Use updated names and types. ClientWorker.cpp Update comments. * user_router.js Add logic for finding token based on collection; add token match and missing match cases * Return necessary data from Database to refresh tokens. Mock data on dir/list to test out changes. * user_router.js Add check for existence of Globus collection * user_router.js Remove existence check, move to filter method; Add notes on covered cases; add notes on code * datafed-ws.js Temporary handling of need consent response. * user_router.js Add queryParam validation for new params via joilib. ClientWorker.cpp Add refresh token try/catch to send through flow if refresh fails * datafed-ws.js Use correct converted casing for protobuf messages; redirect to error when needs_consent * datafed-ws.js No redirect, show error directly in list. * datafed-ws.js Early return to prevent further requests * support.js Update AccessTokenType enum. user_token.js New class introduced for handling logic for validating params when getting tokens and building GetAccessToken responses. user_router.js Replace logic with calls to new lib * user_token.js Add jsdoc definition for return type and format function. user_router.js Remove unnecessary comment. * user_token.js More jsdoc definition; Add validation for collection token document required fields. user_token.test.js Add preliminary unit tests for static methods. * CMakeLists.txt Add new unit tests to build. user_token.test.js Modify naming to match convention. * CMakeLists.txt Fix variable get. user_token.js Fix export. * user_fixture.js Add new user for get/token tests. user_router.test.js Add simple tests for get/token endpoint. user_token.js Fix naming for token document scopes field. user_token.test.js Changes for scope field bugfix. * user_router.js Formatting; Throw error if more than one token matches, add note about token type. * ClientWorker.cpp Address some TODOs and extraneous comments. DatabaseAPI.cpp Remove TODOs. SDMS_Auth.proto Remove unused field. * user_token.js Update formatUserToken to always return object values. DatabaseAPI.cpp Add note on possibly missing field. user_token.test.js Update tests to check for new expected values. * user_router.js Clean up some comments for clarity. datafed-ws.js Formatting. * ClientWorker.cpp Rewrite comment regarding mapped token refresh. * user_token.js Formatting. * CHANGELOG.md update for feature * user_router.js Re-introduce accidentally removed `globus_collection` object. * CMakeLists.txt Remove comment about necessity * Add collection_type and collection_id to dat/put task state * support.js Update getAccessToken method to work based on collection information, JSDoc. tasks.js Include context required in call to getAccessToken, add comment on refresh. TaskWorker.cpp Identify where changes will be reflected. * Update token lookup logic to use `byExample`, add test case for missing Globus collection. Add globus_coll fixture. * SDMS_Auth.proto Change UserAccessTokenReply needs_consent to optional field. * user_router.js Update token/get to default to start consent flow when collection tokens are present. user_router.test.js Update test from error to needs_consent. * Formatting changes. * SDMS_Auth.proto Add new fields to DataGetRequest * Begin refactor of token decision logic. * Address bugs in fetching and mapping data, make unit tests pass. * globus_token.js Match other models for get * tasks.js Pull in new logic for determining tokens, replace tokens; Needs to be verified. user_token.js Add new format function for compatibility with transfer doc replacement. * DatabaseAPI.cpp Sane serialization of json body for taskInitDataPut. TaskWorker.cpp Comments around work items. * DatabaseAPI.cpp Sane serialization of json body for taskInitDataGet. * ClientWorker.cpp Stub out required changes for consent flow when creating tasks * ClientWorker.cpp More thorough consent flow for procDataPutRequest, stub on needs_consent * tasks.js Throw error when initializing data put * tasks.js Format error throwing. ClientWorker.cpp comment out potentially unnecessary code. * user_token.js Add exists method to abstract check. tasks.js User exists method when checking token. * user_token.js JSDoc typing * tasks.js Add more required fields to taskRunDataPut for refresh in TaskWorker. * tasks.js Add collection_id to params in taskRunDataPut for refresh in TaskWorker. TaskWorker.cpp Refresh conditionals * DatabaseAPI.cpp Update merged devel changes to address some leftover code. * DatabaseAPI.cpp Add collection specification to get request. * DatabaseAPI.cpp whitespace. ClientWorker.cpp Clean up unused code. user_router.js Switch to checking token existence through standard API. * user_token.js Add comment about type return. data_router.js Do validations at router level for user collection token relationship. tasks.js Remove validation from logic level; make dataGet mirror dataPut; Updates to naming and params structure. * ClientWorker.cpp Revert to minimize diff. TaskWorker.cpp Remove unnecessary TODO; move set client for refresh in transfer tasks. * models/ JSDocs, formatting, make token fetches follow defined model. user_token.js JSDocs and typing. * user_token.js Cover case where collection does not exist. * Small changes for UI detection of collection type * fix epview call for UI changes, add list view change to react appropriately to needing consent according to current code * extract ep view logic to function for either path to utilize * small changes and notes for UI updates * UI search based on path, not ID. camelCasing * TaskWorker.cpp small fix to only enforce requirement of additional refresh fields when token is transfer token. * add params for dat/get on UI * task.js Fix bug where client is incorrectly referenced. * Add user model tests. Extract DataFedOAuthToken.js from user_token.js for reusability. * Add globus collection model tests. * Add globus token tests. Add fixtures to support globus token testing. Make all model properties static for iteration purposes. Utilize constructors for typing. * Add user token tests. Make non-existent user throw an error when building user tokens. * Change error to be not found * Formatting changes * Remove unused changes in support.js getAccessToken * Changelog update, update comments, remove log. --------- Co-authored-by: Anthony Ramirez <ramirezat@ornl.gov> * Add small fix for storeCollectionId (#1341) * Add small fix for storeCollectionId * move todo comment --------- Co-authored-by: Anthony Ramirez <ramirezat@ornl.gov> --------- Co-authored-by: Anthony <64566330+t-ramz@users.noreply.github.com> Co-authored-by: Aaron Perez <perezam@ornl.gov> Co-authored-by: Joshua S Brown <joshbro42867@yahoo.com> Co-authored-by: JoshuaSBrown <brownjs@ornl.gov> Co-authored-by: Anthony Ramirez <ramirezat@ornl.gov> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: Aaron Perez <aperez0295@gmail.com> Co-authored-by: Austin Hampton <amh107@latech.edu>
PR Description
Various fixes for configuration have gone into the release branch, and should be sync'd back into devel
Tasks
Summary by Sourcery
Syncs various fixes from the release branch back into devel, including configuration fixes, version updates, and CI improvements. The changes ensure that the latest configuration and build settings are applied across the project.
Bug Fixes:
Enhancements:
Build:
--no-cache
flag to docker build commands in the CI pipeline to prevent caching issues.CI:
docker system prune -f --all
to remove all unused images and containers.