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

feat: incorporate job queue in job list #571

Merged
37 commits merged into from
Jan 3, 2024
Merged

feat: incorporate job queue in job list #571

37 commits merged into from
Jan 3, 2024

Conversation

ghost
Copy link

@ghost ghost commented Oct 17, 2023

closes #575
closes #576
closes #577
closes #578

https://dhis2.atlassian.net/browse/DHIS2-14749

Todo:

  • Add "new sequence" button
  • Update table headers to match design
  • Add collapsible rows for queues
  • Update job toggle to json patch
  • Finish naming updates from: refactor: improve hooks and naming #560, rename all concepts to new terms, see readme.
  • Update/add tests
  • Update outdated documentation links
  • See if queued job rows should be colored differently, or maybe indented, so they're easy to distinguish
  • Maybe animate showing and hiding of rows
  • Align dropdown icon appearance with other icons
  • Get rid of bottom border on expanded row
  • Replace inline button styles with external css
  • Update job toggle to new endpoint
  • e2e: filter, toggle, actions

Create issues for:

Backend:

  • Deleting a queue does not result in the jobs being available from the scheduler endpoint again, but the names of the jobs are still reserved, so it seems they're still present somehow. (Fixed and available on debug dev)
  • Toggling a queue on or off ejects the first job from the queue (Patch bug, new endpoint available now)

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Oct 17, 2023

🚀 Deployed on https://pr-571--dhis2-scheduler.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify October 17, 2023 14:59 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 19, 2023 13:41 Inactive
@ghost ghost force-pushed the list-view branch from 23dbf05 to 8230ecf Compare October 19, 2023 13:42
@dhis2-bot dhis2-bot temporarily deployed to netlify October 19, 2023 13:44 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 19, 2023 13:48 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 19, 2023 13:56 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 24, 2023 12:20 Inactive
@ghost ghost force-pushed the list-view branch from 8ed97f0 to c98f90c Compare October 24, 2023 12:49
@dhis2-bot dhis2-bot temporarily deployed to netlify October 24, 2023 12:51 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 24, 2023 13:24 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 25, 2023 13:46 Inactive
@ghost ghost force-pushed the list-view branch from 523f88e to 9db9122 Compare October 25, 2023 13:52
@dhis2-bot dhis2-bot temporarily deployed to netlify October 25, 2023 13:54 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 26, 2023 11:29 Inactive
@ghost ghost force-pushed the list-view branch 2 times, most recently from 2bbc56f to 52e964d Compare November 2, 2023 11:34
@dhis2-bot dhis2-bot temporarily deployed to netlify November 2, 2023 11:36 Inactive
@ghost ghost force-pushed the list-view branch from 52e964d to 7a20811 Compare November 2, 2023 13:48
@dhis2-bot dhis2-bot temporarily deployed to netlify November 2, 2023 13:50 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 2, 2023 14:10 Inactive
@ghost ghost force-pushed the list-view branch from db75603 to b03a49f Compare November 2, 2023 16:00
@dhis2-bot dhis2-bot temporarily deployed to netlify November 2, 2023 16:02 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 8, 2023 09:40 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 8, 2023 12:27 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 14, 2023 10:12 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 14, 2023 10:20 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 15, 2023 15:06 Inactive
@ghost ghost force-pushed the list-view branch from 69a675e to 9d4c7da Compare November 15, 2023 15:23
@dhis2-bot dhis2-bot temporarily deployed to netlify November 15, 2023 15:29 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 29, 2023 10:50 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 29, 2023 10:53 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 29, 2023 11:03 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 29, 2023 11:19 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 30, 2023 11:03 Inactive
@tomzemp tomzemp self-requested a review December 5, 2023 13:04
Copy link
Contributor

@Mohammer5 Mohammer5 left a comment

Choose a reason for hiding this comment

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

Works

@dhis2-bot dhis2-bot temporarily deployed to netlify December 6, 2023 14:46 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 6, 2023 14:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 6, 2023 15:19 Inactive
Copy link
Member

@tomzemp tomzemp 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 🙌! (FYI: I've done a QA review, so I haven't looked at the code)

I agree with the points in your notes. Particularly:

  • I find the deletion (/removal of jobs) slightly confusing and how it adds back the jobs without the original scheduling
  • I always got queues created in disabled mode, and that didn't really make sense to me as a user (who hasn't read the documentation for job scheduling 🤡).

One thing I would suggest changing before merging

The language in the cancel editing dialog is a bit confusing:
image
When I first opened the app, my UI language was in French, and the French was (slightly) mistranslated such that it was suggesting that you were deleting the form (I guess the translation memory is picking up a translation from some other app where this would be the correct meaning).

Either way, I think the main dialog might be clearer if it said something like Do you want to discard these changes? (i.e. not discard the form). Also it's a bit confusing to me with the changed-my-mind button for this dialog being labeled Cancel, since you get to the dialog by clicking Cancel (so maybe you would click Cancel again in the dialog, thinking you were confirming your choice). Maybe the Cancel button within the dialog could be Keep editing or something similar?

Other things I noticed (only the first point is related to this PR)

  • I find it slightly confusing that the job type is Queue for queues but the specific type for job (like maybe it should be Job: {{type}}?
  • some of the translations are missing in. the app. The ones I noticed were already missing (job types (from backend) and the cron labels), so I don't think this a new issue, but because of that I didn't review new translation coverage.
  • I noticed the backend wouldn't let me save two jobs of the same type/cron expression even if the details are different (specifically I got this when creating jobs to run different data integrity checks). Not sure if you know if that's a known issue.
  • It seemed that the backend stopped me from saving jobs with very long names (but then just returned generic 500 error). I guess it would be good to figure out if there's a limit and then add a validation on the input?

@dhis2-bot dhis2-bot temporarily deployed to netlify January 2, 2024 14:32 Inactive
@ghost
Copy link
Author

ghost commented Jan 2, 2024

When I first opened the app, my UI language was in French, and the French was (slightly) mistranslated such that it was suggesting that you were deleting the form (I guess the translation memory is picking up a translation from some other app where this would be the correct meaning).

@tomzemp Ah yeah, good point. I've updated the text a little. I'm not too sure about changing the button text as well. I see your point, but I feel that the primary and secondary button color also signal what will happen, as that pattern is quite common (as in, primary color: destructive because it's red, and proceed, secondary color: cancel what the modal is suggesting). Relying on the previous context for their labels gets a little confusing and verbose (I tried out a couple other texts).

Maybe the original text is to blame. Maybe the "Cancel" button in the edit form should be called "Discard changes". That way the modal can stay simple and we won't have a repeated "Cancel" label. What do you think? (https://dhis2.atlassian.net/browse/DHIS2-16413)

I find it slightly confusing that the job type is Queue for queues but the specific type for job (like maybe it should be Job: {{type}}?

Yeah good point as well. I'll create a separate issue for it and take a look at it with Joe. (https://dhis2.atlassian.net/browse/DHIS2-16414)

some of the translations are missing in. the app. The ones I noticed were already missing (job types (from backend) and the cron labels), so I don't think this a new issue, but because of that I didn't review new translation coverage.

Yup, this happens often. Strings from the backend need to be added to the app manually.

I noticed the backend wouldn't let me save two jobs of the same type/cron expression even if the details are different (specifically I got this when creating jobs to run different data integrity checks). Not sure if you know if that's a known issue.

Same type and same cron? Yes I think I've noticed that as well. I'm not sure if it's intentional. I suspect it is, but I'll double check. (https://dhis2.atlassian.net/browse/DHIS2-16415)

It seemed that the backend stopped me from saving jobs with very long names (but then just returned generic 500 error). I guess it would be good to figure out if there's a limit and then add a validation on the input?

Yeah I agree. I'll check and create an issue for it. (https://dhis2.atlassian.net/browse/DHIS2-16416)

@ghost ghost force-pushed the list-view branch from 6dd4fea to bf2a2df Compare January 2, 2024 15:11
@dhis2-bot dhis2-bot temporarily deployed to netlify January 2, 2024 15:19 Inactive
@ghost ghost force-pushed the list-view branch from bf2a2df to 35b74ac Compare January 2, 2024 15:27
@dhis2-bot dhis2-bot temporarily deployed to netlify January 2, 2024 15:28 Inactive
@ghost ghost merged commit 204173e into master Jan 3, 2024
9 checks passed
@ghost ghost deleted the list-view branch January 3, 2024 10:23
dhis2-bot added a commit that referenced this pull request Jan 3, 2024
# [101.3.0](v101.2.8...v101.3.0) (2024-01-03)

### Features

* incorporate job queue in job list ([#571](#571)) ([204173e](204173e))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 101.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants