-
Notifications
You must be signed in to change notification settings - Fork 82
Bug fixes after 2-7-0-rc #1785
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
base: main
Are you sure you want to change the base?
Bug fixes after 2-7-0-rc #1785
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,10 @@ class NamingConventionPattern(Enum): | |
IAM = {'regex': '[^a-zA-Z0-9-_]', 'separator': '-', 'max_length': 63} # Role names up to 64 chars | ||
IAM_POLICY = {'regex': '[^a-zA-Z0-9-_]', 'separator': '-', 'max_length': 128} # Policy names up to 128 chars | ||
GLUE = { | ||
'regex': '[^a-zA-Z0-9_]', | ||
'regex': '[^a-zA-Z0-9_-]', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding "-" into the regex |
||
'separator': '_', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But we are specifying separator as '_'. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The separator field is used to create a data.all generated name ( like dataall_glue_db, etc ) when we create a dataset and data.all creates the S3 bucket, gluedb, etc. The regex field is used when making a name that is compliant ( with that regex ). In such cases, when data.all creates a name, and uses "_" as separator then that would be a valid name since it is part of the character set defined by regex |
||
'max_length': 240, | ||
'valid_external_regex': '^[a-zA-Z0-9_]+$', | ||
'valid_external_regex': '^[a-zA-Z0-9_-]+$', | ||
} # Limit 255 - 15 extra chars buffer | ||
GLUE_ETL = {'regex': '[^a-zA-Z0-9-]', 'separator': '-', 'max_length': 52} | ||
NOTEBOOK = {'regex': '[^a-zA-Z0-9-]', 'separator': '-', 'max_length': 63} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ def run_table_profiling( | |
logger.debug('Profiling table for %s %s ', database, table) | ||
logger.debug('using %s', database) | ||
spark.sql('use `{}`'.format(database)) | ||
df = spark.sql('select * from {}'.format(table)) | ||
df = spark.sql('select * from `{}`'.format(table)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor correction There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could also just be: df = spark.sql(f"SELECT * FROM There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I could do this as well. I just wanted add the `` - df = spark.sql(f"SELECT * FROM `{table}`") |
||
total = df.count() | ||
logger.debug('Retrieved count for %s %s', table, total) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -426,7 +426,6 @@ def validate_deployment_params(self, source, repo_connection_arn, git_branch, re | |
or 'client_id' not in custom_auth_configs | ||
or 'response_types' not in custom_auth_configs | ||
or 'scopes' not in custom_auth_configs | ||
or 'jwks_url' not in custom_auth_configs | ||
or 'claims_mapping' not in custom_auth_configs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing jwks_url from pipeline validation as it is no longer used |
||
or 'user_id' not in custom_auth_configs['claims_mapping'] | ||
or 'email' not in custom_auth_configs['claims_mapping'] | ||
|
@@ -442,7 +441,6 @@ def validate_deployment_params(self, source, repo_connection_arn, git_branch, re | |
or not isinstance(custom_auth_configs['client_id'], str) | ||
or not isinstance(custom_auth_configs['response_types'], str) | ||
or not isinstance(custom_auth_configs['scopes'], str) | ||
or not isinstance(custom_auth_configs['jwks_url'], str) | ||
or not isinstance(custom_auth_configs['claims_mapping']['user_id'], str) | ||
or not isinstance(custom_auth_configs['claims_mapping']['email'], str) | ||
): | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,15 +34,15 @@ | |
} | ||
}; | ||
|
||
useEffect(async () => { | ||
useEffect(() => { | ||
// Check if the maintenance window is enabled and has NO-ACCESS Status | ||
// If yes then display a blank screen with a message that data.all is in maintenance mode ( Check use of isNoAccessMaintenance state ) | ||
if (isModuleEnabled(ModuleNames.MAINTENANCE) === true) { | ||
if (client) { | ||
if (client && groups) { | ||
checkMaintenanceMode().catch((e) => dispatch({ type: SET_ERROR, e })); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding groups check, so that the UI is correctly displayed. Without this, when data.all is in No-Access maintenance mode, No-access maintenance window is shown for a fraction of second and then goes away and proper UI is rendered |
||
} | ||
} | ||
}, [client, groups]); | ||
|
||
if ( | ||
isNoAccessMaintenance == null && | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,7 +298,7 @@ export const ReIndexConfirmationPopUp = (props) => { | |
|
||
export const MaintenanceViewer = () => { | ||
const client = useClient(); | ||
const [refreshing, setRefreshing] = useState(false); | ||
const [refreshing, setRefreshing] = useState(true); | ||
const refreshingReIndex = false; | ||
const [updatingReIndex, setUpdatingReIndex] = useState(false); | ||
const [updating, setUpdating] = useState(false); | ||
|
@@ -443,7 +443,6 @@ export const MaintenanceViewer = () => { | |
}; | ||
|
||
const initializeMaintenanceView = useCallback(async () => { | ||
setRefreshing(true); | ||
const response = await client.query(getMaintenanceStatus()); | ||
if (!response.errors && response.data.getMaintenanceWindowStatus !== null) { | ||
const maintenanceStatusData = response.data.getMaintenanceWindowStatus; | ||
|
@@ -471,13 +470,10 @@ export const MaintenanceViewer = () => { | |
dispatch({ type: SET_ERROR, error }); | ||
} | ||
setRefreshing(false); | ||
}, [client]); | ||
}, [client, maintenanceModes]); | ||
|
||
useEffect(() => { | ||
if (client) { | ||
initializeMaintenanceView().catch((e) => | ||
dispatch({ type: SET_ERROR, e }) | ||
); | ||
fetchMaintenanceModes().catch((e) => | ||
dispatch({ type: SET_ERROR, error: e.message }) | ||
); | ||
|
@@ -491,6 +487,14 @@ export const MaintenanceViewer = () => { | |
} | ||
}, [client]); | ||
|
||
useEffect(() => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #1778 (comment) for more details |
||
if (maintenanceModes.length > 0) { | ||
initializeMaintenanceView().catch((e) => | ||
dispatch({ type: SET_ERROR, e }) | ||
); | ||
} | ||
}, [maintenanceModes]); | ||
|
||
return ( | ||
<Box> | ||
{refreshingReIndex ? ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be the following instead to avoid KeyError on 'Parameters' if it does not exist, unless you are really wanting that exception if it doesn't exist:
parameter_value_list.extend(page.get('Parameters', []))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm. Taking a look at the API response ,https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ssm/client/get_parameters_by_path.html, Parameters is always returned ( return empty list [] if nothing is found). Since this contract is declared, I am expecting Parameters to always be present. Also, if Parameters is not present, then I would want this function to raise an exception which bubbles up to the user enabling maintenance window.