Create Plan Fail
- Dominant language
- Python
- Stars
- 845
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
I still encounter issues below when testing with the **master** branch commit https://github.com/linkedin/iris/commit/500822ac5d757884246c95145d6a89531c503f81
- `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 https://github.com/linkedin/iris/issues/644#issuecomment-1088978533_
Contributor guide
Research direction
Reproduce the save-plan failure and the /v0/targets/user 400 response with the default dataset, then inspect _sync_targets.py alongside the target_type, target, and priority records shown in the report. Done means plans can be saved and the user target endpoint resolves successfully with the default data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, python
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100