| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #1165 +/- ##
==========================================
+ Coverage 63.68% 63.82% +0.13%
==========================================
Files 233 233
Lines 17113 17131 +18
==========================================
+ Hits 10899 10934 +35
+ Misses 6214 6197 -17
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
Thanks. Observe that this feature is conceptually very similar to a contest loader: there is some task data and one wants to import it. Just for clarification, do you use it for a similar purpose, e.g., prepare a contest on a staging server and import it on a testing/production server? |
Sorry, something went wrong.
|
Yes, this is for the purpose you mentioned. The 'staging' server as well as the testing/production server are both CMS. At the moment, this is done by exporting the contest (using cmsDumpExporter) from the staging CMS instance and then re-importing them into the production instance using cmsDumpImporter. Would you recommend looking into implementing a ContestLoader that reads from a cms dump exporter format? |
Sorry, something went wrong.
|
Thanks for the explanation. I think the "recommended" and more robust solution would be to prepare the contest using one of the loader formats in the first place, and import it both on the staging and production servers. But I suppose a complementary solution like this one can be added as well, if it is useful. In this case, you should also add the same option to DumpImporter.py to keep it synchronized with DumpExporter.py. |
Sorry, something went wrong.
|
@andreyv Requested changes have been made, do review when you have the time. Thanks once again :) |
Sorry, something went wrong.
|
Thanks, it looks good now. I see that you added tests and also fixed a bug that could cause DumpImporter to import everything instead of skipping items as requested — nice! I added some minor changes in f41a5d8:
I'll merge this MR in a few days if you have no further comments. |
Sorry, something went wrong.
|
Merged! |
Sorry, something went wrong.
* feat: Allow DumpExporter to only export tasks * fix: Dump exporter tests * fix: Add DumpExporterTest for skip_users, fix bug * feat: Add no-users option to DumpImporter * fixup Co-authored-by: Andrey Vihrov <andrey.vihrov@gmail.com>
* feat: Allow DumpExporter to only export tasks * fix: Dump exporter tests * fix: Add DumpExporterTest for skip_users, fix bug * feat: Add no-users option to DumpImporter * fixup Co-authored-by: Andrey Vihrov <andrey.vihrov@gmail.com>
* feat: Allow DumpExporter to only export tasks * fix: Dump exporter tests * fix: Add DumpExporterTest for skip_users, fix bug * feat: Add no-users option to DumpImporter * fixup Co-authored-by: Andrey Vihrov <andrey.vihrov@gmail.com>
| Back | FazBrowse Home | New Git URL |
At the moment, when exporting a contest using cmsDumpExporter, there is no option to omit information related to users during the export.
Thus, any user which is related to the contest (participants, admin, etc..) will also be included in the dump file. When importing this dump file into another CMS instance, cmsDumpImporter will attempt to create these users. If existing users with the same username exists, this will result in database IntegrityError, causing the import to fail.
This PR introduces the option to export a contest without any user information via cmsDumpExporter. (i.e. Just the tasks itself).
This change is