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

Merge main into xapiens #11

Closed
wants to merge 10 commits into from
Closed

Merge main into xapiens #11

wants to merge 10 commits into from

Conversation

titus-zx
Copy link
Contributor

No description provided.

NickEdwards7502 and others added 9 commits December 13, 2024 10:29
add dynamodb table sbeacon-dataportal-user-quota
When adding _projectNames to athena queries, the existing execution
parameters are iterated through by calling next(). This fails because
the execution_parameters argument is a list.

Convert the execution_parameters argument into an iterable before
attempting to call next() on it. While we're there, add a friendlier
error if we run into more " ? " characters than we have parameters.
Because the add_project_names parsing logic splits by spaces to find
semantic words, if the placeholder for an execution parameter "?" is
immediately preceded or followed by another nonspace character (not
including parentheses, which are stripped), the parser does not
recognise the "?". This means that the associated execution parameter is
not added in the right place and we end up with excess parameters, and a
broken query besides.

Surround each use of the "?" character in query building with space
characters. Future uses of execution parameters that do not do this
should immediately crash under most tests, so these sorts of errors will
not fly under the radar.
The full reference of a table (often "database"."tablename") is searched
to see if it mentions any of the tables that need to be filtered by
_projectName. This is done by simply searching to see if any of the
names of the relevant tables are contained with in the reference name.
This can cause problems if the name of one table is a substring of
another table. For example sbeacon_terms_index will trigger because the
table sbeacon_terms needs to be filtered.

Change the method of identification so the table is split on '"' and '.'
chaacters, and then perform an intersection over the two sets of
strings. This could mean that if the database name is also a match of a
table every table in the database will trigger the filter. We could make
an even more robust identification, but I'm not sure how complicated a
reference can become, and we shouldn't be using the same names for
databases and tables anyway.
We filter the terms table by the _projectname column, but not currently
the terms_index table. If we add the _projectname column to the index we
won't need to reference the main table and can perform some SQL pushdown
to narrow the join space when joining across multiple entities using the
index.

Add the _projectname column to the the sbeacon_terms_index table.
@devopsxti
Copy link
Member

Ran Plan for dir: . workspace: default

Plan Error

Show Output
running 'sh -c' '/home/atlantis/.atlantis/bin/terraform1.10.2 plan -input=false -refresh -out "/home/atlantis/.atlantis/repos/GSI-Xapiens-CSIRO/sBeacon-BGSi/11/default/default.tfplan"' in '/home/atlantis/.atlantis/repos/GSI-Xapiens-CSIRO/sBeacon-BGSi/11/default': exit status 1
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 2:
│    2: variable "region" {
│ 
│ The root module input variable "region" is not set, and has no default
│ value. Use a -var or -var-file command line argument to provide a value for
│ this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 8:
│    8: variable "common-tags" {
│ 
│ The root module input variable "common-tags" is not set, and has no default
│ value. Use a -var or -var-file command line argument to provide a value for
│ this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 192:
│  192: variable "beacon-ui-url" {
│ 
│ The root module input variable "beacon-ui-url" is not set, and has no
│ default value. Use a -var or -var-file command line argument to provide a
│ value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 204:
│  204: variable "variants-bucket-prefix" {
│ 
│ The root module input variable "variants-bucket-prefix" is not set, and has
│ no default value. Use a -var or -var-file command line argument to provide
│ a value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 209:
│  209: variable "metadata-bucket-prefix" {
│ 
│ The root module input variable "metadata-bucket-prefix" is not set, and has
│ no default value. Use a -var or -var-file command line argument to provide
│ a value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 214:
│  214: variable "lambda-layers-bucket-prefix" {
│ 
│ The root module input variable "lambda-layers-bucket-prefix" is not set,
│ and has no default value. Use a -var or -var-file command line argument to
│ provide a value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 219:
│  219: variable "dataportal-bucket-prefix" {
│ 
│ The root module input variable "dataportal-bucket-prefix" is not set, and
│ has no default value. Use a -var or -var-file command line argument to
│ provide a value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 225:
│  225: variable "cognito-user-pool-arn" {
│ 
│ The root module input variable "cognito-user-pool-arn" is not set, and has
│ no default value. Use a -var or -var-file command line argument to provide
│ a value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 230:
│  230: variable "cognito-user-pool-id" {
│ 
│ The root module input variable "cognito-user-pool-id" is not set, and has
│ no default value. Use a -var or -var-file command line argument to provide
│ a value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 235:
│  235: variable "cognito-admin-group-name" {
│ 
│ The root module input variable "cognito-admin-group-name" is not set, and
│ has no default value. Use a -var or -var-file command line argument to
│ provide a value for this variable.
╵
╷
│ Error: No value for required variable
│ 
│   on variables.tf line 240:
│  240: variable "cognito-manager-group-name" {
│ 
│ The root module input variable "cognito-manager-group-name" is not set, and
│ has no default value. Use a -var or -var-file command line argument to
│ provide a value for this variable.
╵

@devopsxti
Copy link
Member

Warning: The plan for dir: . workspace: default was discarded via the Atlantis UI.

To apply this plan you must run plan again.

@titus-zx titus-zx marked this pull request as draft December 17, 2024 09:16
@titus-zx titus-zx closed this Dec 17, 2024
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.

5 participants