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

Using a new user per feature, to facilitate parallelization of secondary_parallelizable.yml in CI #5743

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

srbarrios
Copy link
Member

What does this PR change?

Related to https://github.com/SUSE/spacewalk/issues/9748

Creating a new user per feature, using a scenario hook that will only pass for the first scenario per feature, acting as a feature hook.

It will by-pass the authentication of testing or admin users, using the regular step, when the feature variable @username is not null.

It creates a user name based on the feature filename because the feature name is too long and we have secondary features that acts on several clients during the same feature, so client name can't be use for that purpose on regular CI Tests.

How to debug parallel tests is another topic, that we can discuss and improve separetely.
The aime of that PR is only to fix the current issue with multiple systems selected as described in the issue linked.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed

  • DONE

Test coverage

  • Cucumber tests were changed, need to check on CI

  • DONE

Links

None

  • DONE

Changelogs

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_lint_checkstyle"
  • Re-run test "java_pgsql_tests"
  • Re-run test "ruby_rubocop"
  • Re-run test "schema_migration_test_oracle"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

@srbarrios srbarrios changed the title Qe user per feature Using a new user per feature (Mandatory for parallel tests) Aug 5, 2022
@srbarrios srbarrios force-pushed the qe-user-per-feature branch from f8a3f80 to 4ebab75 Compare August 5, 2022 08:34
@srbarrios srbarrios force-pushed the qe-user-per-feature branch 3 times, most recently from faf6a4e to 9353132 Compare August 5, 2022 08:48
@srbarrios srbarrios marked this pull request as ready for review August 5, 2022 08:49
@srbarrios srbarrios requested a review from a team as a code owner August 5, 2022 08:49
@srbarrios srbarrios force-pushed the qe-user-per-feature branch from 9353132 to c60091a Compare August 5, 2022 10:56
Copy link
Contributor

@Bischoff Bischoff left a comment

Choose a reason for hiding this comment

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

see question, other than that lgtm

testsuite/features/step_definitions/navigation_steps.rb Outdated Show resolved Hide resolved
@srbarrios srbarrios force-pushed the qe-user-per-feature branch from c60091a to 94b357b Compare August 10, 2022 15:00
Copy link
Member

@nodeg nodeg left a comment

Choose a reason for hiding this comment

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

I found some issues in the PR tests:

It seems this was from an old PR test run!

[2022-08-05T10:35:01.439Z] Scenario: Add a product and one of its modules                                                       # features/reposync/srv_sync_products.feature:36

[2022-08-05T10:35:01.439Z] This scenario ran at: 2022-08-05 12:34:35 +0200

[2022-08-05T10:35:01.439Z] When I follow the left menu "Admin > Setup Wizard > Products"                                      # features/step_definitions/navigation_steps.rb:342

[2022-08-05T10:35:01.439Z]       Unable to find xpath "//aside/div[@id='nav']/nav/ul/li/div/a[contains(.,'Admin')]/parent::div/parent::li" (Capybara::ElementNotFound)

[2022-08-05T10:35:01.439Z]       ./features/step_definitions/navigation_steps.rb:361:in `block (2 levels) in <top (required)>'

[2022-08-05T10:35:01.439Z]       ./features/step_definitions/navigation_steps.rb:355:in `each'

[2022-08-05T10:35:01.439Z]       ./features/step_definitions/navigation_steps.rb:355:in `each_with_index'

[2022-08-05T10:35:01.439Z]       ./features/step_definitions/navigation_steps.rb:355:in `/^I follow the left menu "([^"]*)"$/'

[2022-08-05T10:35:01.439Z]       features/reposync/srv_sync_products.feature:37:in `I follow the left menu "Admin > Setup Wizard > Products"'

It could be that this scenario is not done with the admin user and therefore the scenario fails. This is also not the only scenario that failed with this regards.

nodeg
nodeg previously approved these changes Aug 11, 2022
Copy link
Member

@nodeg nodeg left a comment

Choose a reason for hiding this comment

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

I approved it but am curious on how this has an impact on the performance. But let`s wait for Erics go/no go.

@srbarrios
Copy link
Member Author

I approved it but am curious on how this has an impact on the performance. But let`s wait for Erics go/no go.

It will for sure increase a bit the time per feature.
But, when we enable parallel tests this will be very compensated :)

@srbarrios srbarrios force-pushed the qe-user-per-feature branch from afae980 to d386401 Compare August 11, 2022 09:16
@maximenoel8
Copy link
Contributor

Overall don't forget to update the copyright.

@uyuni-project uyuni-project deleted a comment from github-actions bot Aug 7, 2024
@srbarrios srbarrios force-pushed the qe-user-per-feature branch from 446a35c to 93a6ebf Compare August 7, 2024 13:17
@srbarrios
Copy link
Member Author

srbarrios commented Aug 7, 2024

Overall don't forget to update the copyright.

Good point.


Update: Done.

@uyuni-project uyuni-project deleted a comment from github-actions bot Aug 7, 2024
@srbarrios srbarrios force-pushed the qe-user-per-feature branch from 93a6ebf to 2eb65dc Compare August 7, 2024 13:56
@uyuni-project uyuni-project deleted a comment from github-actions bot Aug 8, 2024
@srbarrios srbarrios requested a review from a team August 8, 2024 07:38
@srbarrios srbarrios changed the base branch from master to qe-develop August 20, 2024 10:28
@srbarrios srbarrios merged commit 87e7f26 into qe-develop Aug 20, 2024
16 checks passed
@srbarrios srbarrios deleted the qe-user-per-feature branch August 20, 2024 10:30
nodeg pushed a commit that referenced this pull request Aug 22, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
nodeg pushed a commit that referenced this pull request Aug 22, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
srbarrios added a commit that referenced this pull request Sep 4, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
srbarrios added a commit that referenced this pull request Sep 5, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
nodeg pushed a commit that referenced this pull request Sep 6, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
nodeg pushed a commit that referenced this pull request Sep 6, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
nodeg pushed a commit that referenced this pull request Sep 6, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
nodeg pushed a commit that referenced this pull request Sep 9, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
srbarrios added a commit that referenced this pull request Sep 12, 2024
…ary_parallelizable.yml in CI (#5743)

* Using a new user per feature

* Removing refactors made to enable parallel tests, moved to this branch qe-refactor-enabling-parallel-tests

* Updating the Copyright year
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants