Issue 1:
Make sure these boxes are checked before submitting your issue - thank you!

I have checked the superset logs for python stacktraces and included it here as text if any

I have reproduced the issue with at least the latest released version of superset

I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

Expected results

New tab should create a blank tab

Actual results

New tab creates a duplicate of the original tab. (ok, can live with this) But then once you start editing the new tab (ie. removing a chart), it makes the same edit to the original tab.

Steps to reproduce

(1) Convert existing dashboard to V2 dash

(2) Edit dashboard

(3) Click on + for new tab

(4) Remove a chart from new tab

Issue 2:
how should i configue it

###############

"""The main config file for Superset

All configuration in this file can be overridden by providing a superset_config

in your PYTHONPATH as there is a from superset_config import *

at the end of this file.

"""

import imp

import importlib.util

import json

import logging

import os

import sys

from collections import OrderedDict

from datetime import date

from typing import Any, Callable, Dict, List, Optional, Type, TYPE_CHECKING

from cachelib.base import BaseCache

from celery.schedules import crontab

from dateutil import tz

from flask import Blueprint

from flask_appbuilder.security.manager import AUTH_DB

from pandas.io.parsers import STR_NA_VALUES

BaseTemplateProcessor,

)

from superset.stats_logger import DummyStatsLogger

from superset.typing import CacheConfig

from superset.utils.core import is_test

from superset.utils.log import DBEventLogger

from superset.utils.logging_configurator import DefaultLoggingConfigurator

logger = logging.getLogger(name)

if TYPE_CHECKING:

STATS_LOGGER = DummyStatsLogger()

EVENT_LOGGER = DBEventLogger()

SUPERSET_LOG_VIEW = True

BASE_DIR = os.path.abspath(os.path.dirname(file))

if "SUPERSET_HOME" in os.environ:

DATA_DIR = os.environ["SUPERSET_HOME"]

else:

DATA_DIR = os.path.join(os.path.expanduser("~"), ".superset")

VERSION_INFO_FILE = os.path.join(BASE_DIR, "static", "version_info.json")

PACKAGE_JSON_FILE = os.path.join(BASE_DIR, "static", "assets", "package.json")

FAVICONS = [{"href": "/static/assets/images/favicon.png"}]

def _try_json_readversion(filepath: str) -> Optional[str]:

try:

with open(filepath, "r") as f:

return json.load(f).get("version")

return None

filepath: str, length: int

) -> Optional[str]:

try:

with open(filepath, "r") as f:

return json.load(f).get("GIT_SHA")[:length]

return None

VERSION_STRING = _try_json_readversion(VERSION_INFO_FILE) or _try_json_readversion(

PACKAGE_JSON_FILE

)

VERSION_SHA_LENGTH = 8

VERSION_SHA = _try_json_readsha(VERSION_INFO_FILE, VERSION_SHA_LENGTH)

ROW_LIMIT = 50000

VIZ_ROW_LIMIT = 10000

SAMPLES_ROW_LIMIT = 1000

FILTER_SELECT_ROW_LIMIT = 10000

SUPERSET_WEBSERVER_PROTOCOL = "http"

SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"

SUPERSET_WEBSERVER_PORT = 8088

SUPERSET_WEBSERVER_TIMEOUT = 60

SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT = 0

SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE = None

SUPERSET_DASHBOARD_POSITION_DATA_LIMIT = 65535

CUSTOM_SECURITY_MANAGER = None

SQLALCHEMY_TRACK_MODIFICATIONS = False

SECRET_KEY = "\2\1thisismyscretkey\1\2\e\y\y\h"

SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(DATA_DIR, "superset.db")

SQLALCHEMY_CUSTOM_PASSWORD_STORE = None

QUERY_SEARCH_LIMIT = 1000

WTF_CSRF_ENABLED = True

WTF_CSRF_EXEMPT_LIST = ["superset.views.core.log", "superset.charts.api.data"]

DEBUG = os.environ.get("FLASK_ENV") == "development"

FLASK_USE_RELOAD = True

SHOW_STACKTRACE = True

ENABLE_PROXY_FIX = False

PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1}

APP_NAME = "Superset"

APP_ICON = "/static/assets/images/superset-logo-horiz.png"

APP_ICON_WIDTH = 126

LOGO_TARGET_PATH = None

FAB_API_SWAGGER_UI = True

DRUID_TZ = tz.tzutc()

DRUID_ANALYSIS_TYPES = ["cardinality"]

DRUID_IS_ACTIVE = False

DRUID_METADATA_LINKS_ENABLED = True

AUTH_TYPE = AUTH_DB

PUBLIC_ROLE_LIKE: Optional[str] = None

BABEL_DEFAULT_LOCALE = "en"

BABEL_DEFAULT_FOLDER = "superset/translations"

LANGUAGES = {

"en": {"flag": "us", "name": "English"},

"es": {"flag": "es", "name": "Spanish"},

"it": {"flag": "it", "name": "Italian"},

"fr": {"flag": "fr", "name": "French"},

"zh": {"flag": "cn", "name": "Chinese"},

"ja": {"flag": "jp", "name": "Japanese"},

"de": {"flag": "de", "name": "German"},

"pt": {"flag": "pt", "name": "Portuguese"},

"pt_BR": {"flag": "br", "name": "Brazilian Portuguese"},

"ru": {"flag": "ru", "name": "Russian"},

"ko": {"flag": "kr", "name": "Korean"},

}

LANGUAGES = {}

DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {

"ALLOW_DASHBOARD_DOMAIN_SHARDING": True,

"CLIENT_CACHE": False,

"DISABLE_DATASET_SOURCE_EDIT": False,

"DYNAMIC_PLUGINS": False,

"ENABLE_EXPLORE_JSON_CSRF_PROTECTION": False,

"ENABLE_TEMPLATE_PROCESSING": False,

"KV_STORE": False,

"PRESTO_EXPAND_DATA": False,

"THUMBNAILS": False,

"DASHBOARD_CACHE": False,

"REMOVE_SLICE_LEVEL_LABEL_COLORS": False,

"SHARE_QUERIES_VIA_KV_STORE": False,

"SIP_38_VIZ_REARCHITECTURE": False,

"TAGGING_SYSTEM": False,

"SQLLAB_BACKEND_PERSISTENCE": False,

"LISTVIEWS_DEFAULT_CARD_VIEW": False,

"ENABLE_REACT_CRUD_VIEWS": True,

"DISPLAY_MARKDOWN_HTML": True,

"ESCAPE_MARKDOWN_HTML": False,

"DASHBOARD_NATIVE_FILTERS": False,

"GLOBAL_ASYNC_QUERIES": False,

"VERSIONED_EXPORT": False,

"ROW_LEVEL_SECURITY": False,

"ALERT_REPORTS": False,

"OMNIBAR": False,

}

if DEFAULT_FEATURE_FLAGS["THUMBNAILS"]:

DEFAULT_FEATURE_FLAGS["LISTVIEWS_DEFAULT_CARD_VIEW"] = True

FEATURE_FLAGS: Dict[str, bool] = {}

GET_FEATURE_FLAGS_FUNC: Optional[Callable[[Dict[str, bool]], Dict[str, bool]]] = None

EXTRA_CATEGORICAL_COLOR_SCHEMES: List[Dict[str, Any]] = []

EXTRA_SEQUENTIAL_COLOR_SCHEMES: List[Dict[str, Any]] = []

THUMBNAIL_SELENIUM_USER = "admin"

THUMBNAIL_CACHE_CONFIG: CacheConfig = {

"CACHE_TYPE": "null",

"CACHE_NO_NULL_WARNING": True,

}

SCREENSHOT_LOCATE_WAIT = 10

SCREENSHOT_LOAD_WAIT = 60

UPLOAD_FOLDER = BASE_DIR + "/app/static/uploads/"

UPLOAD_CHUNK_SIZE = 4096

IMG_UPLOAD_FOLDER = BASE_DIR + "/app/static/uploads/"

IMG_UPLOAD_URL = "/static/uploads/"

CACHE_CONFIG: CacheConfig = {"CACHE_TYPE": "null"}

DATA_CACHE_CONFIG: CacheConfig = {"CACHE_TYPE": "null"}

STORE_CACHE_KEYS_IN_METADATA_DB = False

ENABLE_CORS = False

CORS_OPTIONS: Dict[Any, Any] = {}

SUPERSET_WEBSERVER_DOMAINS = None

EXCEL_EXTENSIONS = {"xlsx", "xls"}

CSV_EXTENSIONS = {"csv", "tsv", "txt"}

ALLOWED_EXTENSIONS = {*EXCEL_EXTENSIONS, CSV_EXTENSIONS}

CSV_EXPORT = {"encoding": "utf-8"}

TIME_GRAIN_DENYLIST: List[str] = []

TIME_GRAIN_ADDONS: Dict[str, str] = {}

TIME_GRAIN_ADDON_EXPRESSIONS: Dict[str, Dict[str, str]] = {}

VIZ_TYPE_DENYLIST: List[str] = []

DRUID_DATA_SOURCE_DENYLIST: List[str] = []

DEFAULT_MODULE_DS_MAP = OrderedDict(

[

("superset.connectors.sqla.models", ["SqlaTable"]),

("superset.connectors.druid.models", ["DruidDatasource"]),

]

)

ADDITIONAL_MODULE_DS_MAP: Dict[str, List[str]] = {}

ADDITIONAL_MIDDLEWARE: List[Callable[..., Any]] = []

LOGGING_CONFIGURATOR = DefaultLoggingConfigurator()

LOG_FORMAT = "%(asctime)s:%(levelname)s:%(name)s:%(message)s"

LOG_LEVEL = "DEBUG"

ENABLE_TIME_ROTATE = False

TIME_ROTATE_LOG_LEVEL = "DEBUG"

FILENAME = os.path.join(DATA_DIR, "superset.log")

ROLLOVER = "midnight"

INTERVAL = 1

BACKUP_COUNT = 30

QUERY_LOGGER = None

MAPBOX_API_KEY = os.environ.get("MAPBOX_API_KEY", "")

SQL_MAX_ROW = 100000

DISPLAY_MAX_ROW = 10000

DEFAULT_SQLLAB_LIMIT = 1000

MAX_TABLE_NAMES = 3000

SQLLAB_SAVE_WARNING_MESSAGE = None

SQLLAB_SCHEDULE_WARNING_MESSAGE = None

BROKER_URL = "sqla+sqlite:///celerydb.sqlite"

CELERY_IMPORTS = ("superset.sql_lab", "superset.tasks")

CELERY_RESULT_BACKEND = "db+sqlite:///celery_results.sqlite"

CELERYD_LOG_LEVEL = "DEBUG"

CELERYD_PREFETCH_MULTIPLIER = 1

CELERY_ACKS_LATE = False

CELERY_ANNOTATIONS = {

"sql_lab.get_sql_results": {"rate_limit": "100/s"},

"email_reports.send": {

"rate_limit": "1/s",

"time_limit": 120,

"soft_time_limit": 150,

"ignore_result": True,

},

}

CELERYBEAT_SCHEDULE = {

"email_reports.schedule_hourly": {

"task": "email_reports.schedule_hourly",

"schedule": crontab(minute=1, hour=""),

}

}

DEFAULT_HTTP_HEADERS: Dict[str, Any] = {}

OVERRIDE_HTTP_HEADERS: Dict[str, Any] = {}

HTTP_HEADERS: Dict[str, Any] = {}

DEFAULT_DB_ID = None

SQLLAB_TIMEOUT = 30

SQLLAB_VALIDATION_TIMEOUT = 10

SQLLAB_DEFAULT_DBID = None

SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6

ESTIMATE_QUERY_COST = False

SQLLAB_CTAS_NO_LIMIT = False

SQLLAB_CTAS_SCHEMA_NAME_FUNC: Optional[

Callable[["Database", "models.User", str, str], str]

] = None

RESULTS_BACKEND: Optional[BaseCache] = None

RESULTS_BACKEND_USE_MSGPACK = True

CSV_TO_HIVE_UPLOAD_S3_BUCKET = None

CSV_TO_HIVE_UPLOAD_DIRECTORY = "EXTERNAL_HIVE_TABLES/"

CSV_TO_HIVE_UPLOAD_DIRECTORY_FUNC: Callable[

["Database", "models.User", str], Optional[str]

] = lambda database, user, schema: CSV_TO_HIVE_UPLOAD_DIRECTORY

UPLOADED_CSV_HIVE_NAMESPACE: Optional[str] = None

ALLOWED_USER_CSV_SCHEMA_FUNC: Callable[["Database", "models.User"], List[str]] = (

lambda database, user: [UPLOADED_CSV_HIVE_NAMESPACE]

if UPLOADED_CSV_HIVE_NAMESPACE

else []

)

CSV_DEFAULT_NA_NAMES = list(STR_NA_VALUES)

JINJA_CONTEXT_ADDONS: Dict[str, Callable[..., Any]] = {}

CUSTOM_TEMPLATE_PROCESSORS: Dict[str, Type[BaseTemplateProcessor]] = {}

ROBOT_PERMISSION_ROLES = ["Public", "Gamma", "Alpha", "Admin", "sql_lab"]

CONFIG_PATH_ENV_VAR = "SUPERSET_CONFIG_PATH"

FLASK_APP_MUTATOR = None

ENABLE_ACCESS_REQUEST = False

SMTP_HOST = "localhost"

SMTP_STARTTLS = True

SMTP_SSL = False

SMTP_USER = "superset"

SMTP_PORT = 25

SMTP_PASSWORD = "superset"

SMTP_MAIL_FROM = "superset@superset.com"

ENABLE_CHUNK_ENCODING = False

SILENCE_FAB = True

FAB_ADD_SECURITY_VIEWS = True

FAB_ADD_SECURITY_PERMISSION_VIEW = False

FAB_ADD_SECURITY_VIEW_MENU_VIEW = False

FAB_ADD_SECURITY_PERMISSION_VIEWS_VIEW = False

TROUBLESHOOTING_LINK = ""

WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 7

PERMISSION_INSTRUCTIONS_LINK = ""

BLUEPRINTS: List[Blueprint] = []

TRACKING_URL_TRANSFORMER = lambda x: x

HIVE_POLL_INTERVAL = 5

PRESTO_POLL_INTERVAL = 1

ENABLE_JAVASCRIPT_CONTROLS = False

DASHBOARD_TEMPLATE_ID = None

DB_CONNECTION_MUTATOR = None

SQL_QUERY_MUTATOR = None

ENABLE_SCHEDULED_EMAIL_REPORTS = False

ENABLE_ALERTS = False

ALERT_REPORTS_CRON_WINDOW_SIZE = 59

SLACK_API_TOKEN = None

SLACK_PROXY = None

SCHEDULED_EMAIL_DEBUG_MODE = False

MACHINE_AUTH_PROVIDER_CLASS = "superset.utils.machine_auth.MachineAuthProvider"

EMAIL_REPORTS_CRON_RESOLUTION = 15

EMAIL_ASYNC_TIME_LIMIT_SEC = 300

EMAIL_REPORT_FROM_ADDRESS = "reports@superset.org"

EMAIL_REPORT_BCC_ADDRESS = None

EMAIL_REPORTS_USER = "admin"

EMAIL_REPORTS_SUBJECT_PREFIX = "[Report] "

WEBDRIVER_TYPE = "firefox"

WEBDRIVER_WINDOW = {"dashboard": (1600, 2000), "slice": (3000, 1200)}

WEBDRIVER_AUTH_FUNC = None

WEBDRIVER_CONFIGURATION: Dict[Any, Any] = {}

WEBDRIVER_OPTION_ARGS = [

"--force-device-scale-factor=2.0",

"--high-dpi-support=2.0",

"--headless",

]

WEBDRIVER_BASEURL = "http://0.0.0.0:8080/"

WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL

EMAIL_PAGE_RENDER_WAIT = 30

BUG_REPORT_URL = None

DOCUMENTATION_URL = None

DOCUMENTATION_TEXT = "Documentation"

DEFAULT_RELATIVE_START_TIME = "today"

DEFAULT_RELATIVE_END_TIME = "today"

SQL_VALIDATORS_BY_ENGINE = {

"presto": "PrestoDBSQLValidator",

"postgresql": "PostgreSQLValidator",

}

TALISMAN_ENABLED = False

TALISMAN_CONFIG = {

"content_security_policy": None,

"force_https": True,

"force_https_permanent": False,

}

RLS_FORM_QUERY_REL_FIELDS: Optional[Dict[str, List[List[Any]]]] = None

SQLALCHEMY_EXAMPLES_URI = None

PREVENT_UNSAFE_DB_CONNECTIONS = True

SSL_CERT_PATH: Optional[str] = None

SIP_15_ENABLED = True

SIP_15_DEFAULT_TIME_RANGE_ENDPOINTS = ["unknown", "inclusive"]

SIP_15_TOAST_MESSAGE = (

"Action Required: Preview then save your chart using the "

'new time range endpoints <a target="_blank" href="{url}" '

'class="alert-link">here.'

)

SQLA_TABLE_MUTATOR = lambda table: table

GLOBAL_ASYNC_QUERIES_REDIS_CONFIG = {

"port": 6379,

"host": "127.0.0.1",

"password": "",

"db": 0,

}

GLOBAL_ASYNC_QUERIES_REDIS_STREAM_PREFIX = "async-events-"

GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT = 1000

GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT_FIREHOSE = 1000000

GLOBAL_ASYNC_QUERIES_JWT_COOKIE_NAME = "async-token"

GLOBAL_ASYNC_QUERIES_JWT_COOKIE_SECURE = False

GLOBAL_ASYNC_QUERIES_JWT_SECRET = "test-secret-change-me"

GLOBAL_ASYNC_QUERIES_TRANSPORT = "polling"

GLOBAL_ASYNC_QUERIES_POLLING_DELAY = 500

if CONFIG_PATH_ENV_VAR in os.environ:

try:

cfg_path = os.environ[CONFIG_PATH_ENV_VAR]

module = sys.modules[name]

override_conf = imp.load_source("superset_config", cfg_path)

for key in dir(override_conf):

if key.isupper():

setattr(module, key, getattr(override_conf, key))

print(f"Loaded your LOCAL configuration at [{cfg_path}]")

except Exception:

logger.exception(

"Failed to import config for %s=%s", CONFIG_PATH_ENV_VAR, cfg_path

)

raise

elif importlib.util.find_spec("superset_config") and not is_test():

try:

print(f"Loaded your LOCAL configuration at [{superset_config.file}]")

except Exception:

logger.exception("Found but failed to import local superset_config")

raise

DATASET_HEALTH_CHECK = None