Missing DataProfiling view from AIRFLOW -UI - airflow

Missing Data Profiling view when used FAB-Security with RBAC.
I have created users using airflow create_users
even the users have admin privileges data profiling view is not available on UI any Ideas?

As per the breaking changes section in Updating Airflow and backwards-incompatible the "new" webserver wont be supporting every feature of the old webserver.
Due to security concerns, the new webserver will no longer support the features in the Data Profiling menu of old UI, including Ad Hoc Query, Charts, and Known Events.

Related

Can't see Data profiling menu

I have installed the airflow 1.10.12 version using pip. However, I am not able to see the data profiling menu.
I checked my config file, and it's has secure_mode as false.
# If set to False enables some unsecure features like Charts and Ad Hoc Queries.
# In 2.0 will default to True.
secure_mode = False
do I need to do anything else?
The new RBAC Airflow UI (which is the only UI from 2.0.0) does not support Data Profiling or Ad-hoc Query:
https://github.com/apache/airflow/blob/master/UPDATING.md#breaking-changes
Due to security concerns, the new webserver will no longer support the features in the Data Profiling menu of old UI, including Ad Hoc Query, Charts, and Known Events.

Airflow connection UI not visible

Airflow version: 1.10.2
Ubuntu: 18.04 (bionic)
Python: 3.6.5
Issue: I am not sure how but the connections are not visible when I click Admin in the menu. Has someone ever faced this thing?
When I edit the URL and go to localhost:8080/admin/connections I see the below response. This was working fine since
But when I list the connections from airflow cli, it works. I am not sure why it is not visible on UI but rather accessible from cli? Or how should I give the UI user access to 'Connections'?
This is due to a change in 10.0.2. Prior to 10.0.2, there was a hardcoded superuser flag for users.
To give an existing user superuser permissions, so that they can manage connections, variables, etc, you need to toggle the superuser flag in the users table in Airflow's metadata database.
They document how to make a user a superuser using code in the UPDATING.md file, see https://github.com/apache/airflow/blob/master/UPDATING.md#user-model-changes
Worked! I put RBAC=True in airflow.cfg and then did airflow initdb.
I am not sure why or how this issue occured but the above solution will make the Connection Ui visible again.

Can I prevent background sync of firestore from old version client?

I want to control background sync of google-firebase's firestore db with persistance mode (PersistenceEnabled to true).
I'm afraid the old version client, works offline and don't know the app's version-up (with some destructive updates), may upload local-data to server when change to online.
In this case, I want to check current app versions and allow/not allow before sync.
Is there any solution?
Data in the cache is only updated when you attach a listener/observer to it. There is no automatic synchronization happening for the data in the offline cache.
This means that you can add a version check to your application startup code, before you attach any observers. Simply store a database-version field in a global document, and check against that upon application startup. If the version is greater than what the app was made to handle, show an upgrade prompt.

Changing firebase data model (while multiple app versions are in production)

What's the best way to change the Firebase data model while you have multiple versions of your iOS app in production?
Since there's no 'application server' layer in the middle any changes in the database model could break older versions of the app.
Performance Related Example of the problem:
In version 1.0 I was naively keeping everything related to a post under '/posts/'. Now in version 2.0 I want to take Firebase's recommendation and add a '/user-post' endpoint to quickly list all posts for a given user.
People using version 1.0 of the iOS app are not writing any data to '/user-posts' since that endpoint didn't used to exist. People using version 2.0 therefore don't see any posts created by people using the old version of the app.
In theory I could create a server somewhere that listens for changes on '/post/' and adds them to '/user-posts' as well. That seems hard to maintain over time though if you have a lot of different versions of your app.
New Feature Example of the problem:
Lets say in version 1.0 of your mobile app you write new blog posts to '/posts/'. Now in version 2.0 of your app you introduce a Teams feature and all posts need to be in '/team/team-id/posts'.
People who haven't upgraded to version 2.0 will still be writing to '/posts'. Those posts won't be visible to people using version 2.0 who are reading from '/team/team-id/posts'.
I realize you could keep both endpoints simultaneously (and index /posts based on team ID) but over time this seems hard to maintain.
Traditional solutions:
If I were using something like Django or Express I'd do a database migration and then update the server-side endpoints for creating blogposts.
That would make changes in the database from the clients. I could in theory add an application-server tier to my architecture with Firebase, but that doesn't seem like it's recommended: https://firebase.googleblog.com/2013/03/where-does-firebase-fit-in-your-app.html
I would suggest you use Firebase Remote Config to show an alert via UIAlertController or different screen if an update is available. You could force the user to update to the current version and you don't have problems later because no posts with the old code can be created.
To answer your question:
I would develop a different app, add it to the same Firebase project and then let this app convert all old data to the new data model. So you would do this one time after releasing the new version and the old user data is converted to the new data model and everything works smoothly. You could also have a property like databaseVersion for every object.
To prevent future problems you could have a general property named app-version in your Firebase Realtime Database. Before every post the app checks if there is a newer version. If not the user can add the post but if there is a newer version you could show an message/alert via UIAlertController

Initialization of local sync store in Azure's offline-sync API

I'm working with Azure's offline-sync API.
(It's REALLY GREAT so far, but since it's still new-ish it doesn't have comprehensive documentation, only tutorials. We need to craft dependable integration tests, and we're finding that tricky because we need to rely on published behavior in official docs for that... or dig into the source, but that is liable to change at any time.)
The samples do this:
var store = new MobileServiceSQLiteStore("localstore.db");
The comments mention "initializes local store".
I assume the local sync database is a "throw-away" asset, as it can be recreated at will.
Is the expected behavior that it will create the local SQLite file if it does not exist, or it will recreate the file each time the mobile app starts and that call is made?
The tutorials are augmented by the HOWTO documentation (available under Mobile > Develop - in the same area as the tutorials) and the GitHub Wiki and the github.io pages for the SDK.
The local store is created if it doesn't exist, and new fields are added to tables if they are needed. It's sometimes good to delete the database - for example, if you reduce the field count in your mobile app (the process only adds fields). If you do this, the database will be re-created when the app is next restarted.

Resources