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

chore: test android workflow #619

Merged
merged 36 commits into from
Jan 16, 2025
Merged

chore: test android workflow #619

merged 36 commits into from
Jan 16, 2025

Conversation

markphelps
Copy link
Contributor

@markphelps markphelps commented Jan 4, 2025

@erka this should now download the pre-built android libs from the package-ffi workflow and (hopefully) move them to the correct location in the flipt-client-android-kotlin directory.

Now all that should be left is to get the emulator to start 🤞🏻

Signed-off-by: Mark Phelps <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.60%. Comparing base (2b1546d) to head (f28d41e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #619   +/-   ##
=======================================
  Coverage   85.60%   85.60%           
=======================================
  Files           7        7           
  Lines        3910     3910           
=======================================
  Hits         3347     3347           
  Misses        563      563           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

markphelps and others added 17 commits January 4, 2025 11:41
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Roman Dmytrenko <[email protected]>
Signed-off-by: Roman Dmytrenko <[email protected]>
@erka erka force-pushed the android-sdk-tests branch 3 times, most recently from fd7c09a to bc2b4f6 Compare January 8, 2025 12:10
Signed-off-by: Roman Dmytrenko <[email protected]>
@erka erka force-pushed the android-sdk-tests branch from fec95b6 to e072cf5 Compare January 8, 2025 13:10
@erka
Copy link
Collaborator

erka commented Jan 11, 2025

Just can't crack it.... I tried to add the AndroidManifest.xml with network_security_config.xml but it doesn't make any difference for me. The emulator doesn't see the external Flipt instance with gradlew cAT. It works in webview or Chrome however... I am stuck.

@markphelps
Copy link
Contributor Author

Just can't crack it.... I tried to add the AndroidManifest.xml with network_security_config.xml but it doesn't make any difference for me. The emulator doesn't see the external Flipt instance with gradlew cAT. It works in webview or Chrome however... I am stuck.

Dang I tried something similar before I saw your comment.. I just dont get why it wouldnt work in actions. Maybe we could try specifying the DNS server (https://developer.android.com/studio/run/emulator-networking#dns) although seems that might not help since we're trying to connect to a local IP

Signed-off-by: Mark Phelps <[email protected]>
@erka
Copy link
Collaborator

erka commented Jan 13, 2025

@markphelps I tried the random sample for okhttp test and run it along side TestFliptEvaluationClient and it works. I hard-coded the url in the ffi engine and it worked (something wrong with list flags but it's minor). Something is wrong with serde of engine ffi options and as result it uses default.

@markphelps
Copy link
Contributor Author

Thank you for digging in @erka ! I will take a look at this today and try to determine why the engine isn't getting the correct options.

@erka
Copy link
Collaborator

erka commented Jan 14, 2025

@markphelps there is an issue with authentication. In kotlin the auth object is serialized to json like "authentication":{"type":"client_token","client_token":"..."}. The type is unexpected field and serde fails because it can't match anything in enum.

@markphelps
Copy link
Contributor Author

@markphelps there is an issue with authentication. In kotlin the auth object is serialized to json like "authentication":{"type":"client_token","client_token":"..."}. The type is unexpected field and serde fails because it can't match anything in enum.

legend. thank you for finding this! should be easy to fix

markphelps and others added 7 commits January 14, 2025 11:16
…-client-sdks into android-sdk-tests

* 'android-sdk-tests' of https://github.com/flipt-io/flipt-client-sdks:
  build(deps-dev): bump rollup in /flipt-client-browser (#636)
  build(deps-dev): bump undici in /flipt-client-browser (#634)
  build(deps-dev): bump typescript in /flipt-client-browser (#635)
  build(deps): bump com.diffplug.spotless in /flipt-client-java (#633)
  build(deps-dev): bump @typescript-eslint/eslint-plugin (#632)
  build(deps-dev): bump @typescript-eslint/parser in /flipt-client-react (#629)
  build(deps): bump pydantic from 2.10.4 to 2.10.5 in /flipt-client-python (#627)
  build(deps): bump actions/setup-java from 3 to 4 (#626)
Signed-off-by: Mark Phelps <[email protected]>
@erka
Copy link
Collaborator

erka commented Jan 15, 2025

@markphelps It looks like we crack it... There is few things which should be probably addressed. Flipt instance has not auth right now, right? Another - this awkward not to see the Android action in PR itself...

@markphelps markphelps marked this pull request as ready for review January 16, 2025 16:04
@markphelps markphelps requested a review from a team as a code owner January 16, 2025 16:04
@markphelps
Copy link
Contributor Author

Thank you @erka for all the hard work on this!!

There is few things which should be probably addressed. Flipt instance has not auth right now, right? Another - this awkward not to see the Android action in PR itself.

So yeah we could/should probably configure Flipt with auth here. I will do that.

As for the PR / action, once this is merged it should actually run as part of the PR process since the Package FFI Engine runs on PR and then calls the Test Android SDK workflow once complete. Once this is merged we can make it a required check

@kodiakhq kodiakhq bot merged commit 869ceaa into main Jan 16, 2025
25 checks passed
@kodiakhq kodiakhq bot deleted the android-sdk-tests branch January 16, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants