gazer 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/p3-issue-label.yml +21 -0
- data/.github/workflows/ruby-ci.yml +145 -2
- data/.github/workflows/triage-issue-label.yml +20 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +1 -1
- data/examples/Dashboard_17_FAA_KPIs.json +687 -0
- data/examples/add_project.sh +151 -0
- data/lib/gzr/cli.rb +4 -3
- data/lib/gzr/commands/model/import.rb +18 -5
- data/lib/gzr/commands/model/set/cat.rb +60 -0
- data/lib/gzr/commands/model/set/import.rb +73 -0
- data/lib/gzr/commands/model/set/ls.rb +74 -0
- data/lib/gzr/commands/model/set/rm.rb +49 -0
- data/lib/gzr/commands/model/set.rb +97 -0
- data/lib/gzr/commands/model.rb +5 -0
- data/lib/gzr/commands/{permissions → permission}/ls.rb +3 -3
- data/lib/gzr/commands/permission/set/cat.rb +60 -0
- data/lib/gzr/commands/permission/set/import.rb +73 -0
- data/lib/gzr/commands/permission/set/ls.rb +78 -0
- data/lib/gzr/commands/permission/set/rm.rb +49 -0
- data/lib/gzr/commands/permission/set.rb +98 -0
- data/lib/gzr/commands/permission/tree.rb +71 -0
- data/lib/gzr/commands/{permissions.rb → permission.rb} +22 -6
- data/lib/gzr/commands/role/cat.rb +4 -3
- data/lib/gzr/commands/role/create.rb +51 -0
- data/lib/gzr/commands/role.rb +19 -1
- data/lib/gzr/commands/subcommandbase.rb +2 -2
- data/lib/gzr/modules/model/set.rb +123 -0
- data/lib/gzr/modules/model.rb +10 -0
- data/lib/gzr/modules/permission/set.rb +123 -0
- data/lib/gzr/modules/{permissions.rb → permission.rb} +1 -1
- data/lib/gzr/modules/role.rb +23 -0
- data/lib/gzr/version.rb +1 -1
- metadata +23 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08df27aaf125092476d3b5cc5a35c07aec483a6785d45d57a24965e2a5f6e5e8'
|
4
|
+
data.tar.gz: 417f85b8b695e2edd7e8758714991650dae3c95a7e0edb513b9dd282d6fcfaa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a708df5171e637f015bd55156a9c19b5dde8d0a8acc536e906aeb7a2ca6ddfca88ed49ed11db8d0457b62c29fbd95510d3029ed76831e5a3250fd9690b644a6
|
7
|
+
data.tar.gz: 564f6d56e7d6ac26cf88ca4276752014b0a91005359389fab11b37a71251c8ecaa279e91ee0c30576594107b982cf19dceacc523e624d2cb81bd8556c399ec22
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Label all new/reopened issues with P3
|
2
|
+
on:
|
3
|
+
issues:
|
4
|
+
types:
|
5
|
+
- reopened
|
6
|
+
- opened
|
7
|
+
jobs:
|
8
|
+
label_issues_p3:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
permissions:
|
11
|
+
issues: write
|
12
|
+
steps:
|
13
|
+
- uses: actions/github-script@v6
|
14
|
+
with:
|
15
|
+
script: |
|
16
|
+
github.rest.issues.addLabels({
|
17
|
+
issue_number: context.issue.number,
|
18
|
+
owner: context.repo.owner,
|
19
|
+
repo: context.repo.repo,
|
20
|
+
labels: ["p3"]
|
21
|
+
})
|
@@ -19,7 +19,8 @@ jobs:
|
|
19
19
|
|
20
20
|
test:
|
21
21
|
name: Test - Looker.${{ matrix.looker }} / Ruby.${{ matrix.ruby-version }}
|
22
|
-
runs-on:
|
22
|
+
runs-on:
|
23
|
+
group: large-ubuntu
|
23
24
|
needs: setup
|
24
25
|
strategy:
|
25
26
|
matrix:
|
@@ -62,7 +63,7 @@ jobs:
|
|
62
63
|
bundler-cache: false
|
63
64
|
|
64
65
|
- name: Install dependencies
|
65
|
-
run:
|
66
|
+
run: bin/setup
|
66
67
|
|
67
68
|
- name: Check that Looker is ready
|
68
69
|
run: |
|
@@ -83,6 +84,148 @@ jobs:
|
|
83
84
|
--fail
|
84
85
|
if: failure()
|
85
86
|
|
87
|
+
- name: Login persistently
|
88
|
+
run: |
|
89
|
+
exe/gzr session login
|
90
|
+
|
91
|
+
- name: Create Connection
|
92
|
+
run: |
|
93
|
+
cat > Connection_faa_mysql.json <<HERE
|
94
|
+
{
|
95
|
+
"name": "faa",
|
96
|
+
"host": "${{ secrets.FAA_MYSQL_HOSTNAME }}",
|
97
|
+
"port": "3306",
|
98
|
+
"database": "flightstats",
|
99
|
+
"db_timezone": "UTC",
|
100
|
+
"query_timezone": "UTC",
|
101
|
+
"schema": null,
|
102
|
+
"max_connections": 30,
|
103
|
+
"ssl": false,
|
104
|
+
"verify_ssl": false,
|
105
|
+
"tmp_db_name": "tmp",
|
106
|
+
"pool_timeout": 120,
|
107
|
+
"sql_runner_precache_tables": true,
|
108
|
+
"sql_writing_with_info_schema": true,
|
109
|
+
"uses_tns": false,
|
110
|
+
"pdt_concurrency": 1,
|
111
|
+
"dialect_name": "mysql",
|
112
|
+
"username": "${{ secrets.FAA_MYSQL_USERNAME }}",
|
113
|
+
"password": "${{ secrets.FAA_MYSQL_PASSWORD }}"
|
114
|
+
}
|
115
|
+
HERE
|
116
|
+
exe/gzr connection import Connection_faa_mysql.json --token_file
|
117
|
+
|
118
|
+
- name: Test Connection
|
119
|
+
run: |
|
120
|
+
exe/gzr connection test faa --token_file
|
121
|
+
|
122
|
+
- name: Change the session to dev mode
|
123
|
+
run: |
|
124
|
+
exe/gzr session get --token_file
|
125
|
+
exe/gzr session update dev --token_file
|
126
|
+
|
127
|
+
- name: Import the project
|
128
|
+
run: |
|
129
|
+
cat > Project_faa.json <<HERE
|
130
|
+
{
|
131
|
+
"name": "faa",
|
132
|
+
"uses_git": true
|
133
|
+
}
|
134
|
+
HERE
|
135
|
+
exe/gzr project import Project_faa.json --token-file
|
136
|
+
|
137
|
+
- name: Create a deploy key and set it on the github repo for the project
|
138
|
+
run: |
|
139
|
+
DEPLOY_KEY=$(exe/gzr project deploy_key faa --token_file)
|
140
|
+
echo $DEPLOY_KEY
|
141
|
+
SET_KEY_RESPONSE=$(
|
142
|
+
curl -L \
|
143
|
+
-X POST \
|
144
|
+
-H "Accept: application/vnd.github+json" \
|
145
|
+
-H "Authorization: Bearer ${{ secrets.LOS_AUTO_BOT_MANAGE_FAA_DEPLOY_KEY }}" \
|
146
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
147
|
+
https://api.github.com/repos/looker-open-source/faa/keys \
|
148
|
+
-d "{\"title\":\"test_key $(uuidgen)\",\"key\":\"$DEPLOY_KEY\",\"read_only\":false}"
|
149
|
+
)
|
150
|
+
echo $SET_KEY_RESPONSE
|
151
|
+
echo "KEY_ID=$(jq .id <<<$SET_KEY_RESPONSE)" >> $GITHUB_ENV
|
152
|
+
|
153
|
+
- name: Set the project github connection
|
154
|
+
run: |
|
155
|
+
cat > github_repo.json <<HERE
|
156
|
+
{
|
157
|
+
"git_remote_url": "git@github.com:looker-open-source/faa.git",
|
158
|
+
"git_service_name": "github"
|
159
|
+
}
|
160
|
+
HERE
|
161
|
+
exe/gzr project update faa github_repo.json --token-file
|
162
|
+
|
163
|
+
- name: Check the project config
|
164
|
+
run: |
|
165
|
+
exe/gzr project cat faa --trim --token-file
|
166
|
+
|
167
|
+
- name: Check available branches for faa project
|
168
|
+
run: |
|
169
|
+
exe/gzr project branch faa --all --token-file
|
170
|
+
|
171
|
+
- name: Checkout a shared branch
|
172
|
+
run: |
|
173
|
+
exe/gzr project checkout faa main --token_file
|
174
|
+
|
175
|
+
- name: Deploy to production
|
176
|
+
run: |
|
177
|
+
exe/gzr project deploy faa --token_file
|
178
|
+
|
179
|
+
- name: Configure lookml model
|
180
|
+
run: |
|
181
|
+
cat > Model_faa.json <<HERE
|
182
|
+
{
|
183
|
+
"name": "aviation",
|
184
|
+
"project_name": "faa",
|
185
|
+
"unlimited_db_connections": false,
|
186
|
+
"allowed_db_connection_names": [
|
187
|
+
"faa"
|
188
|
+
]
|
189
|
+
}
|
190
|
+
HERE
|
191
|
+
exe/gzr model import Model_faa.json --token_file
|
192
|
+
|
193
|
+
- name: run a query against the model
|
194
|
+
run: |
|
195
|
+
cat > query.json <<HERE
|
196
|
+
{
|
197
|
+
"model": "aviation",
|
198
|
+
"view": "aircraft_types",
|
199
|
+
"fields": ["aircraft_types.description","aircraft_types.count"],
|
200
|
+
"pivots": null,
|
201
|
+
"fill_fields": null,
|
202
|
+
"filters": null,
|
203
|
+
"filter_expression": null,
|
204
|
+
"sorts": [
|
205
|
+
"aircraft_types.description"
|
206
|
+
],
|
207
|
+
"limit": "500"
|
208
|
+
}
|
209
|
+
HERE
|
210
|
+
exe/gzr query runquery "$(cat query.json)"
|
211
|
+
|
212
|
+
- name: Load a dashboard
|
213
|
+
run: |
|
214
|
+
me=$(exe/gzr user me --csv --plain)
|
215
|
+
echo $me
|
216
|
+
dest_folder=$(cut -d, -f5 <<< $me | sed 's/"//g')
|
217
|
+
exe/gzr dashboard import examples/Dashboard_17_FAA_KPIs.json $dest_folder
|
218
|
+
|
219
|
+
- name: Remove the deploy key from the github repo
|
220
|
+
if: ${{ always() }}
|
221
|
+
run: |
|
222
|
+
curl -L \
|
223
|
+
-X DELETE \
|
224
|
+
-H "Accept: application/vnd.github+json" \
|
225
|
+
-H "Authorization: Bearer ${{ secrets.LOS_AUTO_BOT_MANAGE_FAA_DEPLOY_KEY }}" \
|
226
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
227
|
+
https://api.github.com/repos/looker-open-source/faa/keys/$KEY_ID
|
228
|
+
|
86
229
|
- name: Run tests
|
87
230
|
run: bundle exec rake
|
88
231
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Label issues that need triage
|
2
|
+
on:
|
3
|
+
issues:
|
4
|
+
types:
|
5
|
+
- opened
|
6
|
+
jobs:
|
7
|
+
label_issues_p3:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
permissions:
|
10
|
+
issues: write
|
11
|
+
steps:
|
12
|
+
- uses: actions/github-script@v6
|
13
|
+
with:
|
14
|
+
script: |
|
15
|
+
github.rest.issues.addLabels({
|
16
|
+
issue_number: context.issue.number,
|
17
|
+
owner: context.repo.owner,
|
18
|
+
repo: context.repo.repo,
|
19
|
+
labels: ["need triage"]
|
20
|
+
})
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.3.9](https://github.com/looker-open-source/gzr/compare/v0.3.8...v0.3.9) (2023-05-25)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* model import handles case where model already exists ([302b4db](https://github.com/looker-open-source/gzr/commit/302b4db60ecf0a3b5fc92c34f1fd36f9afaf8f40))
|
9
|
+
|
10
|
+
## [0.3.8](https://github.com/looker-open-source/gzr/compare/v0.3.7...v0.3.8) (2023-05-16)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* create role command ([#204](https://github.com/looker-open-source/gzr/issues/204)) ([cba4a80](https://github.com/looker-open-source/gzr/commit/cba4a803af8298915ca0e2189919d542bfd9f982))
|
16
|
+
* management of model sets ([#200](https://github.com/looker-open-source/gzr/issues/200)) ([1b964ca](https://github.com/looker-open-source/gzr/commit/1b964ca25cf7eb55ff211dab6ae48c174ad3f4b6))
|
17
|
+
* Permission Set management ([#203](https://github.com/looker-open-source/gzr/issues/203)) ([ef7355c](https://github.com/looker-open-source/gzr/commit/ef7355c41234928996540f2c6ed50ba358e197b7))
|
18
|
+
* show available permissions in tree format ([#202](https://github.com/looker-open-source/gzr/issues/202)) ([c702a64](https://github.com/looker-open-source/gzr/commit/c702a64a5247fb151b155d1c6d1116cb20cccc0f))
|
19
|
+
|
3
20
|
## [0.3.7](https://github.com/looker-open-source/gzr/compare/v0.3.6...v0.3.7) (2023-05-10)
|
4
21
|
|
5
22
|
|