Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
beat.web
beat.web
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • beat
  • beat.webbeat.web
  • Issues
  • #118

Closed
Open
Opened Apr 30, 2015 by André Anjos@andre.anjos💬
  • Report abuse
  • New issue
Report abuse New issue

beat.web.algorithms.Algorithm & related code cannot handle Libraries on save()

As it is currently implemented, the Algorithm class on beat.web cannot handle an existing JSON (for example through an upload via the command-line), which references libraries. Its save() method will not updated the library relationship as it should.

The JSON of an algorithm (or library for that matter), already contains a mapping description, which defines which libraries it uses. Upon save(), the field referenced_libraries should be updated.

I think the issue comes from the fact you can add a library w/o going through the save(), whereas I think the system was designed in such a way you must always go through the save().

This means that any modification operation should:

  1. Load the old JSON
  2. Allow the user to modify it
  3. Overwrite the old JSON on the object with the new one (at the file field)
  4. Call the object's save() method

This strategy should automatically update the referenced_libraries field. This strategy also assures that we have a consistent representation of the object w.r.t. beat.web and beat.core.

We allow for no other way to modify this object.

Assignee
Assign to
Tutorial for the FG2015 Conference
Milestone
Tutorial for the FG2015 Conference
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: beat/beat.web#118