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

Included Private ai stack basic sanity test #20015

Closed
wants to merge 1 commit into from

Conversation

yarunachalam
Copy link
Contributor

@m-dati
Copy link
Contributor

m-dati commented Aug 22, 2024

From what was used in pub.cl. and containers tests, it could be that this code flow could be rewritten in other way.
I mean that pre-installation of containers in publiccloud tests already are available in our tests after prepare_instance , registratio, ssh_interactive_start, etc... See i.e. OSD:Pub.Clo. Latest->publiccloud_container tests.

Probably it is useful some study on those test modules structures before this changes, unless a new project is ongoing, that I am not aware :)

@asmorodskyi comments would be useful here.

@m-dati
Copy link
Contributor

m-dati commented Aug 22, 2024

Please check C.I. failing for some syntax to tidy.

@m-dati
Copy link
Contributor

m-dati commented Aug 22, 2024

Please, see here below a summary of my suggestions and notes:

Taking as basic similitude the code in tests/publiccloud/run_ltp.pm:

  1. on top of module I see probably missing the @_ input parameter initialization:
    my ($self, $args) = @_ (eventually then remember $self->item ...);

  2. in place of select_serial_terminal(), I'd suggest the use of its wrapper publiccloud::ssh_interactive -> select_host_console(), including more checks.

  3. like runltp L99, suggested the "if-branch instance assignment from input, otherwise creation when not available" ($qam empty by default will run creation).

  4. using n.3, then run registercloudguest($instance) with checks like in run_ltp.

  5. be aware if the system would be transactional you need to add dedicated install (tr-up) and reboot actions, being Private-AI defined on SL micro.

my $instance;
select_host_console();

my $aws_test = get_var('PUBLIC_CLOUD_AWS_TEST', 'basic_sanity');
Copy link
Contributor

@m-dati m-dati Aug 23, 2024

Choose a reason for hiding this comment

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

Being (Private) AI the effective context needing such test, IMHO related parameters should also evoke and reference to AI, having for publiccloud specific parameter with similar meanings.
This is why I suggest here and elsewhere needed in that project, a different name than ...AWS_TEST, where even AWS could in future be another CSP, to be more related to the AI project.
It should mean: p.c.instance available/1 or not/0, like i.e. longer but clear PUBLIC_CLOUD_INSTANCE_FOR_AI or else (and variable updated too, accordingly, like i.e.: $has_instance 🙂).

Note: here we should use PUBLIC_CLOUD_QAM created for that instance status scope, but let we create a new one to keep separated AI project activities.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -0,0 +1,89 @@
use Mojo::Base 'publiccloud::basetest';
Copy link
Contributor

@m-dati m-dati Aug 23, 2024

Choose a reason for hiding this comment

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

CI still claiming tidy not ok.
Before to push your changes I suggest to run in your local repo the command tools/tidy <path/to/changed_file> (eventual issue, add ... --force)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@m-dati
Copy link
Contributor

m-dati commented Sep 24, 2024

The CI detected tidy missing, see i.e. L#16 in function call's space before arguments and many similar other.
Needed: tools/tidy tests/publiccloud/aistack_basic.pm, rebase, push -f ...

@yarunachalam
Copy link
Contributor Author

@m-dati
Copy link
Contributor

m-dati commented Sep 30, 2024

Sorry, still a comment about CI failure 😄

  1. https://github.com/os-autoinst/os-autoinst-distri-opensuse/actions/runs/11027316476/job/30625398539?pr=2_0015#step:6:15 ,
    about migration_autoyast.yaml and mau-extratests2.yaml errors;

  2. https://github.com/os-autoinst/os-autoinst-distri-opensuse/actions/runs/11027316416/job/30625398972?pr=20015#step:5:17 ,
    see the CI scheduled OOO test, the ssh -oBatchMode=yes: command not found and also see in previous results last passed is before your MR run, all other next failed: somethings in schedule.

}

registercloudguest($instance) if is_byos();
registercloudguest($instance) if (is_byos() && !$aws_ai_test);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems you didn't deleted previous line100 old-version 🙂 : typo?

#credentials from openwebui
#my $admin_username = get_var('OPENWEBUI_ADMIN');
#my $admin_password = get_var('OPENWEBUI_PASSWD');
#my $openwebui_hostname = get_var('OPENWEBUI_HOSTNAME');
Copy link
Contributor

Choose a reason for hiding this comment

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

Can those commented lines be deleted, unless you still need it for some reason?

Comment on lines +107 to +130
#validate_openwebui($admin_username, $admin_password, $openwebui_hostname);
# Verify Ollama api endpoint
#verify_api_endpoint();
# Milvus DB Test
#milvus_db_test();
# Milvus DB Test
#milvus_db_test();
# OpenWebUI Integration test
#test_openwebui_interaction();
Copy link
Contributor

@m-dati m-dati Oct 15, 2024

Choose a reason for hiding this comment

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

same comment as for commented lines: can we delete deactivated code?

@m-dati
Copy link
Contributor

m-dati commented Oct 15, 2024

Please, note we that CI failiing may be related to missing module call, as mentioned in #20384 (comment).

Copy link

github-actions bot commented Oct 15, 2024

Great PR! Please pay attention to the following items before merging:

Files matching lib/**.pm:

  • Consider adding or extending unit tests in t/

Files matching lib/publiccloud/**.pm:

  • Provide VRs for both QE-C as well as QE-SAP (check Confluence for more info)

This is an automatically generated QA checklist based on modified files.

Comment on lines 9 to 10
# - Create VM in EC2 SLE-Micro-6-0-BYOS.x86_64-1.0.0-EC2-Build1.36.raw.xz
# - Installs required dependency to install aistack helmchart and containers
Copy link
Contributor

Choose a reason for hiding this comment

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

One spaces here at each line end, to delete for C.I. tidy :)

@yarunachalam
Copy link
Contributor Author

Closing this ticket and redirected the aistack test in new ticket #20427

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.

3 participants