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

[conflict_resolver] api + dataframework (version 3) #7558

Merged
merged 4 commits into from
Sep 24, 2021

Conversation

xlecours
Copy link
Contributor

Brief summary of changes

  • implements the auto-saving of conflict resolution
  • add 2 endpoints (/conflict_resolver/unresolved and /conflict_resolver/resolved)
  • Adds a schema.yml file

Previous versions:
#6862
#5140

This will conflict with #7535

@kongtiaowang kongtiaowang reopened this Sep 2, 2021
@maltheism maltheism self-assigned this Sep 7, 2021
@maltheism
Copy link
Member

maltheism commented Sep 7, 2021

Hi @xlecours when I visit the conflict_resolver module while on the unresolved pane and try to set the correct answer. I'm having an error caused by $this->table being null for the following code:

$db->update(
   $this->table,
   $values,
   ['CommentID' => $this->getCommentID()]
);

located at Loris/php/libraries/NDB_BBVL_Instrument.class.inc at line # 829

PHP Fatal error:  Uncaught TypeError: Database::update(): Argument #1 ($table) must be of type string, null given, called in Loris/php/libraries/NDB_BVL_Instrument.class.inc on line 832 and defined in Loris/php/libraries/Database.class.inc:510
Stack trace 
0 Loris/php/libraries/NDB_BVL_Instrument.class.inc(832): Database->update(NULL, Array, Array
1 Loris/php/libraries/NDB_BVL_Instrument.class.inc(802): NDB_BVL_Instrument->_save(Array
2 Loris/modules/conflict_resolver/php/endpoints/unresolved.class.inc(256): NDB_BVL_Instrument->_saveValues(Array
3 Loris/modules/conflict_resolver/php/endpoints/unresolved.class.inc(121): LORIS\\conflict_resolver\\Endpoints\\Unresolved->_handlePOST(Object(Laminas\\Diactoros\\ServerRequest
4 Loris/src/Middleware/ETag.php(78): LORIS\\conflict_resolver\\Endpoints\\Unresolved->handle(Object(Laminas\\Diactoros\\ServerRequest
5 Loris/src/Http/Endpoint.php(46): LORIS\\Middleware\\ETag->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\conflict_resolver\\Endpoints\\Unresolved
6 Loris/modules/conflict_resolver/php/module.class.inc(72): LORIS\\Http\\Endpoint->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\conflict_resolver\\Endpoints\\Unresolved
7 Loris/src/Middleware/ResponseGenerator.php(50): LORIS\\conflict_resolver\\Module->handle(Object(Laminas\\Diactoros\\ServerRequest
8 Loris/src/Middleware/AuthMiddleware.php(63): LORIS\\Middleware\\ResponseGenerator->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\conflict_resolver\\Module
9 Loris/src/Router/ModuleRouter.php(74): LORIS\\Middleware\\AuthMiddleware->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\conflict_resolver\\Module
10 Loris/src/Middleware/ExceptionHandlingMiddleware.php(39): LORIS\\Router\\ModuleRouter->handle(Object(Laminas\\Diactoros\\ServerRequest
11 Loris/src/Router/BaseRouter.php(126): LORIS\\Middleware\\ExceptionHandlingMiddleware->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\Router\\ModuleRouter
12 Loris/src/Middleware/ResponseGenerator.php(50): LORIS\\Router\\BaseRouter->handle(Object(Laminas\\Diactoros\\ServerRequest
13 Loris/src/Middleware/ContentLength.php(52): LORIS\\Middleware\\ResponseGenerator->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\Router\\BaseRouter
14 Loris/htdocs/index.php(48): LORIS\\Middleware\\ContentLength->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\Router\\BaseRouter
15 {main thrown in Loris/php/libraries/Database.class.inc on line 510, referer: http://localhost/conflict_resolver/

Copy link
Member

@maltheism maltheism left a comment

Choose a reason for hiding this comment

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

Hi @xlecours, please see my comment. I did make clean && make dev on your branch with tools/raisinbread_refresh.php and I did check to see that your mysql patch was applied.

@driusan
Copy link
Collaborator

driusan commented Sep 8, 2021

what is the instrument that you're using to try and resolve a conflict on?

@maltheism
Copy link
Member

thanks @driusan that's probably my issue.

@xlecours
Copy link
Contributor Author

@maltheism Did you had the chance to review this with another instrument?

Copy link
Member

@maltheism maltheism left a comment

Choose a reason for hiding this comment

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

Everything looks great!

@maltheism maltheism added the Passed manual tests PR has been successfully tested by at least one peer label Sep 13, 2021
@driusan driusan added the Critical to release PR or issue is key for the release to which it has been assigned label Sep 14, 2021
@driusan
Copy link
Collaborator

driusan commented Sep 24, 2021

I tried to merge this but there's a conflict with webpack.config.js

@driusan driusan merged commit 3d15403 into aces:main Sep 24, 2021
@xlecours xlecours deleted the conflict_resolver_onChange_save branch September 24, 2021 20:11
@ridz1208 ridz1208 added this to the 24.0.0 milestone Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical to release PR or issue is key for the release to which it has been assigned Passed manual tests PR has been successfully tested by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants