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

Create Plan Fail #699

Open
bla-ckbox opened this issue Apr 5, 2022 · 2 comments
Open

Create Plan Fail #699

bla-ckbox opened this issue Apr 5, 2022 · 2 comments

Comments

@bla-ckbox
Copy link

I still encounter issues below when testing with the master branch commit 500822a

  • Error: Invalid plan - Priority not found for step 1 when saving plan
  • Error 400 Target type user not found on /v0/targets/user

sync_targets.py seems to be running fine:

2022-04-05 16:12:44,234 INFO root Sending metrics: failed_tasks: 0, ldap_lists_added: 0, ldap_lists_failed_to_add: 0, ldap_lists_found: 0, ldap_lists_removed: 0, ldap_memberships_added: 0, ldap_memberships_failed_to_add: 0, ldap_memberships_found: 0, ldap_memberships_removed: 0, ldap_reconnects: 0, others_purged: 0, sql_errors: 0, teams_added: 0, teams_failed_to_add: 0, teams_found: 0, user_contacts_updated: 0, users_added: 0, users_failed_to_add: 0, users_failed_to_update: 0, users_found: 0, users_purged: 0
2022-04-05 16:12:44,234 INFO root Starting oncall sync...
2022-04-05 16:12:44,441 INFO root Users to insert (0)
2022-04-05 16:12:44,441 INFO root Users to update (5)
2022-04-05 16:12:44,447 INFO root Teams to insert (0)
2022-04-05 16:12:44,450 INFO root Users to mark inactive (0)
2022-04-05 16:12:44,450 INFO root Teams to mark inactive (0)
2022-04-05 16:12:44,451 INFO root oncall sync took 0.22 seconds

target_type, target, and priority are not empty

mysql> select * from target_type;
+----+--------------+
| id | name         |
+----+--------------+
|  3 | mailing-list |
|  2 | team         |
|  1 | user         |
+----+--------------+
3 rows in set (0.00 sec)

mysql> select * from target;
+----+--------------------------------------+---------+--------+
| id | name                                 | type_id | active |
+----+--------------------------------------+---------+--------+
|  1 | demo                                 |       1 |      0 |
|  4 | b291694f-7789-4436-a5d2-ca37f67b3df3 |       2 |      0 |
|  5 | 8558d07b-b5ae-44c3-b3c0-6f4179e79402 |       2 |      0 |
|  6 | abc                                  |       3 |      1 |
|  7 | demo                                 |       3 |      1 |
|  8 | jp******                             |       1 |      1 |
|  9 | bn*****                              |       1 |      1 |
| 10 | bl******                             |       1 |      1 |
| 11 | cb******                             |       1 |      1 |
| 12 | pr*****                              |       1 |      1 |
| 13 | Di******                             |       2 |      1 |
| 14 | On****                               |       2 |      1 |
+----+--------------------------------------+---------+--------+
12 rows in set (0.00 sec)

mysql> select * from priority;
+----+--------+---------+
| id | name   | mode_id |
+----+--------+---------+
|  8 | urgent |      26 |
| 17 | high   |       8 |
| 26 | medium |      35 |
| 35 | low    |      35 |
+----+--------+---------+
4 rows in set (0.00 sec)

The problem also appears with the default dataset.

Originally posted by @bla-ckbox in #644 (comment)

@roock
Copy link
Contributor

roock commented Apr 7, 2022

Probably a duplicate of #686

bilbof added a commit to bilbof/iris that referenced this issue Apr 11, 2022
The api makes use of [gevent], a coroutine based networking
library which relies heavily on monkey patching the stdlib.

From the [gevent.monkey] docs:
> Warning Patching too late can lead to unreliable behaviour
> (for example, some modules may still use blocking sockets) or even errors.

This appears to have happened here. Thanks to @allwyn-pradip for
pointing me at the right file in PR
linkedin#690.

Resolves linkedin#686, linkedin#699, linkedin#644.

Blog on gevent: https://eng.lyft.com/what-the-heck-is-gevent-4e87db98a8
> In the case of gevent — monkey patching has to be the absolute first thing a process does

[gevent]: https://www.gevent.org/index.html
[gevent.monkey]: https://www.gevent.org/api/gevent.monkey.html
diegocepedaw pushed a commit that referenced this issue Apr 11, 2022
The api makes use of [gevent], a coroutine based networking
library which relies heavily on monkey patching the stdlib.

From the [gevent.monkey] docs:
> Warning Patching too late can lead to unreliable behaviour
> (for example, some modules may still use blocking sockets) or even errors.

This appears to have happened here. Thanks to @allwyn-pradip for
pointing me at the right file in PR
#690.

Resolves #686, #699, #644.

Blog on gevent: https://eng.lyft.com/what-the-heck-is-gevent-4e87db98a8
> In the case of gevent — monkey patching has to be the absolute first thing a process does

[gevent]: https://www.gevent.org/index.html
[gevent.monkey]: https://www.gevent.org/api/gevent.monkey.html
@bilbof
Copy link
Contributor

bilbof commented Apr 11, 2022

@bla-ckbox This should be fixed now

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

No branches or pull requests

3 participants