Skip to content

Remove TODOs from codebase#2295

Merged
monfresh merged 1 commit intomasterfrom
mb-remove-todo
Jul 5, 2018
Merged

Remove TODOs from codebase#2295
monfresh merged 1 commit intomasterfrom
mb-remove-todo

Conversation

@monfresh
Copy link
Contributor

@monfresh monfresh commented Jul 4, 2018

Why: They don't belong in the code. History has shown that once they
are added, they are rarely removed or acted upon. If something is
important enough, an issue should be opened so it can be tracked.

Hi! Before submitting your PR for review, and/or before merging it, please
go through the following checklist:

  • For DB changes, check for missing indexes, check to see if the changes
    affect other apps (such as the dashboard), make sure the DB columns in the
    various environments are properly populated, coordinate with devops, plan
    migrations in separate steps.

  • For route changes, make sure GET requests don't change state or result in
    destructive behavior. GET requests should only result in information being
    read, not written.

  • For encryption changes, make sure it is compatible with data that was
    encrypted with the old code.

  • For secrets changes, make sure to update the S3 secrets bucket with the
    new configs in all environments.

  • Do not disable Rubocop or Reek offenses unless you are absolutely sure
    they are false positives. If you're not sure how to fix the offense, please
    ask a teammate.

  • When reading data, write tests for nil values, empty strings,
    and invalid formats.

  • When calling redirect_to in a controller, use _url, not _path.

  • When adding user data to the session, use the user_session helper
    instead of the session helper so the data does not persist beyond the user's
    session.

  • When adding a new controller that requires the user to be fully
    authenticated, make sure to add before_action :confirm_two_factor_authenticated.

**Why**: They don't belong in the code. History has shown that once they
are added, they are rarely removed or acted upon. If something is
important enough, an issue should be opened so it can be tracked.
sub: client_id, verify_sub: true)
validate_aud_claim(payload)
rescue JWT::DecodeError => err
# TODO: i18n these JWT gem error messages
Copy link
Contributor Author

@monfresh monfresh Jul 4, 2018

Choose a reason for hiding this comment

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

These are not user facing, where user = site visitor. I'm not sure it's worth localizing them. We don't localize other IdP-to-SP API error messages.

end

def authenticate(token)
# TODO: make this secret required once we have everything deployed and configured
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See issue LG-441

# TODO: remove empty/fake values from this block, which create the misleading
# impression that these values aren't used. In fact they will be used unless
# they are overriden by keys with the same name in the application.yml in the
# app secrets bucket.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See issue LG-440


# context 'when choosing to sign in' do
# TODO: duplicate scenarios from Create Account here
# end
Copy link
Contributor Author

@monfresh monfresh Jul 4, 2018

Choose a reason for hiding this comment

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

We already have a scenario for signing in at the bottom of this file. Furthermore, it doesn't look like anyone is using this feature anymore because it hasn't been updated in a while and no one has complained about it being broken.

Copy link
Contributor

@jgsmith-usds jgsmith-usds left a comment

Choose a reason for hiding this comment

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

TODOs that aren't done in the PR in which they are introduced should be made into Jira tickets, so this looks good to me.

@monfresh monfresh merged commit 4820668 into master Jul 5, 2018
@amathews-fs amathews-fs deleted the mb-remove-todo branch January 7, 2021 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants