-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
removed Configuration class #6682
removed Configuration class #6682
Conversation
eba0847
to
69df17f
Compare
Thanks for extracting this update from #6671. I asked some questions and you answered:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6682 +/- ##
==========================================
- Coverage 63.38% 63.37% -0.01%
==========================================
Files 162 162
Lines 13176 13170 -6
Branches 1819 1819
==========================================
- Hits 8351 8347 -4
+ Misses 4534 4532 -2
Partials 291 291
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to ask a question after understanding the above comments.
Is it correct to encrypt the "options" field because you would like to delete the Configuration class?
From my point of view, if there are two fields, "encrypted_options" and "options", it would be natural for the "options" field to be unencrypted. Therefore, I think it is better to keep Configuration class...
there is only |
Thanks for your explanation. I misunderstood. The "options" field has been already removed. As a personal view, I think it's a bit of an overkill to remove the class used in past migration files. Instead of deleting the Configuration class, I think it would be better to indicate that it is deprecated. Do anyone have opinions? |
@guidopetri @eradman could you please review it as well? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to me
69df17f
to
0902cc9
Compare
0902cc9
to
7cebdef
Compare
Looks to be failing some of the CI tests now:
@AndrewChubatiuk Are you ok to fix those so we can merge this? 😄 |
c191be0
to
aca0e2f
Compare
@justinclift Done |
@AndrewChubatiuk Thanks. Weirdly enough, there still seem to be things failing. 😦 Are you ok to investigate? |
I'm running the failed tests again, just in case it was some kind of temporary infrastructure weirdness. Pretty sure that's not the case though, but re-running the tests again to double check isn't going to hurt. 😄 |
The re-tests also failed in the same spot. Oh well. 😉 |
a995733
to
9a248a5
Compare
@justinclift sorry, there was a typo, ti should be fixed now |
package.json
Outdated
@@ -34,7 +34,7 @@ | |||
"url": "git+https://github.com/getredash/redash.git" | |||
}, | |||
"engines": { | |||
"node": ">14.16.0 <17.0.0", | |||
"node": ">14.16.0 <19.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this. Is this change needed in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, it was needed only for a local purposes, I have nodejs 18 on my system, reverted this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justinclift it's now green
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for keeping an eye on it, I'll merge it now. 😄
9a248a5
to
ed2075a
Compare
ed2075a
to
7aaac7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Carrying over @eradman's approval of this PR. 😄
I think this is wrong, at least if your database is at or before the By changing sa.Column("options", ConfigurationContainer.as_mutable(Configuration)), into sa.Column(
"options",
ConfigurationContainer.as_mutable(
EncryptedConfiguration(
sa.Text, settings.DATASOURCE_SECRET_KEY, FernetEngine
)
),
), you are asking the alembic database migration to treat the existing column conn.execute(
notification_destinations.update()
.where(notification_destinations.c.id == dest.id)
.values(encrypted_options=dest.options)
) it starts decrypting the plain strings and leads to a very confusing error traceback:
This error has led me on a merry chase, in a very deep 🐰 🕳️ If someone is on the same boat as me, do NOT try to "fix" it by adding the encoding, otherwise you'll see
I print out the "value" and realize it's trying to decrypt plain strings token = '{"addresses": "[email protected]"}' # value from the "options" column of the notification_destinations table
base64.urlsafe_b64decode(token) this directly causes I ended up reverting this PR in my implementation of redash and everything is ok so far. |
This reverts commit 97db492. Based on information in getredash#6954 (comment)
Co-authored-by: Andrew Chubatiuk <[email protected]>
What type of PR is this?
removed not used Configuration class
Description
removed Configuration class, which was used for unencrypted options, which were already removed
How is this tested?