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

SIMSBIOHUB-194: Seed SIMS with Users from SPI #1086

Merged
merged 12 commits into from
Sep 11, 2023
Merged

SIMSBIOHUB-194: Seed SIMS with Users from SPI #1086

merged 12 commits into from
Sep 11, 2023

Conversation

KjartanE
Copy link
Contributor

@KjartanE KjartanE commented Sep 6, 2023

Links to Jira Tickets

Description of Changes

SIMS

  • Added service account capability to endpoints, to allow a script to utilize the SIMS SYSTEM account to insert a collected list of users.
  • DB migration was required to insert new user role for SYSTEM and a SIMS service account

SIMS-UTILS

Testing Notes

  • I have only uploaded the list of users keycloakData.json on the Jira ticket comments.
  • Please save it and store it in a directory inside the user npm instance.
    • utils/users/src/data_temp/keycloakData.json
  • Also a .env file is required and will on the Jira ticket

KjartanE and others added 9 commits August 30, 2023 14:26
* Add retry mechanic to useAxios to handle the case where your keycloak token has expired, but your refresh token is still valid.
* Fix bad error handling on a repo function. Function was throwing on empty array, when empty array should be expected/allowed.
…w) (#1084)

Update existing migration: remove observation table (for now)
* Creates new tables: survey_block, survey_stratrum, site_strategy, survey_site_strategy
* Amends the survey deletion procedure to delete blocks as well as stratum records upon survey deletion
…using SIMS Service Account (#1077)

* Adds '/telemetry' endpoint to API for proxied BCTW requests.
* Adds new service to handle authenticated requests to Critterbase API.
* Adds new '/critter-data' endpoint to API for proxied Critterbase requests.
* Modifies Add Animal form's api hooks to point at /critter-data endpoint instead of Critterbase directly.
* Adds new method to Keycloak service for service account token retrieval.

---------

Co-authored-by: Mac Deluca <[email protected]>
Co-authored-by: Graham Stewart <[email protected]>
Co-authored-by: Alfred Rosenthal <[email protected]>
Co-authored-by: Curtis Upshall <[email protected]>
Co-authored-by: Nick Phura <[email protected]>
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #1086 (a095abd) into dev (53cc39b) will decrease coverage by 0.13%.
The diff coverage is 77.88%.

@@            Coverage Diff             @@
##              dev    #1086      +/-   ##
==========================================
- Coverage   64.64%   64.51%   -0.13%     
==========================================
  Files         458      464       +6     
  Lines       13923    13921       -2     
  Branches     2190     2200      +10     
==========================================
- Hits         9000     8981      -19     
- Misses       4366     4374       +8     
- Partials      557      566       +9     
Files Changed Coverage Δ
api/src/app.ts 0.00% <0.00%> (ø)
api/src/database/db-utils.ts 75.00% <ø> (-8.88%) ⬇️
api/src/models/survey-view.ts 83.82% <0.00%> (-2.95%) ⬇️
api/src/paths/project/{projectId}/survey/list.ts 96.66% <ø> (ø)
api/src/paths/user/add.ts 54.76% <33.33%> (-23.81%) ⬇️
api/src/repositories/user-repository.ts 60.71% <33.33%> (-2.11%) ⬇️
api/src/services/user-service.ts 83.72% <50.00%> (-2.00%) ⬇️
api/src/paths/administrative-activity.ts 88.37% <66.66%> (-0.27%) ⬇️
...pi/src/request-handlers/security/authentication.ts 68.18% <66.66%> (-0.87%) ⬇️
api/src/database/db.ts 78.89% <80.95%> (+0.26%) ⬆️
... and 12 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

ran this locally and it inserted users 👍

@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Code looks good!

@KjartanE KjartanE merged commit 0106937 into dev Sep 11, 2023
19 of 20 checks passed
@KjartanE KjartanE deleted the SIMSBIOHUB-194 branch September 11, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants