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

Add sentry to ALL reward services #2958

Merged
merged 119 commits into from
May 23, 2022
Merged

Add sentry to ALL reward services #2958

merged 119 commits into from
May 23, 2022

Conversation

tintinthong
Copy link
Contributor

@tintinthong tintinthong commented May 16, 2022

Adds sentry logging to all reward services.

Linear ticket: cs-2711

  • [ ] scheduler @IanCal adding scheduler sentry along side with passing sentry dsn into reward rules
  • reward rules
  • reward root submitter
  • reward-api (includes indexer)

Comment on lines +34 to +35
"streamlit>=1.9.0",
"hexbytes>=0.2.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

 (new2) tintinthong@Justins-MacBook-Pro cardpay-reward-programs % pdm add -G explore hexbytes                                                                                      
 Adding packages to explore dependencies: hexbytes                                                                                                                                 
 ✖ 🔒 Lock failed                                                                                                                                                                  
 Unable to find a resolution because the following dependencies don't work on all Python versions defined by the project's `requires-python`: >=3.9                                
   python>=3.6,<3.11 (from <Candidate eth-typing 2.3.0 from https://pypi.org/simple/eth-typing/>)                                                                                  
   python>=3.6,<3.11 (from <Candidate eth-typing 2.3.0 from unknown>)                                                                                                              
 To fix this, you can change the value of `requires-python` in pyproject.toml.                                                                                                     
 See /var/folders/hv/qnr8mqkn4zxcgt1rg18sbbjw0000gn/T/pdm-lock-zdoozpdq.log for detailed debug log.                                                                                
 [ResolutionImpossible]: Unable to find a resolution 

There are some resolution errors when adding hexbytes. I resolved this by narrowing the requires-python range. Probably related issue

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh interesting. I guess if we set an upper bound to the python version this package supports to 3.10 this might go away?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup this is what I did it seemed to work

@IanCal
Copy link
Contributor

IanCal commented May 23, 2022

@tintinthong I'm adding sentry to the scheduler project yeah

@tintinthong
Copy link
Contributor Author

tintinthong commented May 23, 2022

@IanCal this pr is paired with this https://github.com/cardstack/infra/pull/165

@tintinthong
Copy link
Contributor Author

Note: Decided to commit original lock file

Adding dev dependency web3[eth-tester] seems to have resolution issues when adding sentry-sdk and forcing a resolution with pdm 1.15.0. But, using pdm 1.14.0 seems to resolve. The lock file is created from pdm 1.14.0.

I suspect that the main culprit is in installing the dependency eth-keyfile dependency https://github.com/ethereum/eth-keyfile/blob/3f26ae25e0ba11ee98ee3953417381d9f42db2e8/setup.py#L13.

@tintinthong tintinthong merged commit 1072a40 into main May 23, 2022
@delete-merged-branch delete-merged-branch bot deleted the add-sentry-reward-api branch May 23, 2022 12:57
Comment on lines +87 to +92
## Issues running on M1

If you use an m1 (arm64 architecture) you may encounter errors when sub-dependencies do not have arm64 distribution.

One way to resolve this is to follow [here](https://towardsdatascience.com/how-to-use-manage-multiple-python-versions-on-an-apple-silicon-m1-mac-d69ee6ed0250). The solution is to use Rosetta for `x86` terminal emulation. After doing so, you will have a separate pdm installation in `/usr/local/bin`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Important to ensure that your emulated pdm is pointing to the correct python -- tripped me up quite a bit.

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.

2 participants