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

Bug 1661539 - Add Glean to a iOS megazord build #3554

Merged
merged 7 commits into from
Sep 10, 2020

Conversation

badboy
Copy link
Member

@badboy badboy commented Sep 7, 2020

This is a first try in adding Glean as a submodule to incorporate it into a iOS megazord build.
If this lands firefox iOS will also require updates (similar to the PoC in mozilla-mobile/firefox-ios@main-dev...badboy:megazord-appservices-glean)

So far this was reasonably easy and I only need 2 small Swift changes to make it work (both of which can be later mitigated on the Glean side again).

I managed to build Firefox iOS locally from this branch.
I'm not sure if having the git submodule update in the build-all-ios.sh script is actually enough, but I think that one is run on all iOS platforms, so it's good enough?

cc @travis79, @Dexterp37, @mdboom for Glean.

Pull Request checklist

  • Quality: This PR builds and tests run cleanly
    • automation/all_tests.sh runs to completion and produces no failures
    • Note: For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGES_UNRELEASED.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due dilligence applied in selecting them.

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2020

Codecov Report

Merging #3554 into main will increase coverage by 7.20%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3554      +/-   ##
==========================================
+ Coverage   69.47%   76.67%   +7.20%     
==========================================
  Files         230      230              
  Lines       30879    30879              
==========================================
+ Hits        21453    23677    +2224     
+ Misses       9426     7202    -2224     
Impacted Files Coverage Δ
components/fxa-client/src/device.rs 78.21% <0.00%> (+1.83%) ⬆️
components/support/guid/src/lib.rs 97.94% <0.00%> (+2.56%) ⬆️
components/viaduct/src/headers.rs 72.47% <0.00%> (+2.75%) ⬆️
components/support/rc_crypto/nss/src/ec.rs 94.49% <0.00%> (+3.21%) ⬆️
components/sync15/src/key_bundle.rs 85.58% <0.00%> (+3.60%) ⬆️
components/support/sync15-traits/src/telemetry.rs 92.39% <0.00%> (+5.07%) ⬆️
components/sync15/src/bso_record.rs 98.48% <0.00%> (+5.55%) ⬆️
components/support/rc_crypto/src/hawk_crypto.rs 89.70% <0.00%> (+5.88%) ⬆️
components/sync15/src/request.rs 95.25% <0.00%> (+6.67%) ⬆️
...ents/support/sync15-traits/src/server_timestamp.rs 87.71% <0.00%> (+7.01%) ⬆️
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac07ea8...0c1dece. Read the comment docs.

* internally it defers to the same string implementation.
* Because Glean is added as a submodule it's easier to change this occurence than it it to change the one of Glean.
*/
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious what the underlying conflict was here - was it swift complaining about trying to add two extension methods with the same name on the String class?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we have the same extension to String with the same named parameter.
I actually propose to rename it on our side (s/Rust/Glean/) to avoid the conflict, but as I also want to submodule based on the release commit this has to be defered to the next release.

Copy link
Contributor

@Dexterp37 Dexterp37 left a comment

Choose a reason for hiding this comment

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

I like this!

Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

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

This looks reasonable enough to me, thanks @badboy for taking this on!

rfk
rfk previously approved these changes Sep 8, 2020
Copy link
Contributor

@rfk rfk left a comment

Choose a reason for hiding this comment

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

Great! Let's get this in a release and try it out.

@badboy do you have any other tweaks you wanted to try here, or should we merge this as-is and cut a new release?

@rfk
Copy link
Contributor

rfk commented Sep 8, 2020

From conversation with @garvankeeley, let's also merge #3556 before making a new release with this.

@rfk
Copy link
Contributor

rfk commented Sep 8, 2020

Also could you please try re-running the dependency-list-generator script? It looks like something has gotten out of date.

@badboy
Copy link
Member Author

badboy commented Sep 9, 2020

I rebased on main and then re-ran tools/regenerate_dependency_summaries.sh, though the files didn't actually change from the last commit.

Force-pushing again to see what CI thinks.

@mergify mergify bot dismissed rfk’s stale review September 9, 2020 12:56

The pull request has been modified, dismissing previous reviews.

@badboy
Copy link
Member Author

badboy commented Sep 9, 2020

I've ran the exact same commands CI runs but it doesn't fail locally.
Unfortuantely CI is not very chatty about what exactly differs.

@rfk
Copy link
Contributor

rfk commented Sep 10, 2020

I've ran the exact same commands CI runs but it doesn't fail locally.

I see similar when trying this locally :-(

I'm going to go ahead and merge this and if it's still failing, I'll be better situated to fix it up locally.

@rfk rfk merged commit 9ce6889 into mozilla:main Sep 10, 2020
@rfk
Copy link
Contributor

rfk commented Sep 10, 2020

Ref #3565 for further investigation of the dependency issue.

@garvankeeley
Copy link
Contributor

mozilla-mobile/firefox-ios#7303 is landed on iOS, locally I am building and running and it works well.

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.

6 participants