foreman_ansible icon indicating copy to clipboard operation
foreman_ansible copied to clipboard

Update REX and foreman-tasks dependencies

Open nofaralfasi opened this issue 2 years ago • 8 comments

Update foreman_remote_execution and foreman-tasks dependencies using ~> instead of >=.

nofaralfasi avatar Sep 20 '22 07:09 nofaralfasi

Are we expecting some breaking changes in upcoming releases of rex or tasks?

adamruzicka avatar Sep 20 '22 07:09 adamruzicka

Are we expecting some breaking changes in upcoming releases of rex or tasks?

Not that I know of.

nofaralfasi avatar Sep 20 '22 08:09 nofaralfasi

@nofaralfasi @adamruzicka tests are failing again on: ActiveRecord::AssociationTypeMismatch: RemoteExecutionFeature(#72560) expected, got nil which is an instance of NilClass(#40)

in #554 updating the versions and using >= seemed to solve it, any other thoughts on why it happens?

Ron-Lavi avatar Sep 20 '22 08:09 Ron-Lavi

I'm failing to reproduce that locally, not sure where it comes from. Only thing I can say is that apparently at the time when the test is run, the feature is not seeded (yet?)

adamruzicka avatar Sep 20 '22 10:09 adamruzicka

@nofaralfasi can you try adding the db:seed step in the test setup? https://github.com/theforeman/foreman_ansible/blob/master/.github/workflows/ruby_tests.yml#L73

Do we need the db:test:prepare? From what I checked, db:prepare suppose to do all three - db:create, db:migrate, and db:seed. So should I add db:seed instead the db:test:prepare?

nofaralfasi avatar Sep 28 '22 14:09 nofaralfasi

Do we need the db:test:prepare? From what I checked, db:prepare suppose to do all three - db:create, db:migrate, and db:seed. So should I add db:seed instead the db:test:prepare?

Let's try and see if it fixes the tests then :)

Ron-Lavi avatar Sep 28 '22 14:09 Ron-Lavi

@nofaralfasi looks like there is another error, @stejskalleos is working on the fix in #563

Ron-Lavi avatar Sep 29 '22 09:09 Ron-Lavi

The issue with ActiveRecord::AssociationTypeMismatch: RemoteExecutionFeature is also reproducible locally on master branch, you have to destroy db, recreate it, migrate it and then you will see the error too. But only once, for second run of bundle exec rake test:foreman_ansible -v --trace you won't see it again.

stejskalleos avatar Oct 06 '22 11:10 stejskalleos

@nofaralfasi can you rebase please?

Ron-Lavi avatar Oct 25 '22 06:10 Ron-Lavi