Hi everyone! We've just released Chrome Dev 121 (121.0.6155.2) for Android. It's now available on Google Play.
You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here.
If you find a new issue, please let us know by filing a bug.
In the vibrant city of Miami, Google Fiber proudly marked a decade of connecting lives and fostering community. The Miami GFiber team recently celebrated this milestone with sponsoring a movie night held on Brickell Key Properties, the very first property to get Google Fiber Webpass service in Miami in 2013.
Serving over 300 apartment and condominium communities across Miami, GFiber has offered fast, reliable connectivity for over a decade, and we’re continuing to connect new communities in the area every day.
We constantly work to make sure our customers get more than what they need from our service. "My community relies on GFiber for both excellent customer service and reliable internet, ensuring top-notch quality and speed at every stage," said Daniela Alvarez, a GFiber customer and Brickell Key resident.
Our GFiber Miami team loved marking the occasion with our customers and celebrating 10 truly great years. We can’t wait to see what’s next for GFiber in Miami. Thank you to our customers and communities who have shared this journey with us! To find out if GFiber is available in your building, check availability here.
Posted by Lyanne Alfaro, DevRel Program Manager, Google Developer Studio
Developer Journey is a monthly series highlighting diverse and global developers sharing relatable challenges, opportunities, and wins in their journey. Every month, we will spotlight developers around the world, the Google tools they leverage, and the kinds of products they are building.
This month we speak with global Google Developer Experts in Firebase, Women Techmakers, and beyond, to learn more about their favorite Google tools, the applications they’ve built to serve diverse communities, and their best advice for anyone just getting started as a developer.
Google Analytics and Firebase's A/B testing features have been pivotal in our data-driven approach, enabling continuous improvement in our conversion strategies. More recently, Bard has become a significant asset in developing new products and in our educational endeavors, especially with the introduction of our AI course. Its utility in both product development and educational settings is profound.
Which tool has been your favorite to use? Why?
If I had to choose, it would be Google Ads. Its ability to consistently drive new customers and provide unparalleled visibility to quality products is unmatched. While it may not traditionally be considered a 'tool' in the strictest sense, its impact on business growth and visibility is indisputable.
Please share with us about something you’ve built in the past using Google tools.
My entire business, Mercatitlán, has been built and scaled using Google Tools. We have cultivated a community of over 40,000 paid students, educating them on effective use of Google Ads, leveraging Bard for enhanced website content, and employing Google Analytics for strategic A/B testing to boost sales. The transformational impact of these tools on both my business and my students' ventures is a testament to their potential.
What will you create with Google Bard?
The integration of Bard AI into our daily operations is revolutionizing the way we approach digital marketing. Beyond its current uses in social media content creation, ad ideas generation, email composition, and customer support enhancement, we're exploring several innovative applications:
Personalized Marketing Campaigns: Using Bard AI, we can analyze customer data and preferences to create highly personalized marketing campaigns. This helps in delivering more relevant content to our audience, thereby increasing engagement and conversion rates.
Competitive Analysis: By analyzing competitor data, Bard AI can help us understand their strategies, strengths, and weaknesses. This intelligence is crucial for refining our marketing approach and differentiating our brand in the marketplace.
Content Optimization for SEO: Bard can assist in optimizing website and blog content for search engines. By understanding and integrating key SEO principles, it can help us rank higher in search results, thus improving our online visibility.
Automated Reporting and Insights: Automating the generation of marketing reports and insights with Bard saves time and resources, allowing our team to focus on strategy and creativity rather than manual data analysis.
What advice would you give someone starting in their developer journey?
The key is to start with action rather than waiting for perfection. Adopt a mindset focused on experimentation and analytics. This approach allows you to follow data-driven insights rather than solely relying on innovation, leading to significant societal impact through technology.
I have used a variety of Firebase services to build LINE chatbots for a number of years. These services have included Cloud Functions, Cloud Firestore, Cloud Storage, Firebase Hosting, and etc. Recently I have also used the PaLM API, a very powerful tool that allows me to build Generative AI chatbots.
Which tool has been your favorite to use? Why?
Firebase is my favorite tool because it is a platform that provides a complete set of tools for building and managing mobile, web, and chatbots. It is very easy to use and has a wide range of features that make it a great choice for developers of all levels. Furthermore, Firebase services have allowed me to scale my chatbots and make them more reliable.
Please share with us about something you’ve built in the past using Google tools.
LINE Developers TH is a chatbot that allows Thai developers to learn about LINE APIs and get started with building services. It also provides users with the ability to try out demos of LINE APIs.
TrueMoney is a wallet app that I have built in the past using Firebase. The app allows users to store money, send money, and pay bills. It is a very popular app in Thailand, with over 10 million users.
Sanook is an app that allows users to access news, articles, and other content from the number one web portal in Thailand on their mobile devices.
What will you create with Google Bard?
I would like to create a use case of building a powerful LINE chatbot using PaLM API and Firebase for developers. I believe this will be a great way to showcase the power of these tools and how they can be used to create innovative solutions.
What advice would you give someone starting in their developer journey?
First and foremost, I would encourage them to be curious and always be willing to learn new things. The world of technology is constantly changing, so it's important to stay up-to-date on the latest trends and technologies. This can be done by reading articles, attending conferences, and taking online courses.
Secondly, I would recommend that they find a mentor or role model who can help guide them on their journey. Having someone who has been through the process can be invaluable in providing support and advice. They can help you identify areas where you need to improve, and provide you with tips and tricks for success.
Finally, I would encourage them to never give up. The road to becoming a developer can be challenging, but it's also incredibly rewarding. If you're passionate about technology, then don't let anything stop you from pursuing your dreams.
I would say Firebase! It helped me to build web apps and explore new technologies easily while saving a lot of time and resources. Additionally, a lot of functionalities have been added recently. Over the years, I've witnessed its evolution, with the addition of numerous functionalities that continually enhance its utility and user experience. This constant innovation within Firebase not only simplifies complex tasks but also opens doors to creative possibilities in web app development.
Please share with us about something you’ve built in the past using Google tools.
I've been leading a project in partnership with the United Nations to help share information about its worldwide global goals. We used Firebase hosting and Cloud functions for the first release of the web app and it was a success! It felt very good to help create tools that support a good cause.
What will you create with Google Bard?
I'm experimenting with the current extensions to improve personal productivity. It's very interesting how you can improve the way that you do your daily tasks.
What advice would you give someone starting in their developer journey?
Remember that as a developer you will have the power to create! Use this power to build personal projects and combine it with things that you enjoy. You will start building a portfolio and have fun while learning. Finally, don't hesitate to find a mentor and connect with a community of developers to support and guidance in your journey. You can find a lot of help, improve your networking, and even have friends for life!
A team of Googlers focused on responsible innovation visited the Fort Peck Tribes in Montana to engage in relationship-building and bidirectional learning.
Today, we are thrilled to announce the stable release of Android Studio Hedgehog 🦔 : The official IDE for building Android apps!
In this Android Studio release, we have upgraded the IntelliJ platform to 2023.1, with features designed to improve app performance and battery life, make it easier to upgrade applications to the latest Android version, and make it faster to develop using Jetpack Compose. Read on to learn more about how Android Studio Hedgehog can help supercharge your developer productivity.
App performance
Android vitals in App Quality Insights
In addition to helping you investigate crash reports for apps instrumented with the Firebase Crashlytics SDK, App Quality Insights now also includes Android vitals data from Google Play Console. With Android vitals, you can see crash reports for any app you publish to the Google Play Store without requiring additional instrumentation in your app. You can view Android vitals issues, filter them, and see crash insights from Play to quickly understand and resolve the cause of a crash, and jump from stack trace to code all from the App Quality Insights tool window. Learn more.
Note: If you don't have permission to view your app in the Play Console, request that the app admin share read-only access to only app quality information, by clicking Users and permissions > View app quality information (read-only) in the Play Console.
Android Vitals data in App Quality Insights
Power Profiler
The new Power Profiler shows power consumption on devices. It segments the power consumption information by subsystems called "Power Rails". This helps you visualize the correlation between power consumed and the actions occurring in your app. This approach of directly measuring power consumption differs from the legacy Energy Profiler, which only used a model to estimate energy consumption.
By understanding this information, you can potentially identify and fix power consumption issues in your app by running A/B tests to compare the power consumption of different algorithms, features or even different versions of your app.
Apps which are optimized for lower power consumption lead to an improved battery and thermal performance, eventually leading to an improved end user experience. Power Rails data is available on Pixel 6+ devices running Android 10+.
Example of power consumption in different power rails.
Coding productivity
Target Android 14 using Android SDK Upgrade Assistant
The SDK Upgrade Assistant provides a step by step wizard flow to help developers through targetSdkVersion upgrades. It pulls documentation directly into the IDE, saving you time and effort.
Android Studio Hedgehog adds support for upgrading projects to Android 14 (API Level 34). We’ve also added additional relevance filters so that unnecessary steps are removed — and in some cases, the upgrade assistant will pinpoint exactly where in code the changes need to be made.
Android SDK Upgrade Assistant
New UI updates
In the Giraffe release, we launched a new UI for the IDE. This reimagined theme reduces visual complexity and provides easier access to essential features, resulting in a more modern and clean look and feel. We’ve listened to your feedback and, in Hedgehog, we’ve added updates for compact mode, vertical and horizontal splitting, and project tabs for Mac OS. If you have not yet tried the new UI, we encourage you to do so.
Compact mode in the New UI
Device mirroring
You can now mirror your physical Android device in the Running Devices window in Android Studio. While mirroring your device's display directly via ADB over USB or Wi-FI to Android Studio, you can execute common actions such as starting and interacting with apps, rotating the screen, folding and unfolding the phone, changing the volume, and more – directly from within Android Studio. Learn more.
Device Mirroring in the Running Devices window
Embedded Layout Inspector
You now have the option to run the Layout Inspector directly in the Running Devices tool window while running your app on an embedded virtual device or mirrored physical device. This opt-in feature significantly improves performance of Layout Inspector, conserves screen real estate, helps organize your UI debugging workflow in a single tool window, and improves speed while inspecting your layout. In embedded mode, you can show a view hierarchy, inspect the properties of each view, navigate to code using “deep inspect” mode, and access other common Layout Inspector features. Enable it through Settings > Experimental > Layout Inspector
Embedded Layout Inspector
Live Edit updated manual mode shortcut
Live Edit has a new default shortcut for manual mode for: Control+\ (Command+\ for macOS). Manual mode is helpful in situations where you want to have precise control over when updates are deployed to the running application. For more information, see the video clip in Live Edit for Jetpack Compose.
Compose tools
Compose Preview’s Gallery Mode
Gallery mode is a new mode in Compose Preview that lets you focus on one Preview at a time to conserve rendering resources. Use Gallery mode when iterating on UI and switch to other modes (Grid or List) when you need to see UI variants.
Compose Preview’s Gallery Mode
Compose State information in Debugger
When setting a breakpoint on a Composable function, the debugger now lists the parameters of the composable and their state, so you can more easily identify what changes might have caused unexpected recompositions.
Compose State information in Debugger
Compose Multipreview templates
Android Studio Hedgehog includes support for the latest annotations added by the Compose Multipreview API, allowing developers to render common layout scenarios side-by-side while working with the Compose Preview.
The new annotations added include: @PreviewScreenSizes, @PreviewFontScales, @PreviewLightDark, and @PreviewDynamicColors
Compose Multipreview templates
Build tools
New macro to specify JDK path
A new macro, #GRADLE_LOCAL_JAVA_HOME, makes it safer and easier to specify the Java* home path used for the Gradle daemon (background process) execution for your project by referencing your .gradle/config.properties file. This reduces errors related to incompatible Gradle and project JDK versions, since there is now a single source of truth for your Gradle JDK selection.
Starting with Android Studio Hedgehog, new projects will use #GRADLE_LOCAL_JAVA_HOME by default. Existing projects will automatically be migrated to the new macro after a successful sync, unless you're already using a macro like #JAVA_HOME.
[Windows-only] Minimize the impact of antivirus software on build speed
The Build Analyzer informs users if antivirus software may be impacting build performance. This can occur if antivirus software, such as Windows Defender, is performing real-time scanning of directories used by Gradle. Build Analyzer recommends a list of directories to exclude from active scanning, and, if possible, provides a link to add them to the Windows Defender folder exclusion list.
Use Firebase Test Lab devices with Gradle Managed Devices
Gradle Managed Devices can now target Firebase Test Lab devices, and you can utilize it to run your automated tests at scale. Use Gradle Managed Devices to select from a wide range range of both physical and virtual FTL devices, with support for test sharding for accelerated execution time. To use FTL devices, you need Android Gradle Plugin 8.2 with the latest Alpha version of the Firebase Test Lab Gradle plugin. Learn more.
Download Android Studio today!
Now is the time to download Android Studio Hedgehog to incorporate the new features into your workflow. As always, we appreciate any feedback on things you like, issues, or features you would like to see. If you find an issue, please check the known issues and file a bug if needed. Remember to also follow us on X (formerly known as Twitter), Medium, or YouTube for more Android development updates!
*Java is a trademark or registered trademark of Oracle and/or its affiliates.
OpenAPIv3 validation rules: Provide regex ('pattern' property), range limits ('minimum' and 'maximum' properties) on individual fields and size limits on maps and lists ('minItems', 'maxItems').
For use cases that cannot be covered by build-in validation support:
Admission Webhooks: have validating admission webhook for further validation
Custom validators: write custom checks in several languages such as Rego
While admission webhooks do support CRDs validation, they significantly complicate the development and operability of CRDs.
To provide an self-contained, in-process validation, an inline expression language - Common Expression Language (CEL), is introduced into CRDs such that a much larger portion of validation use cases can be solved without the use of webhooks.
It is sufficiently lightweight and safe to be run directly in the kube-apiserver, has a straight-forward and unsurprising grammar, and supports pre-parsing and typechecking of expressions, allowing syntax and type errors to be caught at CRD registration time.
CRD validation rule
CRD validation rules are promoted to GA in Kubernetes 1.29 to validate custom resources based on validation rules.
Validation rules use the Common Expression Language (CEL) to validate custom resource values. Validation rules are included in CustomResourceDefinition schemas using the x-kubernetes-validations extension.
The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. And self variable in the CEL expression is bound to the scoped value.
All validation rules are scoped to the current object: no cross-object or stateful validation rules are supported.
For example:
...
openAPIV3Schema:
type: object
properties:
spec:
type: object
x-kubernetes-validations:- rule:"self.minReplicas <= self.replicas"
message:"replicas should be greater than or equal to minReplicas."- rule:"self.replicas <= self.maxReplicas"
message:"replicas should be smaller than or equal to maxReplicas."
properties:...
minReplicas:
type: integer
replicas:
type: integer
maxReplicas:
type: integer
required:- minReplicas
- replicas
- maxReplicas
will reject a request to create this custom resource:
The CronTab "my-new-cron-object" is invalid:* spec: Invalid value: map[string]interface {}{"maxReplicas":10, "minReplicas":0, "replicas":20}: replicas should be smaller than or equal to maxReplicas.
x-kubernetes-validations could have multiple rules. The rule under x-kubernetes-validations represents the expression which will be evaluated by CEL. The message represents the message displayed when validation fails.
Note: You can quickly test CEL expressions in CEL Playground.
Validation rules are compiled when CRDs are created/updated. The request of CRDs create/update will fail if compilation of validation rules fail. Compilation process includes type checking as well.
Validation rules support a wide range of use cases. To get a sense of some of the capabilities, let's look at a few examples:
Validation Rule
Purpose
self.minReplicas <= self.replicas
Validate an integer field is less than or equal to another integer field
'Available' in self.stateCounts
Validate an entry with the 'Available' key exists in a map
self.set1.all(e, !(e in self.set2))
Validate that the elements of two sets are disjoint
self == oldSelf
Validate that a required field is immutable once it is set
self.created + self.ttl < self.expired
Validate that 'expired' date is after a 'create' date plus a 'ttl' duration
Validation rules are expressive and flexible. See the Validation Rules documentation to learn more about what validation rules are capable of.
CRD transition rules
Transition Rules make it possible to compare the new state against the old state of a resource in validation rules. You use transition rules to make sure that the cluster's API server does not accept invalid state transitions. A transition rule is a validation rule that references 'oldSelf'. The API server only evaluates transition rules when both an old value and new value exist.
Transition rule examples:
Transition Rule
Purpose
self == oldSelf
For a required field, make that field immutable once it is set. For an optional field, only allow transitioning from unset to set, or from set to unset.
(on parent of field)has(self.field) == has(oldSelf.field)
on field:self == oldSelf
Make a field immutable: validate that a field, even if optional, never changes after the resource is created (for a required field, the previous rule is simpler).
self.all(x, x in oldSelf)
Only allow adding items to a field that represents a set (prevent removals).
self >= oldSelf
Validate that a number is monotonically increasing.
Using the Functions Libraries
Validation rules have access to a couple different function libraries:
isUrl(self) && url(self).getHostname() in [a.example.com', 'b.example.com']
Validate that a URL has an allowed hostname.
self.map(x, x.weight).sum() == 1
Validate that the weights of a list of objects sum to 1.
int(self.find('^[0-9]*')) < 100
Validate that a string starts with a number less than 100
self.isSorted()
Validate that a list is sorted
Resource use and limits
To prevent CEL evaluation from consuming excessive compute resources, validation rules impose some limits. These limits are based on CEL cost units, a platform and machine independent measure of execution cost. As a result, the limits are the same regardless of where they are enforced.
Estimated cost limit
CEL is, by design, non-Turing-complete in such a way that the halting problem isn’t a concern. CEL takes advantage of this design choice to include an "estimated cost" subsystem that can statically compute the worst case run time cost of any CEL expression. Validation rules are integrated with the estimated cost system and disallow CEL expressions from being included in CRDs if they have a sufficiently poor (high) estimated cost. The estimated cost limit is set quite high and typically requires an O(n2) or worse operation, across something of unbounded size, to be exceeded. Fortunately the fix is usually quite simple: because the cost system is aware of size limits declared in the CRD's schema, CRD authors can add size limits to the CRD's schema (maxItems for arrays, maxProperties for maps, maxLength for strings) to reduce the estimated cost.
Good practice:
Set maxItems, maxProperties and maxLength on all array, map (object with additionalProperties) and string types in CRD schemas! This results in lower and more accurate estimated costs and generally makes a CRD safer to use.
Runtime cost limits for CRD validation rules
In addition to the estimated cost limit, CEL keeps track of actual cost while evaluating a CEL expression and will halt execution of the expression if a limit is exceeded.
With the estimated cost limit already in place, the runtime cost limit is rarely encountered. But it is possible. For example, it might be encountered for a large resource composed entirely of a single large list and a validation rule that is either evaluated on each element in the list, or traverses the entire list.
CRD authors can ensure the runtime cost limit will not be exceeded in much the same way the estimated cost limit is avoided: by setting maxItems, maxProperties and maxLength on array, map and string types.
Adoption and Related work
This feature has been turned on by default since Kubernetes 1.25 and finally graduated to GA in Kubernetes 1.29. It raised a lot of interest and is now widely used in the Kubernetes ecosystem. We are excited to share that the Gateway API was able to replace all the validating webhook previously used with this feature.
After CEL was introduced into Kubernetes, we are excited to expand the power to multiple areas including the Admission Chain and authorization config. We will have a separate blog to introduce further.
We look forward to working with the community on the adoption of CRD Validation Rules, and hope to see this feature promoted to general availability in upcoming Kubernetes releases.
Acknowledgements
Special thanks to Joe Betz, Kermit Alexander, Ben Luddy, Jordan Liggitt, David Eads, Daniel Smith, Dr. Stefan Schimanski, Leila Jalali and everyone who contributed to CRD Validation Rules!