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

Task/use backend morecast token #3824

Merged
merged 7 commits into from
Aug 7, 2024
Merged

Conversation

conbrad
Copy link
Collaborator

@conbrad conbrad commented Aug 7, 2024

Use our API token with forecast write permissions for morecast forecast posts. Removes frontend WF1 auth wrapper.

Closes #3802

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

@conbrad conbrad requested review from dgboss and brettedw August 7, 2024 17:08
@conbrad conbrad requested a review from dgboss August 7, 2024 17:30
Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

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

I think a few more changes are required on the front-end. I believe wf1AuthenticationSlice.ts can go along with its tests. We can also remove references to the selector from TabbedDataGrid.tsx and rootReducer.ts.

@conbrad conbrad requested a review from dgboss August 7, 2024 19:00
Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link

sonarcloud bot commented Aug 7, 2024

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 89.41176% with 9 lines in your changes missing coverage. Please review.

Project coverage is 79.35%. Comparing base (025af0c) to head (8fad4ca).

Files Patch % Lines
api/app/routers/morecast_v2.py 88.57% 4 Missing ⚠️
api/app/morecast_v2/forecasts.py 90.00% 2 Missing ⚠️
...c/features/moreCast2/components/TabbedDataGrid.tsx 0.00% 2 Missing ⚠️
api/app/wildfire_one/wfwx_post_api.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3824      +/-   ##
==========================================
- Coverage   79.37%   79.35%   -0.03%     
==========================================
  Files         297      295       -2     
  Lines       10908    10862      -46     
  Branches      525      518       -7     
==========================================
- Hits         8658     8619      -39     
+ Misses       2105     2099       -6     
+ Partials      145      144       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@brettedw brettedw left a comment

Choose a reason for hiding this comment

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

Nice work, thanks for tackling that so quickly

@conbrad conbrad temporarily deployed to production August 7, 2024 20:42 Inactive
@conbrad conbrad merged commit 3ab289e into main Aug 7, 2024
29 checks passed
@conbrad conbrad deleted the task/use-backend-morecast-token branch August 7, 2024 20:59
Copy link

sentry-io bot commented Aug 7, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ HTTPException: Error submitting forecast(s) to WF1 /morecast-v2/forecast View Issue
  • ‼️ ContentTypeError: Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8 /morecast-v2/forecast View Issue
  • ‼️ TimeoutError /morecast-v2/forecast View Issue
  • ‼️ KeyError: '_embedded' /morecast-v2/forecast View Issue

Did you find this useful? React with a 👍 or 👎

dgboss pushed a commit that referenced this pull request Aug 14, 2024
Use our API token with forecast write permissions for morecast forecast posts. Removes frontend WF1 auth wrapper.
vanislekahuna pushed a commit to vanislekahuna/wps that referenced this pull request Sep 19, 2024
Use our API token with forecast write permissions for morecast forecast posts. Removes frontend WF1 auth wrapper.
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.

Morecast: Migrate to using API token for posting forecasts to WF1
3 participants