Skip to content

Update Onebox#893

Merged
timdiggins merged 2 commits into
thredded:masterfrom
mission-met:update-onebox-and-addressable
Jul 15, 2021
Merged

Update Onebox#893
timdiggins merged 2 commits into
thredded:masterfrom
mission-met:update-onebox-and-addressable

Conversation

@rickychilcott

Copy link
Copy Markdown
Contributor

To allow me to update the addressable gem (which is desired because of CVE-2021-32740), I need to update the onebox gem.

This PR is testing whether a onebox upgrade to 2.x will cause problems

@rickychilcott
rickychilcott force-pushed the update-onebox-and-addressable branch from 42dbdb6 to 972758e Compare July 13, 2021 12:25
@rickychilcott

Copy link
Copy Markdown
Contributor Author

@glebm @timdiggins - CI used to run on PRs, but it appears that Travis no longer has their .org builds any longer. See https://travis-ci.org/github/thredded/thredded/branches

Can one of you sign up for a free travis-ci account on travis-ci.com and see if we can get builds going again?

@timdiggins

Copy link
Copy Markdown
Collaborator

@rickychilcott thanks for letting me know. I've just tried to migrate or add them to travis-ci.com but it doesn't seem to work. I've reached out to travis-ci.com support and hopefully will be straightforward.

Comment thread thredded.gemspec Outdated
s.add_dependency 'kramdown', '>= 2.0.0'
s.add_dependency 'kramdown-parser-gfm'
s.add_dependency 'onebox', '~> 1.8', '>= 1.8.99'
s.add_dependency 'onebox', '~> 2.2'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

my feeling is, as a library, we should prefer looser dependencies (ie. no ~> or <) unless we know there's a specific issue (e.g. it won't work with that version). Thus we could simplify this to '>= 1.8.99'. This allows users of the library to be specific about which version they want to use.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That said I just read your comment "This PR is testing whether..." -- but you could test that by loosening the version and running it locally I think. (Sadly there doesn't seem to be any indication of what breaking changes Onebox 2.x brings in, if any: https://github.com/discourse/onebox/blob/master/CHANGELOG.md)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PS I've run the specs locally against rails 6.0 x sqllite x onebox 2.2 and passes locally. Am in communication with travis support.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you, Tim. I haven't been able to get a local testing environment running locally, unfortunately. I'll try again next time I run into something.

I'm happy to make it '>= 1.8.99', which should get me over the CVE-2021-32740 issue.

I was also bummed to not see any details about what 2.x brings. I'm going to try a version of the app locally with this and deploy to a staging environment before I request a review.

Thank you for your work on this @timdiggins!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If you want to make it >= 1.8.99, it should still run on travis with the latest version (because bundle install without a lockfile should I think install the latest version, even if travis is caching gems). Travis-ci.com is now building I think.

PS running specs locally is pretty straightforward, just a few steps -- https://github.com/thredded/thredded/#testing gives all the details (though in slightly the backwards order -- how to run first, then how to setup )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rickychilcott
rickychilcott force-pushed the update-onebox-and-addressable branch from 972758e to 1da3776 Compare July 15, 2021 01:37
@rickychilcott rickychilcott changed the title WIP Update onebox and addressable Update Onebox Jul 15, 2021
@rickychilcott

Copy link
Copy Markdown
Contributor Author

I was able to merge in master and change it to s.add_dependency 'onebox', '>= 1.8.99'

It successfully passes all test. I also tried a few URLs in a deployment to my staging environment and everything seems fine.

Note that this is still not allowing us to go to addressable 2.8.0 (to resolve CVE-2021-32740), but I will work with the onebox team to cut a release of onebox that will allow that to happen.

@timdiggins can you merge?

@rickychilcott

Copy link
Copy Markdown
Contributor Author

Thank you @timdiggins. Onebox has cut a new gem now as well. All is right with the world!

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