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 resolver for tracking first required AT Version #1051

Merged
merged 8 commits into from
Apr 24, 2024

Conversation

howard-e
Copy link
Contributor

@howard-e howard-e commented Apr 9, 2024

This PR adds support for tracking "First Required AT Versions as outlined in #792.

  • Includes firstRequiredAtVersion on graphql schema's TestPlanVersion. When provided an AT id, given that a report has been generated for that test plan version with that AT, it will follow defined rules to return the first required AT version for a TestPlanVersion once it has gotten to RECOMMENDED.

Since this is work is also dependent on a "primary test plan run", this is branched off of the work being done on #1001.

@alflennik
Copy link
Contributor

Cannot read properties of undefined while querying the new field.

I got this error with the query

query { 
  testPlanVersions {
    id
    title
    versionString
    firstRequiredAtVersion(atId: 1) {
 			id
    }
  }
}

Any idea what might be causing this?

This is with a fresh database and the sample data.

Copy link
Contributor

@alflennik alflennik left a comment

Choose a reason for hiding this comment

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

Just a couple of notes! The main thing is that I encountered an error in the graphql playground.

create subsequent reports after the Test Plan Version has reached
RECOMMENDED.
"""
firstRequiredAtVersion(atId: ID!): AtVersion
Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering, how do you feel about calling this earliestMissingAtVersion? I feel like "missing" might be more descriptive than "required", possibly?

Copy link
Contributor Author

@howard-e howard-e Apr 22, 2024

Choose a reason for hiding this comment

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

The "required" in the name relates to the description provided for required reports. "Missing" feels slightly different here for 2 reasons:

  1. Initially, the name seems like it would return a value that should exist, but doesn't, which isn't what this value is
  2. If the following is okay though, a "missing" AT Version may not necessarily be the same as a "required" AT version. For example if VO + Firefox got to recommended with any other VO + Browser combinations (not actually possible), it shouldn't produce a result for this based on the description in Update report status dialog for recommended test plans to include information about required AT/Browser versions #792, since it isn't "required"

I was also thinking the first -> earliest may cause confusion since it deviates from what was originally proposed but that is currently conceptual and earliest does feel a bit more clear and aligns with other variables in the schema.

Based on the above though, this variable could really be earliestRequiredWhenRecommendedAtVersion (or similar) if I wanted to fully self-document. But the descriptions around this value help should make this clear. So to avoid further confusion and increased verbosity, how about just earliestAtVersion?

I've also created a Business Logic Wiki so the definitions of these concepts aren't also lost outside the context of the graphql schema or whatever else other internal app logic.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!


This should be used to prevent any older AT Versions from being used to
create subsequent reports after the Test Plan Version has reached
RECOMMENDED.
Copy link
Contributor

Choose a reason for hiding this comment

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

I appreciate the depth of this explanation, but even so I had a hard time understanding what this field really means. Would it be possible to describe it in terms of how exactly it fits into the workflow for test plans?

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 in b916caf. Does that help to clarify?

@howard-e
Copy link
Contributor Author

howard-e commented Apr 22, 2024

Cannot read properties of undefined while querying the new field. I got this error with the query
query { 
  testPlanVersions {
    id
    title
    versionString
    firstRequiredAtVersion(atId: 1) {
 			id
    }
  }
}

Any idea what might be causing this?

This is with a fresh database and the sample data.

21a0c72 should fix this. Because of how the testPlanVersionsResolver is done, the testPlanReports and phase variables were being left out which would then throw the error.

Copy link
Contributor

@alflennik alflennik left a comment

Choose a reason for hiding this comment

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

I verified that this is working perfectly now. And thanks for addressing all my feedback.

@alflennik alflennik merged commit f1d2203 into primaryTestPlanRun Apr 24, 2024
2 checks passed
@alflennik alflennik deleted the trackFirstRequiredAtVersion branch April 24, 2024 21:05
alflennik added a commit that referenced this pull request May 2, 2024
* Add minimum or exact at version to reports

* Quick tweak

* Revert home copy change

* Remove unused field from createTestPlanReport

* Fix undefined var

* Prevent API from creating duplicate reports

* Support primary test plan to be selected

* Fix test

* Add dialog when marking report as final for an admin to select from probably primary test run options

* prioritised -> prioritized typo (british -> american english)

* Avoid displaying primary test plan run confirmation when just 1 run option

* Add atVersion frontend

* Make sure automation dialog always shows when valid

* Make sure existing reports have a minimum at version

* Formatting

* feat: Add resolver for tracking first required AT Version (#1051) Address #792

* Add resolver for finding firstRequiredAtVersion for a RECOMMENDED TestPlanVersion, given an atId

* Update tests

* Fix graphql call when including "firstRequiredAtVersion" under "testPlanVersions"

* Update description of firstRequiredAtVersion

* Rename resolver

---------

Co-authored-by: alflennik <[email protected]>
alflennik added a commit that referenced this pull request May 8, 2024
…s RECOMMENDED (#1052)

* Add minimum or exact at version to reports

* Quick tweak

* Revert home copy change

* Remove unused field from createTestPlanReport

* Fix undefined var

* Prevent API from creating duplicate reports

* Support primary test plan to be selected

* Fix test

* Add resolver for finding firstRequiredAtVersion for a RECOMMENDED TestPlanVersion, given an atId

* Add dialog when marking report as final for an admin to select from probably primary test run options

* prioritised -> prioritized typo (british -> american english)

* Update tests

* Track recommended AT version

* Avoid displaying primary test plan run confirmation when just 1 run option

* Fix graphql call when including "firstRequiredAtVersion" under "testPlanVersions"

* Update description of firstRequiredAtVersion

* Add atVersion frontend

* Make sure automation dialog always shows when valid

* Rename resolver

* Make sure existing reports have a minimum at version

* Formatting

* Fix graphql calls when doing testPlanReports > recommendedAtVersion

* feat: Add resolver for tracking first required AT Version (#1051) Address #792

* Add resolver for finding firstRequiredAtVersion for a RECOMMENDED TestPlanVersion, given an atId

* Update tests

* Fix graphql call when including "firstRequiredAtVersion" under "testPlanVersions"

* Update description of firstRequiredAtVersion

* Rename resolver

* Use exactAtVersionId if available for recommendedAtVersion

* Update comment

---------

Co-authored-by: alflennik <[email protected]>
alflennik added a commit that referenced this pull request May 8, 2024
…#1087)

* Add minimum or exact at version to reports

* Quick tweak

* Revert home copy change

* Remove unused field from createTestPlanReport

* Fix undefined var

* Prevent API from creating duplicate reports

* Support primary test plan to be selected

* Fix test

* Add dialog when marking report as final for an admin to select from probably primary test run options

* prioritised -> prioritized typo (british -> american english)

* Avoid displaying primary test plan run confirmation when just 1 run option

* Add atVersion frontend

* Make sure automation dialog always shows when valid

* Make sure existing reports have a minimum at version

* Formatting

* feat: Add resolver for tracking first required AT Version (#1051) Address #792

* Add resolver for finding firstRequiredAtVersion for a RECOMMENDED TestPlanVersion, given an atId

* Update tests

* Fix graphql call when including "firstRequiredAtVersion" under "testPlanVersions"

* Update description of firstRequiredAtVersion

* Rename resolver

* Update status dialog for minimum exact AT versions

* Recommended phase uses exact AT version

* Remove unneeded ternary

* Fix issue caused by using draft reports

* Reduce number of at versions shown in status dialog

* Fix unused var

* Fix incorrect required browser

* Address PR feedback

---------

Co-authored-by: Howard Edwards <[email protected]>
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