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

Seperate call to retrieve namespace list and retrieve KubeObject for only a single namespace #4680

Merged

Conversation

Calvinaud
Copy link
Contributor

@Calvinaud Calvinaud commented May 30, 2024

Proposed changes

Split the KubeObject in two to avoid timeout.

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

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Update objectmodel and subscriber to incldue KubeNamespace

Signed-off-by: Calvin Audier <[email protected]>
Regenerating model with gqlgen.

Signed-off-by: Calvin Audier <[email protected]>
Rename getKubeNamespace function that didn't match graphqls operation in Subscription
Add missing function for the graphql server to retrieve list of namespace

Signed-off-by: Calvin Audier <[email protected]>
…ince subscriber will only return one element.

Signed-off-by: Calvin Audier <[email protected]>
@Calvinaud Calvinaud marked this pull request as draft May 30, 2024 09:20
@Calvinaud Calvinaud changed the title Feature/seperate namespace call Seperate call to retrieve namespace list and only retrieve KubeObject for only a single namespace May 30, 2024
@Calvinaud Calvinaud changed the title Seperate call to retrieve namespace list and only retrieve KubeObject for only a single namespace Seperate call to retrieve namespace list and retrieve KubeObject for only a single namespace May 30, 2024
@Calvinaud Calvinaud marked this pull request as ready for review May 30, 2024 14:31
Removing some unused code

Signed-off-by: Calvin Audier <[email protected]>
Copy link
Member

@hrishavjha hrishavjha left a comment

Choose a reason for hiding this comment

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

FE changes LGTM!

- Add some trailing comma
- Trying transform subscription function to resolve "non-arrow functions are forbidden"
- Add null check

Signed-off-by: Calvin Audier <[email protected]>
- Adding trailing comma
- Re-ordering by alphabetic order some parameters

Signed-off-by: Calvin Audier <[email protected]>
@Jonsy13
Copy link
Contributor

Jonsy13 commented Aug 23, 2024

Hi @Calvinaud , Thanks for this contribution.
Can you please add screenshots validating your changes.

@Calvinaud
Copy link
Contributor Author

Calvinaud commented Aug 23, 2024

Hello

First call that retrieve only the namespace:
image

Second call that retrieve labels
image

Docker image used (tag: "separate-call"):

@Saranya-jena Saranya-jena merged commit 1165445 into litmuschaos:master Sep 6, 2024
16 of 19 checks passed
andoriyaprashant pushed a commit to andoriyaprashant/litmus that referenced this pull request Sep 7, 2024
…only a single namespace (litmuschaos#4680)

* Create a seperate function to get Namespace in subscriber

Signed-off-by: Calvin Audier <[email protected]>

* Update graphql server to include KubeNamespace call (model not generated)

Signed-off-by: Calvin Audier <[email protected]>

* Update graphqls to include KubeNamespace model
Update objectmodel and subscriber to incldue KubeNamespace

Signed-off-by: Calvin Audier <[email protected]>

* Fix issue in graphqls and adding KubeNamespace type.
Regenerating model with gqlgen.

Signed-off-by: Calvin Audier <[email protected]>

* Update model to includude missing field in KubeNamespaceData
Rename getKubeNamespace function that didn't match graphqls operation in Subscription
Add missing function for the graphql server to retrieve list of namespace

Signed-off-by: Calvin Audier <[email protected]>

* Add remaining function in k8s pkg and requests to return list of namespace

Signed-off-by: Calvin Audier <[email protected]>

* Update graphql/subscriber to transform KubeObject to not be a array since subscriber will only return one element.

Signed-off-by: Calvin Audier <[email protected]>

* Update web server to seperate call for KubeObject and KubeNamespace.

Signed-off-by: Calvin Audier <[email protected]>

* Fix import with goimports

Signed-off-by: Calvin Audier <[email protected]>

* Reverting upgrade of  webpack-dev-server so it's compatible with github workflow

Signed-off-by: Calvin Audier <[email protected]>

* Run gofmt with correct version.

Signed-off-by: Calvin Audier <[email protected]>

* Bumping ubi-minimal:8.8 to 8.10 to fix some HIGH CVE severity detected by trivy.

Signed-off-by: Calvin Audier <[email protected]>

* Updating chaos_infrastructure mock to include KubeNamespace.
Fix a comment

Signed-off-by: Calvin Audier <[email protected]>

* Fix issue from Codacy
Removing some unused code

Signed-off-by: Calvin Audier <[email protected]>

* Fix codacy issue:
- Add some trailing comma
- Trying transform subscription function to resolve "non-arrow functions are forbidden"
- Add null check

Signed-off-by: Calvin Audier <[email protected]>

* Continue fix Codacy issue
- Adding trailing comma
- Re-ordering by alphabetic order some parameters

Signed-off-by: Calvin Audier <[email protected]>

---------

Signed-off-by: Calvin Audier <[email protected]>
Signed-off-by: Calvinaud <[email protected]>
Co-authored-by: Namkyu Park <[email protected]>
Co-authored-by: Saranya Jena <[email protected]>
Signed-off-by: andoriyaprashant <[email protected]>
andoriyaprashant pushed a commit to andoriyaprashant/litmus that referenced this pull request Sep 7, 2024
…only a single namespace (litmuschaos#4680)

* Create a seperate function to get Namespace in subscriber

Signed-off-by: Calvin Audier <[email protected]>

* Update graphql server to include KubeNamespace call (model not generated)

Signed-off-by: Calvin Audier <[email protected]>

* Update graphqls to include KubeNamespace model
Update objectmodel and subscriber to incldue KubeNamespace

Signed-off-by: Calvin Audier <[email protected]>

* Fix issue in graphqls and adding KubeNamespace type.
Regenerating model with gqlgen.

Signed-off-by: Calvin Audier <[email protected]>

* Update model to includude missing field in KubeNamespaceData
Rename getKubeNamespace function that didn't match graphqls operation in Subscription
Add missing function for the graphql server to retrieve list of namespace

Signed-off-by: Calvin Audier <[email protected]>

* Add remaining function in k8s pkg and requests to return list of namespace

Signed-off-by: Calvin Audier <[email protected]>

* Update graphql/subscriber to transform KubeObject to not be a array since subscriber will only return one element.

Signed-off-by: Calvin Audier <[email protected]>

* Update web server to seperate call for KubeObject and KubeNamespace.

Signed-off-by: Calvin Audier <[email protected]>

* Fix import with goimports

Signed-off-by: Calvin Audier <[email protected]>

* Reverting upgrade of  webpack-dev-server so it's compatible with github workflow

Signed-off-by: Calvin Audier <[email protected]>

* Run gofmt with correct version.

Signed-off-by: Calvin Audier <[email protected]>

* Bumping ubi-minimal:8.8 to 8.10 to fix some HIGH CVE severity detected by trivy.

Signed-off-by: Calvin Audier <[email protected]>

* Updating chaos_infrastructure mock to include KubeNamespace.
Fix a comment

Signed-off-by: Calvin Audier <[email protected]>

* Fix issue from Codacy
Removing some unused code

Signed-off-by: Calvin Audier <[email protected]>

* Fix codacy issue:
- Add some trailing comma
- Trying transform subscription function to resolve "non-arrow functions are forbidden"
- Add null check

Signed-off-by: Calvin Audier <[email protected]>

* Continue fix Codacy issue
- Adding trailing comma
- Re-ordering by alphabetic order some parameters

Signed-off-by: Calvin Audier <[email protected]>

---------

Signed-off-by: Calvin Audier <[email protected]>
Signed-off-by: Calvinaud <[email protected]>
Co-authored-by: Namkyu Park <[email protected]>
Co-authored-by: Saranya Jena <[email protected]>
Signed-off-by: andoriyaprashant <[email protected]>
sagnik3788 pushed a commit to sagnik3788/litmus that referenced this pull request Oct 5, 2024
…only a single namespace (litmuschaos#4680)

* Create a seperate function to get Namespace in subscriber

Signed-off-by: Calvin Audier <[email protected]>

* Update graphql server to include KubeNamespace call (model not generated)

Signed-off-by: Calvin Audier <[email protected]>

* Update graphqls to include KubeNamespace model
Update objectmodel and subscriber to incldue KubeNamespace

Signed-off-by: Calvin Audier <[email protected]>

* Fix issue in graphqls and adding KubeNamespace type.
Regenerating model with gqlgen.

Signed-off-by: Calvin Audier <[email protected]>

* Update model to includude missing field in KubeNamespaceData
Rename getKubeNamespace function that didn't match graphqls operation in Subscription
Add missing function for the graphql server to retrieve list of namespace

Signed-off-by: Calvin Audier <[email protected]>

* Add remaining function in k8s pkg and requests to return list of namespace

Signed-off-by: Calvin Audier <[email protected]>

* Update graphql/subscriber to transform KubeObject to not be a array since subscriber will only return one element.

Signed-off-by: Calvin Audier <[email protected]>

* Update web server to seperate call for KubeObject and KubeNamespace.

Signed-off-by: Calvin Audier <[email protected]>

* Fix import with goimports

Signed-off-by: Calvin Audier <[email protected]>

* Reverting upgrade of  webpack-dev-server so it's compatible with github workflow

Signed-off-by: Calvin Audier <[email protected]>

* Run gofmt with correct version.

Signed-off-by: Calvin Audier <[email protected]>

* Bumping ubi-minimal:8.8 to 8.10 to fix some HIGH CVE severity detected by trivy.

Signed-off-by: Calvin Audier <[email protected]>

* Updating chaos_infrastructure mock to include KubeNamespace.
Fix a comment

Signed-off-by: Calvin Audier <[email protected]>

* Fix issue from Codacy
Removing some unused code

Signed-off-by: Calvin Audier <[email protected]>

* Fix codacy issue:
- Add some trailing comma
- Trying transform subscription function to resolve "non-arrow functions are forbidden"
- Add null check

Signed-off-by: Calvin Audier <[email protected]>

* Continue fix Codacy issue
- Adding trailing comma
- Re-ordering by alphabetic order some parameters

Signed-off-by: Calvin Audier <[email protected]>

---------

Signed-off-by: Calvin Audier <[email protected]>
Signed-off-by: Calvinaud <[email protected]>
Co-authored-by: Namkyu Park <[email protected]>
Co-authored-by: Saranya Jena <[email protected]>
Signed-off-by: sagnik3788 <[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.

Reaching timeout when getting KubeObject on big cluster
6 participants