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

CLI create project --manager creates a manager module #1410

Open
10 tasks
techcobweb opened this issue Mar 15, 2023 · 10 comments
Open
10 tasks

CLI create project --manager creates a manager module #1410

techcobweb opened this issue Mar 15, 2023 · 10 comments
Assignees
Labels
cli Galasa CLI documentation Improvements or additions to documentation good first issue Good for newcomers OMP Summer Mentorship These stories are set aside for the mentee to complete as part of the OMP Summer Mentorship

Comments

@techcobweb
Copy link
Contributor

techcobweb commented Mar 15, 2023

Story

As a galasa testcase developer I want to use the galasa CLI to create a new project of an example manager, and an extra test class which uses that manager, and an entry in the OBR which refers to that manager

Background

This would be a good feature to then go on and talk about the manager in the docs.

galasactl project create --manager ... would create a manager.

The manager name could optionally be gathered from the CLI syntax. For example with a --managerName xxx parameter. Then we can use that to name the project folder, and manager annotation...etc.

We already have the --package <java-package> parameter for the base package, and bundle.

We should create the new bundle with the manager inside called xxx.manager

What does the manager code actually do ?

  • Create an annotation, which can inject a custom object into the testcase.
  • Support the cleanup and other lifecycle methods.

I suggest we look at the docker manager for the best example we have. Some of our existing managers are not written anywhere near that.

Tasks

  • Finalise syntax of the CLI (text in this story),
  • Arrange a review of the proposed syntax
  • Add the new parameters to the CLI
  • Generate the new manager project + unit tests
  • Review of the generated code output by the tool
  • OBR generated adds the manager project
  • Manager is a skeleton but does something useful but with no further dependencies
  • Test to generate the manager using the tool added to .build-locally.sh + it builds
  • Docs updated in the README.md file with syntax
  • Docs explaining what got generated, and why you might like to do so (@CaroMac can help with this if the readme and this story have enough detail)
@techcobweb techcobweb added the cli Galasa CLI label Mar 15, 2023
@techcobweb techcobweb moved this to 📋 Backlog in galasa-dev team Mar 30, 2023
@techcobweb techcobweb added the good first issue Good for newcomers label Oct 31, 2023
@aadityasinha-dotcom
Copy link

Hi @techcobweb is this issue available?

@techcobweb
Copy link
Contributor Author

techcobweb commented May 29, 2024

Yes, @aadityasinha-dotcom we have nobody looking at this right now, with no outlook of when we might resource it.

Is the story clear enough to attempt the suggested tasks ?

Skills required:

  • Golang
  • Moustache templates
  • Cobra command library
  • OSGi bundles and wiring
  • Bash (modified build test script)

@aadityasinha-dotcom
Copy link

Hi @techcobweb, thanks for the reply. I did tried the galasa-cli. Like when we create a Galasa project we add flags like --package, here for this issue we need a --manager flag which will create a manager class and will take the manager name from the cli syntax.
The thing I want to know is where can I see manager examples in galasactl.

@techcobweb
Copy link
Contributor Author

https://github.com/galasa-dev/managers/tree/main/galasa-managers-parent/galasa-managers-cloud-parent/dev.galasa.cloud.manager is an example of a manager. There are lots of other managers in that repository. Does that help?

@techcobweb
Copy link
Contributor Author

Aaditya Sinha

Hi, Update: I managed to resolved the error, had to do some changes in the build file
Now I will start working on the project create --manager issue, thanks for the help

Mike Cobbett

That's super news. Very interested to see how you get on.

Aaditya Sinha

thanks

Aaditya Sinha

Hi, sorry I didn't post the update to you. I was sick for a week
Here's the update on the manager module, I have added the the flag --manager which will create the manager folder having .bnd, gradle and pom.xml with a src directory.
Currently I am working on adding the template files for the manager class which were in the managers repo that you gave me.

Mike Cobbett

Sry for not getting back also, I've been on vacation. Back now. That sounds amazing. Really keen to see it in action ! Any time you want me/the team to review a pull request please raise it (even if it's draft).

@techcobweb
Copy link
Contributor Author

See PR galasa-dev/cli#256

@techcobweb
Copy link
Contributor Author

Messaged with @aadityasinha-dotcom today about some more background information.

@techcobweb techcobweb added the documentation Improvements or additions to documentation label Jul 29, 2024
@Mark-J-Lawrence
Copy link

FYI - @techcobweb @Jimbo4794 I've now finished putting together an example manager that's self-documenting containing an example of resource management.
This is going into the internal CICS Galasa manager creation wizard, but could be contributed here also.

@techcobweb
Copy link
Contributor Author

com.ibm.cics.galasa.blahhh.manager.zip
Authored by Mark-J-Lawrence

This zip file contains an example we might like to encode in templates.

blahhh being the manager name, which would be tokenized.

java package names are also tokenized of course.

@Mark-J-Lawrence
Copy link

Should it help.....here is our tokenised version of the manger
example-manager-tokenised.zip

@techcobweb techcobweb added the OMP Summer Mentorship These stories are set aside for the mentee to complete as part of the OMP Summer Mentorship label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Galasa CLI documentation Improvements or additions to documentation good first issue Good for newcomers OMP Summer Mentorship These stories are set aside for the mentee to complete as part of the OMP Summer Mentorship
Projects
Status: 📋 5 Backlog
Development

No branches or pull requests

3 participants