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

Use warn log level instead of debug for unread comments migration #588

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

Splines
Copy link
Member

@Splines Splines commented Jan 17, 2024

After merging #587, I found we don't see the "Fixed ..." lines in the log. That's because config/environments/production.rb sets the log level to warn which is above debug (and also above info). That's why I now use warn for the migration. Happy to hear if there are better solutions than this, but this should work ;)

@Splines Splines self-assigned this Jan 17, 2024
@Splines Splines marked this pull request as ready for review January 17, 2024 23:38
@Splines Splines changed the title Use warn log level instead of info for unread comments migration Use warn log level instead of debug for unread comments migration Jan 18, 2024
@Splines Splines merged commit 92d48d4 into dev Jan 19, 2024
5 checks passed
@Splines Splines deleted the fix/unread-comments-warn branch January 19, 2024 15:06
Splines added a commit that referenced this pull request Feb 14, 2024
fosterfarrell9 added a commit that referenced this pull request Feb 16, 2024
* Warn about too long GitHub commit messages (#586)

* Fix comment status (#585)

* Reapply first fix for Reader/Media

See discussion on #574 for further details.
Previous PR for this was #576, closed in favor of this one
as this directly branches off the new "dev" branch.

* Correctly show latest post (might be current_user's comment)

* Fix update of unread comments logic in comments controller

* Fix update icon logic and latest post comment

* Simplify latest comment logic

* Improve code comments

* Further improve comments

* Fix wording in comment

* Fix construction of media array & use `.blank?` instead of `.empty?`

* Migrate `unread_comments` flag (fix inconsistencies) (#587)

* Add dummy migration

* Implement migration for unread comment flag

* Remove unnecessary comment

* Declare migration as not idempotent

* Use array.length instead of counting

* Throw error to prevent revert of migration

* Fix severe flaws in unread comments migration

* Simplify Reader retrieval

* Use the more explicit `.nil?` method

* Update migration date

* Fix annoying bug: don't use `.select!` but `.select`

* Polish migration

e.g. update comment, more suitable name for the method etc.

* Rename method according to #585

* Use `warn` log level for migration (#588)

* Rename get_statistics.coffee file to statistics.coffee (#591)

This is to reflect the corresponding renaming of the route
due to rubocop.

* fix behaviour of media search

* Disable OR/AND buttons if "all" tags is enabled

(inside the media search, right now only frontend change)

* Use ids autogenerated by Rails

This is such that we can still click on the label to select
the respective radio button, instead of only being able
to click on the radio button itself.

* Disable AND/OR initially (until user deselects "all tags")

* Don't restrict media search if "all" tags is enabled.

If the "all tags" option is enabled in the search, we should allow the
results to include *any* tag. This is automatically the case if we just
don't add any restriction regarding the tag ids in the SOLR search.

This change accompanies the frontend change to disable the AND/OR
buttons if the "all" button is selected meaning the user wants to search
for all tags. See #593 for more details.

---------

Co-authored-by: Splines <[email protected]>
Co-authored-by: Splines <[email protected]>
Splines added a commit that referenced this pull request Mar 20, 2024
Due to a forced push of the dev branch, the following list might
unfortunately include items from other branches as well.

* Init Feedback model

* Add Feedback modal view and corresponding controller

First working version, of course still a lot to improve from here.

* Migrate feedback form to Bootstrap v5

* Add basic styling to Feedback form

* Add "allow contact via mail" checkbox

A new column was added to the Feedbacks schema.
Note that we did not create a new migration as this is a PR which should
only contain one migration, namely the one for the creation of the whol
Feedback table.

* Toggle "allow email contact" by default

* Improve submit button handler (outsource to function)

* Init feedback mailer

Right now just for ourselves, so that we get a plaintext mail with
the feedback of a user.

Env variables were adjusted accordingly, but need to be set manually
in the production environment!

* Adjust feedback mail in views

* Implement success/error flow with toast messages

* Add missing database field "can_contact"

* Add internationalization to feedback error/success

* Lint some files

* Set feedback text field as required with min 10 chars

* Add "optional" to title in email

* Adjust spacing around feedback button

* Internationalize tooltip

* Delete console log

* Add comment describing hidden submit button handler

* Delete default test specs

* Add proper validation for Feedback body

Alongside this, also made sure that we use a custom client-side
validation message when input is too short (under 10 chars long).
This allows us to use the language the user has selected in MaMpf
instead of the browser language.

* Default `can_contact` to false in backend

* Update bootstrap to v5.3.1

command used: bundle update bootstrap
bundle update bootstrap --conservative did not work, as docker
containers did not start again due to dependency errors

* Revert "Update bootstrap to v5.3.1" in favor of PR #537

This reverts commit 5cd1af2.

* Submit form via Ctrl + Enter when modal is opened

* Remove default nil value from ENV.fetch()

* Revert "Remove default nil value from ENV.fetch()"

This reverts commit 696a395.

* Rename button to 'Send' (not 'Save')

* Check if should register feedback event handlers

* Make feedback button ID more specific

* Fix line wrapping (code style)

* Use delete on cascade to be able to delete a user

even if he/she has sent some feedback

* Move Send button before Cancel button

* Replace "on delete cascade" with "dependent destroy"

* Add cypress rules to ESLint & ignore some patterns

* Allow usage of tempusDominus global variable

* Ignore JS files with Sprocket syntax

* Further improve rules, e.g. allow common globals

* Ignore sprocket syntax in cable.js

* Autofix all `.js` and `.js.erb` files

Command used:
`yarn run eslint --fix .`

Still 47 problems (27 errors, 20 warnings) after this.

* Fix variables in turbolink fix

* Prepend unused variables with "_"

* Get rid of unused widget variable

* Fix specs comment tab alignment

* Warn about too long GitHub commit messages (#586)

* Fix comment status (#585)

* Reapply first fix for Reader/Media

See discussion on #574 for further details.
Previous PR for this was #576, closed in favor of this one
as this directly branches off the new "dev" branch.

* Correctly show latest post (might be current_user's comment)

* Fix update of unread comments logic in comments controller

* Fix update icon logic and latest post comment

* Simplify latest comment logic

* Improve code comments

* Further improve comments

* Fix wording in comment

* Fix construction of media array & use `.blank?` instead of `.empty?`

* Migrate `unread_comments` flag (fix inconsistencies) (#587)

* Add dummy migration

* Implement migration for unread comment flag

* Remove unnecessary comment

* Declare migration as not idempotent

* Use array.length instead of counting

* Throw error to prevent revert of migration

* Fix severe flaws in unread comments migration

* Simplify Reader retrieval

* Use the more explicit `.nil?` method

* Update migration date

* Fix annoying bug: don't use `.select!` but `.select`

* Polish migration

e.g. update comment, more suitable name for the method etc.

* Rename method according to #585

* Use `warn` log level for migration (#588)

* Fix linting in feedback.js

* Fix RuboCop errors

* Fix remaining ESLint errors

* Update timestamp of feedback migration

* Add missing Feedback email to prod docker.env

* Remove unnecessary Feedback env variables

* Add validation message for empty body

* Change `const` to `var` to avoid "redefined" errors

* Update timestamp of feedback migration (again)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants