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

Add the remote plan with polarion tests #1646

Merged
merged 2 commits into from
Apr 5, 2023
Merged

Conversation

jscotka
Copy link
Collaborator

@jscotka jscotka commented Oct 27, 2022

Using remote tests for polarion testing: teemtee/tests#1

@psss psss changed the title add remote plan to polarion tests Add the remote plan with polarion tests Oct 27, 2022
@psss
Copy link
Collaborator

psss commented Oct 27, 2022

The remote plan will not work until tmt-1.18 is enabled in Testing Farm. But the pull request already revealed an interesting thing: Thanks to inheritance the new plan has both plan and execute key, which should not be allowed. Let's discuss solution for this in #1648. As a workaround, we can disable inheritance for remote plans.

@psss psss added command | tests tmt tests command plugin | polarion Plugins implementing the Polarion integration labels Oct 27, 2022
@psss psss added this to the 1.20 milestone Oct 27, 2022
@psss
Copy link
Collaborator

psss commented Nov 29, 2022

Fresh tmt is available in Testing Farm, let's see what happens now! I've disabled the inheritance to prevent inheriting the execute step definition.

@psss
Copy link
Collaborator

psss commented Dec 5, 2022

Most probably failed because of tmt plan export tracebacking on remote plans: #1729

@psss
Copy link
Collaborator

psss commented Dec 6, 2022

We'll be able to verify this once tmt-1.20 with the fix for #1729 is deployed in the Testing Farm --> moving to 1.21.

@psss psss modified the milestones: 1.20, 1.21 Dec 6, 2022
@psss
Copy link
Collaborator

psss commented Jan 17, 2023

Everything should be ready in the tooling, so let's try if it works ;-) Rebased on the latest main as well.

@packit-as-a-service
Copy link

We were not able to find or create Copr project packit/teemtee-tmt-1646 specified in the config with the following error:

Cannot create a new Copr project (owner=packit project=teemtee-tmt-1646 chroots=['fedora-37-x86_64', 'fedora-36-x86_64', 'fedora-rawhide-x86_64', 'epel-8-x86_64', 'epel-9-x86_64']): Gateway Timeout
Consider using pagination for large queries.

Please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

@psss
Copy link
Collaborator

psss commented Jan 17, 2023

/packit test

@psss
Copy link
Collaborator

psss commented Jan 23, 2023

Tests are failing:

@kkaarreell, do you think the dynamic ref test could be updated not to rely on the fork branches?

@kkaarreell
Copy link
Collaborator

@psss Does it? I would say it uses the branch of the project itself.

@kkaarreell
Copy link
Collaborator

We could hardcode tmt repo

@psss
Copy link
Collaborator

psss commented Jan 23, 2023

We could hardcode tmt repo

Sounds good.

@kkaarreell
Copy link
Collaborator

We could hardcode tmt repo

Sounds good.

maybe this would be it #1810

@adiosnb
Copy link
Collaborator

adiosnb commented Jan 24, 2023

Tests are failing:

* `/tests/core/dry` because of non-existing directory

* `/tests/discover/dynamic-ref/fmf` because of an outdated `fedora` branch in @jscotka fork

* `/requre/polarion` because of recent `logger` changes in [Decouple logging from objects and base classes #1685](https://github.com/teemtee/tmt/pull/1685)

@kkaarreell, do you think the dynamic ref test could be updated not to rely on the fork branches?

I am trying to fix the test with --dry options with this #1811. What do you think?

@adiosnb
Copy link
Collaborator

adiosnb commented Jan 24, 2023

@jscotka If tests in #1811 are OK, please merge jscotka#1 into this PR. Or we can discuss the next steps.

@psss
Copy link
Collaborator

psss commented Jan 30, 2023

@kkaarreell, @adiosnb, thank you both for the fixes. I suggest to merge #1811 to main when tests are green and rebase this pull request on it.

@psss
Copy link
Collaborator

psss commented Jan 30, 2023

Adding logger to the remote tests in teemtee/tests/pull/2.

@psss psss modified the milestones: 1.21, 1.22 Feb 1, 2023
@jscotka jscotka force-pushed the polarion_remote branch 2 times, most recently from 585cd86 to c55601a Compare March 8, 2023 19:38
@jscotka
Copy link
Collaborator Author

jscotka commented Mar 8, 2023

results of remote plan seems well,

@lukaszachy
Copy link
Collaborator

Polarion tests will need update after #1937 is merged, right?

@KwisatzHaderach
Copy link
Collaborator

KwisatzHaderach commented Mar 23, 2023

Don't think so, there is one tests right now (tests/report/polarion), which is only in tmt repo and is disabled for obvious reasons.
What really needs to be done is moving the test to the tests repo and enabling it, definitely not worth doing as part of this patch.

@jscotka
Copy link
Collaborator Author

jscotka commented Mar 24, 2023

@psss I though that dry run issue is already fixed, seems not. reased and it still failed.

@psss
Copy link
Collaborator

psss commented Mar 28, 2023

Yes, one issue related to --dry has been fixed in 372a5d2. This looks like another one. @adiosnb, could you possibly have a look?

@adiosnb
Copy link
Collaborator

adiosnb commented Apr 4, 2023

Yes, one issue related to --dry has been fixed in 372a5d2. This looks like another one. @adiosnb, could you possibly have a look?

Hi, I've changed the position of --dry option from the virtual step to global, and it fixed the test. The problem was that do my_run did not see the dry option set to True and tried to clone a remote plan into an uninitialized directory structure.

Old: tmt run --all --remove provision --how virtual --dry
New: tmt run --dry --all --remove provision --how virtual

@psss @jscotka What do you think about modifying the test in this way?

@adiosnb
Copy link
Collaborator

adiosnb commented Apr 4, 2023

Yes, one issue related to --dry has been fixed in 372a5d2. This looks like another one. @adiosnb, could you possibly have a look?

Hi, I've changed the position of --dry option from the virtual step to global, and it fixed the test. The problem was that do my_run did not see the dry option set to True and tried to clone a remote plan into an uninitialized directory structure.

Old: tmt run --all --remove provision --how virtual --dry New: tmt run --dry --all --remove provision --how virtual

@psss @jscotka What do you think about modifying the test in this way?

I found another interesting behavior, which may lead to the actual bug.

Not working: tmt run --all --remove provision --how virtual --dry
Working: tmt run --all --remove provision --how virtual --dry plan

The problem with the not working case is that the dry option of Plan is set to True; thus, the remote plan is not cloned.

The question is, how is dry propagated to other objects?

@psss
Copy link
Collaborator

psss commented Apr 4, 2023

@psss @jscotka What do you think about modifying the test in this way?

I was looking at the test more closely and it seems it intentionally exercises the case when --dry is called under the provision step. So... I'm afraid we need to fix that bug. The global --dry is covered a couple lines above.

@psss psss requested review from happz and thrix as code owners April 4, 2023 14:31
@psss psss self-assigned this Apr 5, 2023
@psss psss force-pushed the polarion_remote branch from fadc90b to 0e0d10e Compare April 5, 2023 17:03
@psss
Copy link
Collaborator

psss commented Apr 5, 2023

Trying to fix the dry mode handling for remote plans in 0e0d10e.

@psss psss force-pushed the polarion_remote branch from 0e0d10e to 47b9250 Compare April 5, 2023 18:34
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

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

Thanks for preparing the remote polarion tests. I've fixed the problem with the provision --dry traceback for imported plans in 47b9250. Now all tests seem to be green.

@psss psss merged commit 47b9250 into teemtee:main Apr 5, 2023
@psss psss mentioned this pull request Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command | tests tmt tests command plugin | polarion Plugins implementing the Polarion integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants