-
Notifications
You must be signed in to change notification settings - Fork 41
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
Double compose delivery task #963
Double compose delivery task #963
Conversation
* Moved custom deliveries to separate file naively and import naively Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved patrol Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved custom-compose Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added clean and delivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added delivery, renamed to SimpleDelivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean task added Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved delivery-custom tests, added return type for forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Configurable supported tasks and name remapping Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Changed directory to types, since it doesn't just handle descriptions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix test imports Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using temporary task definition Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactoring new rename changes Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean up Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Removed problematic and unsused component and test Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Updating pnpm version in github workflow Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Reverting update to pnpm version Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix build now that we use key value strings for labels Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactored last parts of hard coding categories and rendering forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactor callback names and error handling for misconfigs Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Display error as well Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fixed more checks and failures Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Split configuration and definition, only handle configurations in resource manager level Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Not using object as a type Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Address feedback Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Render using validTasks instead Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Use useMemo Signed-off-by: Aaron Chong <aaronchongth@gmail.com> --------- Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should put a freeze on any new features until after the grand migration, if this is for prod, please re-target to deploy/hammer-humble
.
if len(cancellation_lots) != 0: | ||
# Populate them in the correct form | ||
go_to_one_of_the_places_activity = { | ||
"category": "go_to_place", | ||
"description": { | ||
"one_of": [{"waypoint": name} for name in cancellation_lots], | ||
"constraints": [ | ||
{"category": "prefer_same_map", "description": ""} | ||
], | ||
}, | ||
} | ||
delivery_dropoff_activity = { | ||
"category": "perform_action", | ||
"description": { | ||
"unix_millis_action_duration_estimate": 60000, | ||
"category": "delivery_dropoff", | ||
"description": {}, | ||
}, | ||
} | ||
on_cancel_dropoff = { | ||
"category": "sequence", | ||
"description": [ | ||
go_to_one_of_the_places_activity, | ||
delivery_dropoff_activity, | ||
], | ||
} | ||
request.request.description["phases"][i]["on_cancel"] = [ | ||
on_cancel_dropoff | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are very specific behaviors that shouldn't be in the server, they should be filled by the client instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a workaround for now, this will prevent any need for database migrations for scheduled tasks when emergency lots are added or removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will ideally need a parameter from traffic-editor
or site-editor
to tag a waypoint as an emergency lot, which can be parsed from the building map server topic. Added as a enhancement to our internal board
edit: there is already a big FIXME on this now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's ok since this is going to deploy/hammer-humble
but just fyi this will be removed in main
.
packages/react-components/lib/tasks/types/delivery-custom.spec.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/lib/tasks/types/delivery-custom.spec.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/lib/tasks/types/delivery-custom.spec.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Hammer/demo tasks (#925) * Moved custom deliveries to separate file naively and import naively Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved patrol Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved custom-compose Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added clean and delivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added delivery, renamed to SimpleDelivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean task added Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved delivery-custom tests, added return type for forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Configurable supported tasks and name remapping Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Changed directory to types, since it doesn't just handle descriptions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix test imports Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using temporary task definition Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactoring new rename changes Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean up Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Removed problematic and unsused component and test Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Updating pnpm version in github workflow Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Reverting update to pnpm version Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix build now that we use key value strings for labels Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactored last parts of hard coding categories and rendering forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactor callback names and error handling for misconfigs Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Display error as well Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fixed more checks and failures Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Split configuration and definition, only handle configurations in resource manager level Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Not using object as a type Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Address feedback Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Render using validTasks instead Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Use useMemo Signed-off-by: Aaron Chong <aaronchongth@gmail.com> --------- Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * First iteration of double compose delivery task Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint and fix dispatck task insert emergency lots workaround Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix favorite task confirmation text field, add more tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Revert addition of double compose delivery to resource manager Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Small UI tweaks to form field widths Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix tests, grid containers for warn time Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Address feedback Signed-off-by: Aaron Chong <aaronchongth@gmail.com> --------- Signed-off-by: Aaron Chong <aaronchongth@gmail.com> (cherry picked from commit 3649b5e) Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Hammer/demo tasks (#925) * Moved custom deliveries to separate file naively and import naively Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved patrol Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved custom-compose Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added clean and delivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added delivery, renamed to SimpleDelivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean task added Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved delivery-custom tests, added return type for forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Configurable supported tasks and name remapping Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Changed directory to types, since it doesn't just handle descriptions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix test imports Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using temporary task definition Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactoring new rename changes Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean up Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Removed problematic and unsused component and test Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Updating pnpm version in github workflow Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Reverting update to pnpm version Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix build now that we use key value strings for labels Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactored last parts of hard coding categories and rendering forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactor callback names and error handling for misconfigs Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Display error as well Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fixed more checks and failures Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Split configuration and definition, only handle configurations in resource manager level Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Not using object as a type Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Address feedback Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Render using validTasks instead Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Use useMemo Signed-off-by: Aaron Chong <aaronchongth@gmail.com> --------- Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * First iteration of double compose delivery task Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint and fix dispatck task insert emergency lots workaround Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix favorite task confirmation text field, add more tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Revert addition of double compose delivery to resource manager Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Small UI tweaks to form field widths Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix tests, grid containers for warn time Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Address feedback Signed-off-by: Aaron Chong <aaronchongth@gmail.com> --------- Signed-off-by: Aaron Chong <aaronchongth@gmail.com> (cherry picked from commit 3649b5e) Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
What's new
double-compose-delivery
task, which just doubles the phases ofdelivery_pickup
Self-checks