Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Rollback commits when encountering an exception #582

Merged
merged 5 commits into from
Jul 8, 2021

Conversation

jgwerner
Copy link
Member

  • Adds the SQLAlchemy rollback() method when encountering an exception

@jgwerner jgwerner added the bug Something isn't working label May 27, 2021
@jgwerner jgwerner requested a review from Abhi94N May 27, 2021 19:24
@jgwerner jgwerner self-assigned this May 27, 2021
Copy link

@Abhi94N Abhi94N left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #582 (1d91463) into main (814e11f) will increase coverage by 8.09%.
The diff coverage is n/a.

❗ Current head 1d91463 differs from pull request most recent head a9dfbc7. Consider uploading reports for the commit a9dfbc7 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #582      +/-   ##
==========================================
+ Coverage   66.54%   74.63%   +8.09%     
==========================================
  Files          12       15       +3     
  Lines         807     1025     +218     
==========================================
+ Hits          537      765     +228     
+ Misses        270      260      -10     
Impacted Files Coverage Δ
...illumidesk/illumidesk/apis/setup_course_service.py 62.06% <ø> (ø)
src/illumidesk/illumidesk/grades/handlers.py 63.15% <0.00%> (ø)
src/illumidesk/illumidesk/grades/senders.py 78.86% <0.00%> (ø)
src/illumidesk/illumidesk/grades/exceptions.py 100.00% <0.00%> (ø)
src/illumidesk/illumidesk/authenticators/utils.py 96.29% <0.00%> (+0.37%) ⬆️
...c/illumidesk/illumidesk/authenticators/handlers.py 82.17% <0.00%> (+2.38%) ⬆️
...umidesk/illumidesk/authenticators/authenticator.py 87.87% <0.00%> (+13.42%) ⬆️
.../illumidesk/illumidesk/authenticators/validator.py 85.48% <0.00%> (+24.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 814e11f...a9dfbc7. Read the comment docs.

Copy link

@Abhi94N Abhi94N left a comment

Choose a reason for hiding this comment

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

closing session after rollback LGTM

@jgwerner
Copy link
Member Author

jgwerner commented Jun 8, 2021

@Abhi94N here is a summary of the errors encountered with this PR so we can find the root cause.

  • AWS EKS cluster in us-west-2 region
  • Kubernetes namespace: illumidesk
  • Helm chart version: latest
  • Grader setup service image: illumidesk/grader-setup-service:582 (built from this PR's sources)

The errors are related to permissions issues when the grader-setup-service attempts to deploy a new shared grader notebook. To view a stack trace of the error one just needs to replicate the POST request sent to the http://grader-setup-service:8000/services/<org_name>/<course_name> endpoint:

  • Open a terminal tab and then into the grader setup service: kubectl exec --stdin --tty grader-setup-service-<id> <namespace> -- /bin/bash
  • Open a new terminal tab and stream logs: kubectl logs -f grader-setup-service-<id> -n <namespace>
  • From the first tab, create a POST request with curl: curl -v -X POST http://localhost:8000/services/<org_name>/<course_name>
  • The stack trace should display an issue related to kubernetes permissions

We tested updating the illumidesk/helm-chart repo so that the ClusterRole and ClusterRoleBinding removes typos and duplicate entries. We also successfully created a new deployment from the grader-setup-service pod using this example.

@jgwerner jgwerner merged commit bf7c5db into IllumiDesk:main Jul 8, 2021
@jgwerner jgwerner deleted the fix/rollback branch July 8, 2021 20:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants