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

[WIP]Changed code architecture in Environment handler to use interface #4123

Closed
wants to merge 2 commits into from

Conversation

punithnayak
Copy link
Contributor

@punithnayak punithnayak commented Aug 10, 2023

Signed-off-by: Punith nayak [email protected]

Proposed changes

Summarize your changes here to communicate with the maintainers and make sure to put the link of that issue

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

#4121

Special notes for your reviewer:

@SohamRatnaparkhi
Copy link
Contributor

Please check the DCO. You haven't signed your commits.

@punithnayak
Copy link
Contributor Author

Hey @Saranya-jena
Could you kindly confirm if this is what you wanted? If necessary, please provide any specific details or modifications to make it

@Saranya-jena
Copy link
Contributor

Did you run the graphql server? I see there are no changes in files calling these functions.

@SohamRatnaparkhi
Copy link
Contributor

@punithnayak, you will need to make necessary changes wherever these functions are being called. Previously, the functions weren't being implemented by any interface, and hence they could be directly called by importing the package (packageName.function()).
However, with the recent changes you have made in this PR, a struct of type EnvironmentHandler, which will be returned by the NewEnvHandler method you have added, needs to be created in the file where these functions are intended to be called using it. (my_struct_variable_name.function()).

You can probably checkout service.go in chaos-experiments or chaos-experiment-runs package as it has a similar interface-struct implementation.

@Saranya-jena
Copy link
Contributor

Closing this PR due to inactivity

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