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

Bringing changes from sidekiq-alive-next #72

Merged
merged 59 commits into from Dec 22, 2022
Merged

Bringing changes from sidekiq-alive-next #72

merged 59 commits into from Dec 22, 2022

Conversation

arturictus
Copy link
Owner

@arturictus arturictus commented Dec 7, 2022

This change adds the following:

  • sidekiq 7 support
  • Updates to CI to test using multiple sidekiq versions
  • Custom callback to run on shitdown (can be used to clean the queues)
  • Some minor tweaks and refactors

@arturictus
Copy link
Owner Author

arturictus commented Dec 7, 2022

Hi @andrcuns,
I'm bringing all the goodies that I found in your master branch.
I let you as reviewer in the GitHub actions, we can talk about it if you are interested into getting access to this repo.

@andrcuns
Copy link
Collaborator

andrcuns commented Dec 7, 2022

Hi @andrcuns, I'm bringing all the goodies that I found in your master branch. I let you as reviewer in the GitHub actions, we can talk about it if you are interested into getting access to this repo.

@arturictus thanks, that would be cool to release these under this gem for everyone else to use. Though since I mostly did the changes for my own usecase, some of them probably should be changed a bit, like:

  • Changes for sidekiq >= 7 are not backwards compatible and it's probably best to hold off the rack upgrade to v3 as it's not actually currently compatible with latest Rails version.

I can try and help out in some capacity with maintaining this project at some capacity given I extensively use it in on of my other projects and it has been very helpful.

@n-rodriguez n-rodriguez mentioned this pull request Dec 8, 2022
@arturictus
Copy link
Owner Author

Hi @andrcuns,
In my case I'm not using much this gem any more and I'm missing the feedback of using it in production.
Would be nice to have some help from someone that is using it live in production.
do you want me to give you access to the repo?

@andrcuns
Copy link
Collaborator

@arturictus Sure! Then I can try and update this branch to be a bit more backwards compatible sometime next week.

@arturictus
Copy link
Owner Author

arturictus commented Dec 14, 2022

@arturictus Sure! Then I can try and update this branch to be a bit more backwards compatible sometime next week.

Cool!!, I give you access :)

andrcuns and others added 23 commits December 20, 2022 22:42
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add release and changelog workflow

* Set custom label for actions deps
* Move all configuration in to startup block

* Check respond to on config object

* Update specs

* Run specs in random order
* Update gemspec metadata

* Require ruby 2.7
* Add static rubocop checks

* Allign arguments
* Add rake task to update version

* Add version update steps
Add testing with multiple sidekiq versions

Remove rack version requirement
sidekiq_alive.gemspec Outdated Show resolved Hide resolved
@arturictus
Copy link
Owner Author

Hey @andrcuns, this looks great!
I added the secret: GEM_HOST_API_KEY
What is the RELEASE_SSH_KEY?
do we need it to publish the gem or it's for the release commit?

@andrcuns
Copy link
Collaborator

Hey @andrcuns, this looks great! I added the secret: GEM_HOST_API_KEY What is the RELEASE_SSH_KEY? do we need it to publish the gem or it's for the release commit?

It is used for the manual release action in the step which automatically updates the version number, creates a tag and then pushed it back to repo:

-
        name: Update version
        run: |
          git config user.name github-actions
          git config user.email github-actions@github.com
          bundle config unset deployment
          bundle exec rake "version[${{ inputs.version }}]" && git push
      -
        name: Create tag and push to rubygems
        run: bundle exec rake release
        env:
          GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}

Basically it's ssh key that has access to push to repo.

It doesn't have to be your personal key. The way I did it, generated new key-pair and added public key as deploy key under security settings:
image
and added private key as secret:
image

It's not strictly necessary but it's nice to be able to have a full new version release cycle implemented via github actions

@andrcuns andrcuns added the enhancement New feature or request label Dec 21, 2022
Copy link
Owner Author

@arturictus arturictus left a comment

Choose a reason for hiding this comment

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

looks amazing!!, almost there

.github/release.yml Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
@arturictus
Copy link
Owner Author

Hey @andrcuns, this looks great! I added the secret: GEM_HOST_API_KEY What is the RELEASE_SSH_KEY? do we need it to publish the gem or it's for the release commit?

It is used for the manual release action in the step which automatically updates the version number, creates a tag and then pushed it back to repo:

-
        name: Update version
        run: |
          git config user.name github-actions
          git config user.email github-actions@github.com
          bundle config unset deployment
          bundle exec rake "version[${{ inputs.version }}]" && git push
      -
        name: Create tag and push to rubygems
        run: bundle exec rake release
        env:
          GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}

Basically it's ssh key that has access to push to repo.

It doesn't have to be your personal key. The way I did it, generated new key-pair and added public key as deploy key under security settings: image and added private key as secret: image

It's not strictly necessary but it's nice to be able to have a full new version release cycle implemented via github actions

Done and Done

@arturictus
Copy link
Owner Author

Added the secrets.
@andrcuns all ready to press merge. do you wanna do the honors?

@andrcuns
Copy link
Collaborator

Added the secrets. @andrcuns all ready to press merge. do you wanna do the honors?

Awesome, let's do it 🚀

@andrcuns andrcuns merged commit e686c88 into master Dec 22, 2022
@andrcuns
Copy link
Collaborator

@arturictus What do You think about testing the release flow and releasing a new version?

It's a pretty substantial change, while there should be no breaking changes, not sure if it should be a minor or major release. Probably still minor, since it basically just expands support and refactors some things.

@arturictus
Copy link
Owner Author

@andrcuns I think we can do a minor, let's try the releases 🤞

@benlangfeld
Copy link

#80 fixes a bug that is present in the Sidekiq 7 compatibility here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants