Skip to content

Conversation

@yashikakhurana
Copy link
Contributor

@yashikakhurana yashikakhurana commented Nov 2, 2023

Because

  • We have a demo app that can test the integration end to end, it has the frontend and backend.
  • We could stand up the experimenter, launch the experiment or rollout, and push to RS, Cirrus can sync to RS and then the frontend can send a request to the backend and then backend can reach out to Cirrus and can ask for the feature config
  • When the backend receives the response, can send the response back to the frontend

This commit

  • Tests end-to-end integration between the experimenter, RS, Cirrus, and Demo app
  • Test both the experiment and rollout end to end

fixes #9387

@yashikakhurana yashikakhurana marked this pull request as ready for review November 2, 2023 18:38
@yashikakhurana
Copy link
Contributor Author

okay all done 🎉

Copy link
Collaborator

@jaredlockhart jaredlockhart left a comment

Choose a reason for hiding this comment

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

Wow wow wow wow wow!!!!!!! Look at it go!!!! This is fantastic @yashika-khurana I'm so happy to see this let's get this landed ASAP and then we can really start digging into working on and improving Cirrus safely 🙏 🙏 🙏 🙏 🙏

This makes me 😻 😻 😻 😻 😻

nimbus/test_demo_app_integration.py::test_create_new_rollout_approve_remote_settings_demo_app[DEMO_APP] PASSED [ 50%]
nimbus/test_demo_app_integration.py::test_create_new_experiment_approve_remote_settings_demo_app[DEMO_APP] PASSED [100%]

Great job ❤️



@pytest.mark.demo_app
def test_create_new_rollout_approve_remote_settings_demo_app(
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉

Comment on lines +60 to +65
navigate_to_demo_app_frontend(selenium)
result_text_element = WebDriverWait(selenium, 10).until(
EC.presence_of_element_located(
(By.XPATH, "//h1[contains(text(), 'Not Enrolled')]")
)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to wrap this in one of the selenium Page object wrappers. We could do that as a followup optimization to this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure let me note it down and can circle back later, great idea

Comment on lines -40 to +41
- "5000:5000"
- "5050:5050"
Copy link
Collaborator

Choose a reason for hiding this comment

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

5000 no good? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was getting port used on my machine everytime so I switched it

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a mac thing, something is broadcasting on port 5000

Copy link
Collaborator

Choose a reason for hiding this comment

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

Aaaaaahhhhh

Comment on lines +25 to +29
sleep_thread = threading.Thread(
target=self.non_blocking_sleep, args=(10,)
)
sleep_thread.start()
sleep_thread.join() # Wait for the thread to finish sleeping
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's the little improvement I made to help the test run locally successfully, what I was noticing that refresh was always going on the main thread and was not letting RS to do task, as soon as refreshes stopped, RS kicked in but at that time test was getting failed already because they were not able to find the right status, so with this optimization tests works 💯

@yashikakhurana yashikakhurana added this pull request to the merge queue Nov 3, 2023
Merged via the queue into mozilla:main with commit 51e43b7 Nov 3, 2023
@yashikakhurana yashikakhurana deleted the 9387/cirrus_demo_app_integration_tests branch November 3, 2023 20:09
@b4handjr
Copy link
Contributor

b4handjr commented Nov 3, 2023

Didn't get to review this but there are a few optimizations I see already. Please be sure to open a follow-up ticket so I can share my thoughts some more. Overall, this is great and thanks for getting it done!

jeddai pushed a commit to jeddai/experimenter that referenced this pull request Nov 6, 2023
…illa#9658)

Because

- We have a demo app that can test the integration end to end, it has
the frontend and backend.
- We could stand up the experimenter, launch the experiment or rollout,
and push to RS, Cirrus can sync to RS and then the frontend can send a
request to the backend and then backend can reach out to Cirrus and can
ask for the feature config
- When the backend receives the response, can send the response back to
the frontend

This commit

- Tests end-to-end integration between the experimenter, RS, Cirrus, and
Demo app
- Test both the experiment and rollout end to end

fixes mozilla#9387
@yashikakhurana
Copy link
Contributor Author

Didn't get to review this but there are a few optimizations I see already. Please be sure to open a follow-up ticket so I can share my thoughts some more. Overall, this is great and thanks for getting it done!

Hi @jrbenny35 sure absolutely, please feel free to leave your comments here I will make sure to file a follow up tickets, or you can also add tickets here and please assign it to me, jira epic, or we can chat and i will file all the ticket, and sorry about that

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.

integration test end to end for demo app

3 participants