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

Hog API Fix for broken payload #532

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Hog API Fix for broken payload #532

merged 1 commit into from
Nov 10, 2023

Conversation

ArneTR
Copy link
Member

@ArneTR ArneTR commented Nov 10, 2023

When the payload was not containing the correct fields we so far implemented a two stage checking.

This was failing in production due to:

  • When sending an email with the payload our provider would fail since the email was too large
    • Now only the exception message is sent. Not the payload
  • The wrong exception was caught and thus the correct routine never triggered
    • Now catching pydantic.ValidationError

Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run 19.6986 2154.89 2.7877 782
Measurement #1 19.7672 2154.89 2.7877 775

📈 Energy graph:

 
 6.52 ┤            ╭─╮      ╭╮
 6.04 ┤            │ ╰─╮    ││                                                     ╭────╮        ╭╮       ╭───╮          ╭──────╮              ╭╮
 5.56 ┤           ╭╯   │    │╰╮                                       ╭╮           │    │ ╭╮╭──╮╭╯│       │   ╰──╮       │      │              ││                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ╭╮                                                                                                                            ╭╮
 5.08 ┤╭╮         │    │   ╭╯ │     ╭╮          ╭╮     ╭╮             ││           │    ╰╮│╰╯  ╰╯ │      ╭╯      │       │      │        ╭╮ ╭╮ ││                                            ╭╮                                     ╭╮            ╭╮                                                                                                                                                                                  ╭╮                                                         ╭╮                            ╭╮                              ╭╮                                                                                                 ││                                                                                                                            ││
 4.60 ┤││        ╭╯    │╭──╯  ╰───╮╭╯╰────────╮╭╯╰───╮╭╯╰────╮╭───────╯│╭╮         │     ││       │      │       ╰╮      │      │        ││ ││ │╰╮                             ╭╮          ╭╮││            ╭╮         ╭╮ ╭╮         ││ ╭╮         ││╭╮            ╭╮           ╭╮            ╭╮          ╭╮╭╮           ╭╮           ╭╮            ╭╮         ╭╮╭╮          ╭─╮╭╮                       ╭╮╭╮╭╮                      ╭╮││╭╮                      ╭╮╭╮╭╮                           ││╭╮          ╭╮          ╭╮ ╭╯│╭╮                          ╭╮││╭╮                          ╭╮╭─╮          ╭╮          ╭╮╭╮           ╭╮           ╭╮          ╭╮││                                ╭╮                          ╭╮                           ╭─╮╭╮╭╮╭╮                         ╭╯│
 4.13 ┤││       ╭╯     ╰╯         ││          ││     ╰╯      ╰╯        │││         │     ││       │      │        │      │      │       ╭╯│ ││ │ ╰╮          ╭╮╭╮        ╭╮ ╭╮ │╰╮         ││││         ╭─╮││         ││╭╯│         ││╭╯│         │││╰╮         ╭╮││         ╭╮││            ││         ╭╯│││         ╭╮││           │╰╮         ╭─╯│         │││╰╮         │ ╰╯╰╮                      ││││││                   ╭╮ ││││││                      │╰╯╰╯│          ╭╮          ╭╮ ╭─╯│││          ││          ││ │ ╰╯╰╮          ╭╮╭╮        ╭╮ │╰╯│││             ╭╮        ╭╮ │││ │          │╰╮         ││││           ││           ││          │││╰╮          ╭─╮ ╭╮            ╭╮╭╯│          ╭╮              │╰╮                         ╭╯ ││││╰╯│          ╭╮          ╭╮ │ │
 3.65 ┤││   ╭╮ ╭╯                 ╰╯          ││                       │││ ╭╮     ╭╯     ││       │      │        │      │      │       │ │ │╰─╯  │          ││││        ││ │╰─╯ │         │╰╯│         │ ╰╯│         │╰╯ │         │││ │         │││ │         │╰╯│         │╰╯│          ╭─╯│         │ ╰╯│         │╰╯│         ╭╮│ │         │  │         │││ │         │    │         ╭╮        ╭╮ │╰╯╰╯│                   ││ │││╰╯│                   ╭╮ │    │          ││╭╮        ││ │  ╰╯│          ││          ││ │    │          ││││        ││ │  ╰╯│          ╭╮ ││        ││ │╰╯ │          │ │         │││╰╮         ╭╯│          ╭╯│         ╭╯╰╯ │          │ │ ││╭╮          │╰╯ │          ││            ╭╮│ │          ╭╮            ╭╯  ╰╯││  │          ││          ││ │ │
 3.17 ┤│╰╮  ││ │                              ││                       ││╰╮││ ╭╮  │      ││       ╰╮     │        │      │      ╰╮      │ ╰╮│     │          ││││        ││ │    │         │  │         │   │         │   │         │╰╯ │         │╰╯ │         │  │         │  ╰╮        ╭╯  │         │   │         │  │         │╰╯ │         │  │         │╰╯ │         │    │         ││        ││ │    │         ╭╮        ││ │╰╯  │         ╭╮        ││ │    │          ││││        ││ │    │          ││          ││ │    │          ││││        ││ │    │          │╰╮││        ││ │   │         ╭╯ │         │╰╯ │         │ ╰╮         │ │         │    │          │ │╭╯│││          │   │          ││            │╰╯ │          │╰─╮          │     ╰╯  │          ││╭╮        ││ │ │
 2.69 ┤│ │ ╭╯╰╮│                              ││                       ││ ╰╯│ │╰──╯      ╰╯        │     │        ╰╮     │       │      │  ╰╯     │        ╭─╯│││        ││ │    │         │  │         │   │         │   │         │   │         │   │         │  │         │   │        │   │    ╭╮   │   │         │  ╰╮        │   │         │  │         │   │         │    │         ││        ││ │    ╰╮        ││        ││ │    │         ││        ││ │    │        ╭╮│╰╯│        ││ │    │        ╭╮│╰─╮        ││ │    │        ╭╮││││        ││ │    │        ╭╮│ │││        ││ │   │         │  │         │   │         │  │        ╭╯ ╰╮        │    │        ╭╮│ ││ │││          │   │        ╭╮│╰─╮          │   │          │  │          │         │        ╭╮│╰╯│        ││ │ ╰╮
 2.21 ┼╯ │ │  ││                              ╰╯                       ╰╯   │ │                    ╰╮  ╭╮│         │     │       │      │         │        │  ╰╯│        ││ │    │        ╭╯  ╰╮        │   │         │   │         │   │         │   │        ╭╯  │         │   │        │   │    ││   │   │         │   │        │   │        ╭╯  │         │   │         │    │         ││       ╭╯│╭╯     │        ││       ╭╯│ │    │         ││       ╭╯│ │    │        │╰╯  │        │╰╮│    ╰╮       │││  │        ││ │    │        │╰╯╰╯│        ││ │    ╰╮       │││ ╰╯│        ││ │   │         │  │         │   │        ╭╯  │        │   │        │    │        │╰╯ ││ │││       ╭╮ │   │        │││  │          │   │       ╭╮╭╯  │        ╭╮│         ╰╮       │││  │        ││ │  │       ╭
 1.73 ┤  ╰─╯  ╰╯                                                            ╰─╯                     ╰──╯╰╯         ╰─────╯       ╰──────╯         ╰────────╯    ╰────────╯╰─╯    ╰────────╯    ╰────────╯   ╰─────────╯   ╰─────────╯   ╰─────────╯   ╰────────╯   ╰─────────╯   ╰────────╯   ╰────╯╰───╯   ╰─────────╯   ╰────────╯   ╰────────╯   ╰─────────╯   ╰─────────╯    ╰─────────╯╰───────╯ ╰╯      ╰────────╯╰───────╯ ╰─╯    ╰─────────╯╰───────╯ ╰─╯    ╰────────╯    ╰────────╯ ╰╯     ╰───────╯╰╯  ╰────────╯╰─╯    ╰────────╯    ╰────────╯╰─╯     ╰───────╯╰╯   ╰────────╯╰─╯   ╰─────────╯  ╰─────────╯   ╰────────╯   ╰────────╯   ╰────────╯    ╰────────╯   ╰╯ ╰╯╰───────╯╰─╯   ╰────────╯╰╯  ╰──────────╯   ╰───────╯╰╯   ╰────────╯╰╯          ╰───────╯╰╯  ╰────────╯╰─╯  ╰───────╯
                                                                                                                                                                                                                                                                                                                                                                                                  Watts over time

@ArneTR ArneTR merged commit 5f143e3 into main Nov 10, 2023
4 checks passed
@ArneTR ArneTR deleted the hog-api-fix branch November 10, 2023 14:57
ArneTR added a commit that referenced this pull request Nov 21, 2023
* main:
  New depencies for XGboost added
  add workflow to build codespace container
  Bump scipy from 1.11.3 to 1.11.4 (#548)
  Bump psycopg[binary] from 3.1.12 to 3.1.13 (#549)
  Fomantic update to 2.9.3 (#547)
  Allow digits in env var keys (#541)
  Hardware info root mac (#544)
  Trying if ref works
  Bump pydantic from 2.5.0 to 2.5.1 (#539)
  Adds the citation file (#537)
  HOG returned after mutliple loops
  Info button now works for page 2+ task coalitions
  Bump pydantic from 2.4.2 to 2.5.0 (#538)
  TDP typo
  Bump pandas from 2.1.2 to 2.1.3 (#534)
  Makes the root_hardware_info root writable only
  Hog API Fix for broken payload (#532)
  Adding report url instead of just ID (#531)
  Makes error optional except if there is data we need (#530)
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.

1 participant