Skip to content
Snippets Groups Projects

Update Epics API for Grape 1.7 compatibility

Merged Vasilii Iakliushin requested to merge 395809_update_epics_api_for_grape_update into master
All threads resolved!

What does this MR do and why?

Contributes to #395809 (closed)

Problem

There is a change to parameter renaming functionality in Grape >= 1.6.0. https://github.com/ruby-grape/grape/blob/master/UPGRADING.md#upgrading-to--160

We need to update parameters for compatibility reasons.

When we send start_date (deprecated params) to Epics API, Grape converts it to start_date_fixed and applies necessary validations. Both Grape versions 1.5.2 and 1.7.0 treat it equally.

However, when we send start_date_fixed (an expected param). Grape 1.7.0 removes it from the declared_params list, because it expects to receive start_date. But current version 1.5.2 allows that.

Solution

Don't use as for parameters renaming. Instead define two separate params and redefine them.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Nicolas Dular
  • Nicolas Dular approved this merge request

    approved this merge request

  • Nicolas Dular requested review from @proglottis and removed review request for @nicolasdular

    requested review from @proglottis and removed review request for @nicolasdular

  • :wave: @nicolasdular, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • Vasilii Iakliushin marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

    marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

  • James Fargher resolved all threads

    resolved all threads

  • James Fargher approved this merge request

    approved this merge request

  • James Fargher enabled an automatic merge when the pipeline for 61f992ec succeeds

    enabled an automatic merge when the pipeline for 61f992ec succeeds

  • merged

  • James Fargher mentioned in commit c2148630

    mentioned in commit c2148630

  • mentioned in issue #413419 (closed)

  • John McDonnell mentioned in commit 21a5b872

    mentioned in commit 21a5b872

  • John McDonnell mentioned in merge request !122042 (merged)

    mentioned in merge request !122042 (merged)

  • John McDonnell mentioned in commit c1548bb2

    mentioned in commit c1548bb2

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading