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

Move to github workflows #104

Merged
merged 7 commits into from
Jul 4, 2024
Merged

Move to github workflows #104

merged 7 commits into from
Jul 4, 2024

Conversation

ankithads
Copy link
Contributor

@ankithads ankithads commented Jun 14, 2024

Configuring Github Actions for tests.

@ankithads ankithads force-pushed the add-github-workflows branch 4 times, most recently from 0ba0fbc to 58e7564 Compare June 14, 2024 08:13
@ankithads ankithads force-pushed the add-github-workflows branch 3 times, most recently from 7a33dd9 to ab30213 Compare June 14, 2024 08:43
@ankithads ankithads changed the title add github workflows Add github workflows Jun 14, 2024
@ankithads ankithads changed the title Add github workflows Move to github workflows Jun 14, 2024
@ankithads ankithads requested a review from a team June 14, 2024 09:53
@ankithads ankithads marked this pull request as ready for review June 14, 2024 09:54
@ankithads ankithads force-pushed the add-github-workflows branch 2 times, most recently from 8356722 to 2166a02 Compare June 14, 2024 10:15
@ankithads ankithads force-pushed the add-github-workflows branch 4 times, most recently from fadc415 to f4532c9 Compare June 14, 2024 11:01
@ankithads ankithads force-pushed the add-github-workflows branch 6 times, most recently from 7a63321 to 68c4b92 Compare July 3, 2024 09:54
.github/workflows/tests.yml Show resolved Hide resolved
Gemfile Outdated
gem 'prometheus_gcstat', git: 'git@github.com:gocardless/prometheus_gcstat_ruby'

source "https://rubygems.pkg.github.com/gocardless" do
gem "prometheus_gcstat", "0.1.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to get a new release of this gem? Not sure how old this is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing got changed in the code after this version https://github.com/gocardless/prometheus_gcstat_ruby/commits/master/ except for github configs

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair. Should we allow any 0.1.x version rather than pin the exact version? That will allow for flexibility as versions upgrade.

before { allow(locker).to receive(:monotonic_now) { @epoch } }

before do
# we need this to avoid flakiness during resetting the cursor
Copy link
Contributor

Choose a reason for hiding this comment

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

Talked IRL, @ankithads to explain in the comment why this is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -4,7 +4,7 @@

RSpec.describe Que::Middleware::QueueCollector do
subject(:collector) { described_class.new(->(_env) { nil }, options) }
let(:options) { {} }
let(:options) { {refresh_interval: 1.second} }
Copy link
Contributor

Choose a reason for hiding this comment

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

This is being added because we don't have database cleaner and the state is being persisted across spec runs. Lowering the interval to 1.second forces the state to be refreshed between runs.

@ankithads to change the spec to force a refresh before the flaky spec, and that is idependent of spec intervals. As a follow-up, we'll ensure that database state is cleared between examples (eg. using DatabaseCleaner).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the refresh time comes from the pg_stat_user_tables. Database cleaner does not help here.

Copy link
Contributor

@ameykusurkar ameykusurkar left a comment

Choose a reason for hiding this comment

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

Two minor comments

Gemfile Outdated
gem 'prometheus_gcstat', git: 'git@github.com:gocardless/prometheus_gcstat_ruby'

source "https://rubygems.pkg.github.com/gocardless" do
gem "prometheus_gcstat", "0.1.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Fair. Should we allow any 0.1.x version rather than pin the exact version? That will allow for flexibility as versions upgrade.

.github/workflows/tests.yml Outdated Show resolved Hide resolved
@ankithads ankithads merged commit 066cc01 into master Jul 4, 2024
5 checks passed
@ankithads ankithads deleted the add-github-workflows branch July 4, 2024 07:43
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