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

DPL-936-1 [Sequencescape] As developers we need to upgrade JSON API resources to the latest stable version as the current version is broken and it is preventing us upgrading to the long term supported version of Rails 6.1 #3950

Closed
stevieing opened this issue Nov 9, 2023 · 5 comments · Fixed by #4022
Assignees
Labels
dependencies Pull requests that update a dependency file Housekeeping Housekeeping On Hold On hold Size: M Medium - medium effort & risk Technical Debt technical risk Update Aging Framework Dependencies OKR Value: 3 Value to the insitute is average

Comments

@stevieing
Copy link
Contributor

Describe the Housekeeping
As developers we need to upgrade JSON API resources to the latest stable version as the current version is broken and it is preventing us upgrading to The long term supported version of Rails 6.1

Blocking issues
Describe any other issues or tickets that may be blocking this change.

Additional context
We are currently running JSON API resources 0.9.0. This is not compatible with Rails 6.1 and breaks all of our V2 endpoints. It has also been patched for our usage and this causes further issues with integration with standard Rails libraries

@stevieing stevieing added technical risk dependencies Pull requests that update a dependency file Housekeeping Housekeeping Size: M Medium - medium effort & risk Value: 3 Value to the insitute is average Technical Debt labels Nov 9, 2023
@stevieing stevieing changed the title DPL-936-1 - As developers we need to upgrade JSON API resources to the latest stable version as the current version is broken and it is preventing us upgrading to The long term supported version of Rails 6.1 DPL-936-1 - As developers we need to upgrade JSON API resources to the latest stable version as the current version is broken and it is preventing us upgrading to the long term supported version of Rails 6.1 Nov 9, 2023
@emrojo emrojo linked a pull request Nov 16, 2023 that will close this issue
@stevieing stevieing added the On Hold On hold label Nov 17, 2023
@KatyTaylor KatyTaylor removed the On Hold On hold label Dec 12, 2023
@stevieing
Copy link
Contributor Author

Link to traction service resources to show how we do preloading to improve performance. https://github.com/sanger/traction-service/tree/develop/app/resources/v1

@stevieing
Copy link
Contributor Author

stevieing commented Dec 15, 2023

Tasks left to complete:

  • preloading to improve performance
  • remove jsonapi-resource-matchers (last after integration suite working)
  • review comments spec tests for type
  • review plates spec capitalisation issue
  • review work orders spec because of source_receptacle relation. Maybe it can be removed?

@yoldas yoldas linked a pull request Dec 21, 2023 that will close this issue
@yoldas yoldas self-assigned this Jan 11, 2024
@yoldas yoldas changed the title DPL-936-1 - As developers we need to upgrade JSON API resources to the latest stable version as the current version is broken and it is preventing us upgrading to the long term supported version of Rails 6.1 DPL-936-1 [Sequencescape] As developers we need to upgrade JSON API resources to the latest stable version as the current version is broken and it is preventing us upgrading to the long term supported version of Rails 6.1 Jan 23, 2024
@yoldas yoldas added the On Hold On hold label Feb 2, 2024
@yoldas
Copy link
Member

yoldas commented Feb 2, 2024

Summary:

I have stopped working on upgrading jsonapi from 0.9.0 to 0.10.7 because 1) it is taking too long and 2) it is a maintenance nightmare. In 2019, there was another attempt to upgrade it from 0.9.0 to 0.9.5 which was not concluded. Every version breaks.

jsonapi 0.9.0 references a discontinued ForceSSL module, which is not even used and prevents Rails 6.1 upgrade.

I have tried an alternative solution, which enables Rails 6.1 upgrade:

  • forked jsonapi repo into my GitHub account: https://github.com/yoldas/jsonapi-resources
  • created a branch from exactly 0.9.0 tag in the fork: develop
  • removed the offending line: ActionController::ForceSSL, : resource_controller_metal.rb
  • created a Sequencescape branch freeze-jsonapi-resources
  • updated Sequencescape Gemfile to use jsonapi from the forked branch:
    gem 'jsonapi-resources', github: 'yoldas/jsonapi-resources', branch: 'develop'
  • executed all tests and integration suite against the branch

The final state of the branch allows starting Rails 6.1 upgrade process.

Next steps:

  • Fork jsonapi into sanger space instead of a personal GitHub space shown in the steps above
  • Change Gemfile to use the dependency from sanger space
  • Merge Sequencescapefreeze-jsonapi-resources into Sequencescape develop
  • Rebase the depfu dependency update PR
  • Start working on DPL-936-2 and the PR

This story then can be closed with this workaround.

@TWJW-SANGER
Copy link

@seenanair Just querying the move of this back to Non-Functional Reqs. Is this intentional, only it was in Closed and Done before?

@seenanair
Copy link
Contributor

seenanair commented May 21, 2024

@seenanair Just querying the move of this back to Non-Functional Reqs. Is this intentional, only it was in Closed and Done before?

@TWJW-SANGER Sorry Tom, I might have accidentally moved it and was not even aware of it.
Moved back to 'Done'.
My apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Housekeeping Housekeeping On Hold On hold Size: M Medium - medium effort & risk Technical Debt technical risk Update Aging Framework Dependencies OKR Value: 3 Value to the insitute is average
Projects
None yet
6 participants