declarative icon indicating copy to clipboard operation
declarative copied to clipboard

Migrate to GitHub Actions.

Open simi opened this issue 9 months ago • 6 comments

Hello, I'm trying to upgrade gem to get stable CI. I have updated tests to be Ruby agnostic and I have migrated to GitHub Actions. I have included only supported Rubies for now to CI.

CI can be seen in action at https://github.com/RubyElders/declarative/pull/1. Not sure why it doesn't start in here. Maybe needs to enable first. Happy to help setting up this. This gem was identified as one of the crucial for whole RubyGems.org ecosystem and would be nice to get stable CI setup.

PS: I understand this gem is not developed anymore and I'll do my best to update popular reverse dependencies to remove the need of this gem. But meanwhile, it will be appreciated to at least test current version on CI to ensure it works with current Rubies.

simi avatar Apr 12 '25 02:04 simi

@apotonick friendly ping, new CI setup is one merge away :)

simi avatar May 05 '25 17:05 simi

@apotonick do you think there will be time to take a look? All changes in tests are 1:1, just testing the structure, not textual representation (which vary across Rubies).

simi avatar Jun 08 '25 13:06 simi

Hi @simi, thanks again! Could you rebase your PR and just add the CI setup? We have a utility method in trailblazer-core-utils that I will use the get the tests running (even though I'm absolutely not motivated to touch this gem :joy:): https://github.com/trailblazer/trailblazer-core-utils/blob/master/test/hash_inspect_test.rb#L6

apotonick avatar Jun 11 '25 08:06 apotonick

@apotonick I swear this is the last PR from my side. I'll work on disconnecting uber + declarative from active usage after. :) I'm happy to migrate tests to that util also. Should I copy it here or make those utils dev dependency?

simi avatar Jun 11 '25 09:06 simi

Haha, you can send as many PRs as you want :joy: We have the core-utils gem as a dev dependency in all TRB gems.

Which gem are you thinking about liberating from uber?

apotonick avatar Jun 11 '25 15:06 apotonick

@apotonick my current chain of fear is google-apis-core -> representable -> uber and declarative (did similar PR in there https://github.com/trailblazer/representable/pull/270). Representable is deeply rooted in google-apis-core, that one probably needs to keep maintained somehow. Would see how simple it would be to cut or inline other unmaintained representable deps.

simi avatar Jun 11 '25 18:06 simi

Ah, ok, we can make representable look maintained. Problem is, we're not the Rails core team and have 35 kids eager to help (yet, hahaha) but I see the pressure here and can allocate a few days the next week.

apotonick avatar Jun 17 '25 07:06 apotonick

Ah, ok, we can make representable look maintained. Problem is, we're not the Rails core team and have 35 kids eager to help (yet, hahaha) but I see the pressure here and can allocate a few days the next week.

I'm happy to jump there also. Nothing huge is needed, just ensure gem has stable CI and it passes no modern Rubies. Also quick check on issues there is nothing serious reported. I can contribute all this if anyone is around to review and merge :wink:.

simi avatar Jun 17 '25 08:06 simi

So... if I am deceiving and seducing, I can slowly lure you into TRB core.... image

apotonick avatar Jun 17 '25 08:06 apotonick

Is TRB still active thing?

simi avatar Jun 17 '25 09:06 simi

image

What makes you think it's not? It's just that we haven't had "big" releases, but the new upcoming stuff will blow your mind!

apotonick avatar Jun 17 '25 12:06 apotonick

@apotonick the mentioned helper blew my mind, it doesn't support all usecases like nested hashes. See example:

# original
_(schema.get("id").inspect).must_equal '#<Declarative::Definitions::Definition: @options={:name=>"id"}>'
# passing with helper, see options had to be changed anyway
_(Trailblazer::Core::Utils.inspect(schema.get("id"))).must_equal '#<Declarative::Definitions::Definition: @options={name: "id"}>'

Wouldn't be possible to merge this version where no helper is needed actually? Or do you need to support ancient Rubies?


PS: To answer your original question. I was clicking around, got to the https://trailblazer.to/2.1/pro#future-insights page with interesting future insight. 😸

simi avatar Jun 17 '25 20:06 simi

@simi We try to support older Rubies as Trailblazer and all its gems are focusing on refactoring, we had a bunch of users who were really grateful they could use our stuff to upgrade to newer Ruby. I will update the helper.

Yes, the TRB page is new, but some pages are still waiting to be "released" - coming soon. <insert construction worker animated GIF here, saying "this page is still under construction">

apotonick avatar Jun 24 '25 09:06 apotonick

Could you remove the changed tests from your PR and only give me the updated CI, please?

apotonick avatar Jun 24 '25 09:06 apotonick

@apotonick done

simi avatar Jun 24 '25 09:06 simi

Thanks! :green_heart: let's see what CI says.

apotonick avatar Jun 24 '25 10:06 apotonick

@apotonick thanks a lot for your time and patience, ping me if there's anything I can help :handshake:

image

simi avatar Jun 24 '25 10:06 simi

Next move: removing uber from representable?

apotonick avatar Jun 24 '25 10:06 apotonick

Next move: removing uber from representable?

If you agree on, I can try.

simi avatar Jun 24 '25 10:06 simi

It will be a bit tricky as we should replace it with trailblazer-option, feel free to give it a go, I will play with it, too!

apotonick avatar Jun 24 '25 10:06 apotonick