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

#1959-Stage SIMS Prod #2008

Conversation

guru-aot
Copy link
Collaborator

@guru-aot guru-aot commented Jun 12, 2023

Redis cluster command changed, as part of makefile to run in any terminal(Windows/ mac/ Linux).

  • Issue was when trying to get the jsonpath oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 in mac it appends an additional :6379at the end, so to solve it removing the generated one using the sed command.
  • Also running the oc commands inside the redis-cli was not working, so created variables to fetch the commands output and ran the cluster creation.

Documentation and wiki documentation are updated

README.md Outdated Show resolved Hide resolved
@@ -286,7 +286,9 @@ deploy-redis:
# Command to initialize the redis cluster.
# Make sure that all the redis pods are up and running before initializing the cluster.
init-redis-cluster:
@oc exec -n $(NAMESPACE) -it redis-0 -- redis-cli -a $(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d) --cluster create --cluster-replicas 1 $(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')
REDIS_PASSWORD=$$(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d); \
REDIS_NODES=$$(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 ' | sed 's/ :6379 $$/ /'); \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the command
oc get pods -n 0c27fb-dev -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 ' | sed 's/ :6379 $$/ /'
Is still returning the extra :6379 at the end, as shown below. Is it the expectation?
10.97.50.200:6379 10.97.38.75:6379 10.97.70.236:6379 10.97.94.99:6379 10.97.56.98:6379 10.97.101.99:6379 :6379

Copy link
Collaborator Author

@guru-aot guru-aot Jun 12, 2023

Choose a reason for hiding this comment

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

The idea is when the command is run via a makefile it trims the last 6379
image

image

Dont ask me how it does, but it does 😄 .

The above screenshot is an example of echoing the variable REDIS_NODES by changing the makefile command.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see that echo is correctly printing it. Thanks for the explanation 😉

@sonarcloud
Copy link

sonarcloud bot commented Jun 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

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

Nice fix, looks good 👍

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. As discussed we can have a ticket created for platform agnostic script which works on all types of terminal.

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

👍

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.91% ( 2086 / 11648 )
Methods: 8.27% ( 123 / 1488 )
Lines: 20.68% ( 1827 / 8835 )
Branches: 10.26% ( 136 / 1325 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 49.81% ( 267 / 536 )
Methods: 41.56% ( 32 / 77 )
Lines: 55.33% ( 218 / 394 )
Branches: 26.15% ( 17 / 65 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 69.4% ( 390 / 562 )
Methods: 59.15% ( 42 / 71 )
Lines: 71.52% ( 344 / 481 )
Branches: 40% ( 4 / 10 )

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 43.54% ( 3032 / 6964 )
Methods: 37.75% ( 339 / 898 )
Lines: 48.6% ( 2526 / 5197 )
Branches: 19.22% ( 167 / 869 )

@guru-aot guru-aot merged commit e7d5615 into release/v1.0.0 Jun 12, 2023
@guru-aot guru-aot deleted the #1959-Stage_SIMS_PROD_environment_Redis_Cluster_And_Documentation branch October 25, 2023 20:34
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.

4 participants