Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • beat.web beat.web
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • beatbeat
  • beat.webbeat.web
  • Issues
  • #118
Closed
Open
Issue created Apr 30, 2015 by André Anjos@andre.anjos💬Owner

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
Time tracking