Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 161
    • Issues 161
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Merge Requests
  • !144

Merged
Opened Apr 13, 2023 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
Report abuse

Reverse order of logs in jobLog (fixes #192)

This merge request fixes the problem @anoe and @cgenie were having with the progress API:

jobs_progress

The problem was triggered by the changes I have introduced as part of !137 (merged), where I have changed the data structure to hold the logs from a simple list to a Seq. In particular, the previous implementation used the Dual monoid in the API-facing code to append logs in a reverse order (i.e. newest first) while the internal implementation was storing them oldest to newest. as a result of this ordering change, when we were calling pollJob with a limit=1 parameter, we were effectively always asking for the first and therefore oldest log, and this explains why we wouldn't see any changes.

This merge request fixes that by changing the order in which logs are stored inside the internal job queue data structure; while I agree that appending logs rather than cons-ing them fits more naturally with the intuition of a Haskell writer, I think that for the logs this shouldn't matter too much, and it might also be more efficient, and we could always go back to having Dual (Seq event) if we discover this is going to be problematic down the line.

As I was at it, I have also changed ever so slightly the progress reporting in addToCorpusWithQuery to be more streamlined.

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b adinapoli/investigate-issue-192 origin/adinapoli/investigate-issue-192

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/dev
git merge --no-ff adinapoli/investigate-issue-192

Step 4. Push the result of the merge to GitLab

git push origin dev

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 1
  • Commits 1
  • Pipelines 1
  • Changes 4
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext!144

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.