Add an optional search parameter to the V1Wizard like so:
`/insights/image-builder/imagewizard?target=iso`
or
`/insights/image-builder/imagewizard?target=qcow`
This results in wizard being opened and iso or qcow target being pre-selected. The Insights assistant chat bot will make use of this feature.
Add an optional search parameter to the wizard like so:
/insights/image-builder/imagewizard?arch=aarch64
This results in the wizard being opened and 'aarch64' being pre-selected as the architecture.
The Insights assistant chat bot and our websites (access.redhat.com and
developers.redhat.com) will make use of this feature.
Relates to HMS-3684
The "Step Details image name invalid for more than 63 chars" is often timing out. The timeout was already increased in V2, this makes the same change for V1.
Adding an optional search parameter to the wizard like so:
/insights/image-builder/imagewizard?release=rhel8
results in the wizard being opened and RHEL 8 being pre-selected as the
release.
The Insights assistant chat bot will make use of this feature.
This disables all tests testing behaviour of the Repositories step.
All instances were marked with the "Temporarily disable" comment to make the complete revert easier in the future.
Components sometimes render slower than tests run which causes failures when the test suite expects elements that did not finish their rendering yet.
This should help to prevent most of possible problems with the rendering speed.
After cleaning up the ESLint plugins a new error for eslint-plugin-testing-library popped up. This PR solves all of the occurences of `Promise returned from async event method `user` must be handled` and removes the `"testing-library/await-async-events": "off"` switch which was temporary put in place.
Adding a new select into the images output step had for effet to
mechanically add a new option menu. In order to select the release
menu we have to take now the first option menu of all possibilities.
Refs HMS-1135
There is now a delay between when the user clicks on the architecture
button (or just goes onto the step) and when the targets are being
displayed. This is due to the fact that the data to filter which targets
needs to be displayed has to be fetched from the backend. And during the
meantime a loading spinner is shown.
To adapt to this the code simply waits for the fields to be accessible.
Refs HMS-1135
This commit:
1. Removes the header from the Data Driven Forms wizard
2. Adds padding around the in-page wizard so it is visually consistent
with the images table
3. Refactors the images table header into a re-usable component that is
now used in both the images table and the wizard
4. Allows the repositories table to fill the available vertical space in
the wizard
5. Adjusts the package dual list selectors so that they fill the
available horizontal space in the wizard
When the user clicks on the "create an image" button, the image wizard
shows up replacing the landing page. This allows to keep the quickstart
guides to the right of the wizard while the user is interacting with it.
Adding GCP image sharing option according to the discussion on slack(https://redhat-internal.slack.com/archives/C03AZ0264LW/p1692789579814619) and mocks(https://issues.redhat.com/browse/HMS-2352).
In summary, within our GCP sources, we store the project ID. Images cannot be shared directly with a project ID, but they can be shared with a service account or a Google account. Consequently, to launch instances in GCP, users are not required to provide their Google account; instead, the images should be shared with the provisioning service account. This ensures that the provisioning team has access to the necessary images, as sharing them with individual users would not allow that.
After a thorough discussion, we have collectively decided to introduce an option. This option allows users to exclusively utilize the Launch service without the need to share the image with a Google account.
This commit converts the Images Table to Typescript and converts all API
calls to image-builder to use RTK Query hooks.
This should increase the performance of the app significantly.
Previously our calls to the image-builder API were made in series. They
are now made in parallel. We may want to investigate the possibility of
hitting rate limiting now that we will be issuing requests in much more
rapid succession.
In the tests, moving to RTK Query hooks has allowed us to remove
virtually all Jest mocking. However, this means that some of our
previous tests which tested against implementation details were broken.
Most notably, we no longer check the Redux store to verify that clones
have been added correctly and we no longer check that compose requests
were issued successfully. Test coverage will be restored in a follow-up
PR where the dev-dependency @msw/data is added. Adding a persistent data
layer to the tests using @msw/data will allow us to verify that our POST
requests (creating composes and cloning them) are working by testing
that the Images Table has been updated.
This updates the Repositories and Review step as per [mocks](https://www.sketch.com/s/d7aa6d29-fca0-4283-a846-09cc5fd10612/a/MyEbDz7).
Repositories with the unavailable or invalid status have a popover that allows for further inspection. The time of the last introspection and the counter of failed attempts was added to the popover, together with the "Go to Repositories" button.
On Recreate the payload repositories are checked against "freshly" fetched list of repositories. In case any of the previously checked repositories is no longer available in content sources an Alert is rendered on both Repositories and Review steps. The unavailable repository is checked, but the checkbox is disabled and the information is dashed out. Since the information about the repository is stored in the Repository type, the only information available to be rendered is the baseurl.
Create image button is also disabled when recreating an image with unavailable repositories.
The "Step Image output - clicking Next loads Upload to AWS" and "Step Upload to Azure - clicking Next loads Registration" were sometimes returning the "Warning: An update to <element> inside a test was not wrapped in act(...)" error.
This seems to have been caused by an early exit in the `setUp()` function in the first `describe` block.
Safeguards were put in place to fix this behaviour.
As this error didn't occur every time, testing the updates was not easy. This current fix passed the threshold of ten successful runs of `npm run test`.
Test `component renders error state correctly` was outputting errors for both AWS and Azure tests.
This was caused by calling `server.use()` after the wizard was already rendered.
Fixed by moving the one time server mock response to the very beginning of the unit test. Also added `server.resetHandlers()` to be run after each of the unit tests.
Thanks to this fix, azure tests could be merged again. Which means no more splitting into `CreateImageWizard.azure.test.js` and `CreateImageWizard.azure.2.test.js`
This updates following test suites after bumping react and testing-library:
- CreateImageWizard.azure.test.js
- CreateImageWizard.azure.2.test.js
- CreateImageWizard.content.test.js
- CreateImageWizard.test.js
Fixes HMS-1492
This changes all occurences of "rhc" and "remote host configuration" from capitalized to lowercase.
In cases where the sentence started with "rhc" this was changed to "remote host configuration" to avoid
starting the sentence with "Rhc".
This moves Beta only features to stable environment:
- Sharing Images through Sources
- Launch button
This tries to avoid any refactoring, just moving components from Beta to stable with minimal changes.
Brute force approach to fix the act errors in the Wizard tests. It's not
ideal but allows to move on toward activating strict mode on the test
suite ASAP.
This adds `request` to a reponse from the `composes/{composeId}` endpoint and `meta` to a response from the `/composes/{composeId}/clones` endpoint as per API documentation.
The incomplete responses were causing problems when fetching data from the endpoints mentioned above.
The fixture was also migrated to TypeScript.
This adds validation of an image name based on a pattern, which was chosen as an intersection of the naming constrains of hyperscalers.
The pattern is based on the one for naming GCP images as those naming guidelines are the most restrictive. With added minimal length restriction of AWS.