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

Fix custom PostgreSQL domains not being used in table definitions #1073

Merged
merged 3 commits into from
Dec 7, 2018

Conversation

lw
Copy link
Member

@lw lw commented Nov 11, 2018

Spotted thanks to #1071.

Needs to be backported to v1.4.


This change is Reviewable

@codecov
Copy link

codecov bot commented Nov 11, 2018

Codecov Report

Merging #1073 into master will increase coverage by 0.05%.
The diff coverage is 77.92%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1073      +/-   ##
=========================================
+ Coverage   62.05%   62.1%   +0.05%     
=========================================
  Files         228     229       +1     
  Lines       16457   16521      +64     
=========================================
+ Hits        10212   10260      +48     
- Misses       6245    6261      +16
Flag Coverage Δ
#functionaltests 45.8% <9.09%> (-0.25%) ⬇️
#unittests 43.27% <77.92%> (+0.13%) ⬆️
Impacted Files Coverage Δ
cms/db/__init__.py 96.42% <100%> (ø) ⬆️
cms/db/types.py 100% <100%> (+7.04%) ⬆️
cmscontrib/updaters/update_41.py 73.84% <73.84%> (ø)
cms/server/contest/handlers/taskusertest.py 41.21% <0%> (-1.82%) ⬇️
cms/service/ScoringService.py 66.15% <0%> (-1.54%) ⬇️
cms/service/esoperations.py 78.01% <0%> (-1.42%) ⬇️
cms/server/admin/handlers/dataset.py 24.76% <0%> (-0.93%) ⬇️
cms/db/filecacher.py 77.7% <0%> (-0.66%) ⬇️
cms/grading/Job.py 88.62% <0%> (-0.48%) ⬇️
cms/db/util.py 51.85% <0%> (-0.43%) ⬇️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e0910b...89d0166. Read the comment docs.

Copy link
Member

@stefano-maggiolo stefano-maggiolo left a comment

Choose a reason for hiding this comment

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

Do we really need to backport?

Also, shouldn't we bump db version and copy the updater?

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@lw
Copy link
Member Author

lw commented Nov 11, 2018

The reason for backporting is that we just got a bug report due to this.

I added a no-op updater that just prints a message and fails if any data is invalid. Is this what you had in mind?

Copy link
Member

@stefano-maggiolo stefano-maggiolo left a comment

Choose a reason for hiding this comment

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

Uhm, I was thinking at copying update_26.py, but a failure is fine too.

I'm not too keen in backporting something that requires a db update when it's not fixing a too important bug, and that bug had been present for a long time. Opinions?

Reviewed 3 of 3 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @codacy-bot and @lerks)


isolate, line 1 at r2 (raw file):

Subproject commit 5d6beb258e995cf4b0c982ff98cbbc0e9e127853

Intended?


cmscontrib/updaters/update_41.py, line 24 at r2 (raw file):

This updater makes sure filenames contain no percent sign, except in a
trailing ".%l", if any.

Wrong comment? Possibly mention that this is a duplicare and the reason.

Copy link
Member

@stefano-maggiolo stefano-maggiolo left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @codacy-bot and @lerks)


cmscontrib/updaters/update_41.py, line 20 at r2 (raw file):

"""A class to update a dump created by CMS.

Would be nice to print what is wrong - the idea is that people might have created bad names between db 26 and now, and so they might legitimately have bad names not for their fault.

Copy link
Member Author

@lw lw left a comment

Choose a reason for hiding this comment

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

We can avoid backporting now, and do it if this bug starts biting too many people.

Dismissed @codacy-bot from a discussion.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @stefano-maggiolo)


cmscontrib/updaters/update_41.py, line 20 at r2 (raw file):

Previously, stefano-maggiolo (Stefano Maggiolo) wrote…

Would be nice to print what is wrong - the idea is that people might have created bad names between db 26 and now, and so they might legitimately have bad names not for their fault.

Done.


cmscontrib/updaters/update_41.py, line 24 at r2 (raw file):

Previously, stefano-maggiolo (Stefano Maggiolo) wrote…

Wrong comment? Possibly mention that this is a duplicare and the reason.

Done.


isolate, line 1 at r2 (raw file):

Previously, stefano-maggiolo (Stefano Maggiolo) wrote…

Intended?

No, dunno how that happened, reverted

@cms-dev cms-dev deleted a comment Nov 27, 2018
Copy link
Member

@stefano-maggiolo stefano-maggiolo left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r3.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @stefano-maggiolo and @codacy-bot)

Copy link
Member

@stefano-maggiolo stefano-maggiolo left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @codacy-bot)

Copy link
Member Author

@lw lw left a comment

Choose a reason for hiding this comment

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

Dismissed @codacy-bot from a discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@lw lw merged commit 9da2d14 into cms-dev:master Dec 7, 2018
@lw lw deleted the fix_domains branch December 7, 2018 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants