gazer 0.2.56 → 0.2.59
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/release.yml +1 -1
- data/.github/workflows/ruby-ci.yml +72 -38
- data/.rspec +2 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +21 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +13 -10
- data/README.md +10 -0
- data/gzr.gemspec +2 -1
- data/lib/gzr/modules/session.rb +6 -6
- data/lib/gzr/version.rb +1 -1
- metadata +23 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b67ec12c5dba850ab2a62f07164e4d051e202cbe0b3b44b50a854499c87f80dc
|
4
|
+
data.tar.gz: 33ffc537d99dd9a184e43b20bc44423a0ed40d11966d1bfde06c637f23b71e5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbcbad1a30333e30a9de999ac7a9a807ed8b306378197a828397c1d7cf00bebec51190b0b3f35dc04828d0c6c8449b2b25f0b1811c85c9db0154abe2ed1b4f69
|
7
|
+
data.tar.gz: dbcc80f63e040184eebbffd1211cc20df0dcd9454277bbb4b71abfa8afbc45dd7fc1a103f0ef2976d5d6ee52e4a8454958b54e9452e645292aba3deaa2bd098a
|
@@ -5,73 +5,61 @@ on:
|
|
5
5
|
branches: [ main ]
|
6
6
|
pull_request:
|
7
7
|
branches: [ main ]
|
8
|
+
workflow_dispatch:
|
8
9
|
|
9
10
|
env:
|
10
11
|
LOOKERSDK_BASE_URL: https://localhost:20000
|
11
12
|
LOOKERSDK_VERIFY_SSL: false
|
12
|
-
LOOKERSDK_CLIENT_ID: ${{ secrets.
|
13
|
-
LOOKERSDK_CLIENT_SECRET: ${{ secrets.
|
13
|
+
LOOKERSDK_CLIENT_ID: ${{ secrets.LOOKERSDK_CLIENT_ID }}
|
14
|
+
LOOKERSDK_CLIENT_SECRET: ${{ secrets.LOOKERSDK_CLIENT_SECRET }}
|
14
15
|
|
15
16
|
jobs:
|
17
|
+
setup:
|
18
|
+
uses: looker-open-source/reusable-actions/.github/workflows/supported-versions.yml@main
|
19
|
+
|
16
20
|
test:
|
17
|
-
name: Test -
|
18
|
-
runs-on:
|
21
|
+
name: Test - Looker.${{ matrix.looker }} / Ruby.${{ matrix.ruby-version }}
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
needs: setup
|
19
24
|
strategy:
|
20
25
|
matrix:
|
21
|
-
|
22
|
-
|
23
|
-
looker:
|
24
|
-
- '21_18'
|
25
|
-
- '21_20'
|
26
|
-
- '22_0'
|
27
|
-
ruby-version: [2.5.8]
|
26
|
+
looker: ${{ fromJson(needs.setup.outputs.matrix_json) }}
|
27
|
+
ruby-version: [2.7.7]
|
28
28
|
|
29
29
|
steps:
|
30
|
-
-
|
30
|
+
- name: Cancel Previous Runs
|
31
|
+
uses: styfle/cancel-workflow-action@0.11.0
|
32
|
+
with:
|
33
|
+
access_token: ${{ secrets.GITHUB_TOKEN }}
|
31
34
|
|
32
|
-
-
|
33
|
-
|
35
|
+
- uses: actions/checkout@v3
|
36
|
+
|
37
|
+
- name: Authenticate to Google Cloud
|
38
|
+
uses: google-github-actions/auth@v1.0.0
|
34
39
|
with:
|
40
|
+
credentials_json: ${{ secrets.GCP_AR_READER_SA_KEY }}
|
35
41
|
project_id: ${{ secrets.GCP_PROJECT_ID }}
|
36
|
-
|
37
|
-
|
42
|
+
create_credentials_file: true
|
43
|
+
export_environment_variables: true
|
44
|
+
|
45
|
+
- name: Set up Cloud SDK
|
46
|
+
uses: google-github-actions/setup-gcloud@v1.1.0
|
38
47
|
|
39
48
|
- name: Authenticate Artifact Repository
|
40
49
|
run: gcloud auth configure-docker us-west1-docker.pkg.dev --quiet
|
41
50
|
|
42
51
|
- name: Pull and run Looker docker image
|
43
|
-
# TODO: can we cache some layers of the image for faster download?
|
44
|
-
# we probably don't want to cache the final image for IP security...
|
45
52
|
run: |
|
46
53
|
docker pull --quiet us-west1-docker.pkg.dev/cloud-looker-sdk-codegen-cicd/looker/${{ matrix.looker }}
|
47
54
|
# set $LOOKER_OPTS to --no-ssl if we want to turn off ssl
|
48
55
|
docker run --name looker-sdk-codegen-ci -d -p 10000:9999 -p 20000:19999 us-west1-docker.pkg.dev/cloud-looker-sdk-codegen-cicd/looker/${{ matrix.looker }}
|
49
56
|
docker logs -f looker-sdk-codegen-ci --until=30s &
|
50
57
|
|
51
|
-
- name: Determine credentials version
|
52
|
-
# Prior to 21_18, each version had different credentials and a
|
53
|
-
# different secret. 21_20 and later all use the same credentials
|
54
|
-
# as 21_18. The parse_version.sh script parses the version and
|
55
|
-
# yields 21_12, 21_14, 21_16 etc for those versions but 21_18 for
|
56
|
-
# anything 21_18, 21_20, 22_0, etc.
|
57
|
-
#
|
58
|
-
# This can be factored out entirely once 21_18 is the earliest
|
59
|
-
# supported looker version.
|
60
|
-
run: |
|
61
|
-
echo "CREDENTIALS_VERSION=$(${{ github.workspace }}/.github/scripts/parse_version.sh <<< ${{ matrix.looker }})" >> $GITHUB_ENV
|
62
|
-
|
63
|
-
- name: Set up Looker credentials
|
64
|
-
# Load the correct credentials based on the version from
|
65
|
-
# the prior step.
|
66
|
-
run: |
|
67
|
-
echo "LOOKERSDK_CLIENT_ID=${{ secrets[format('LOOKERSDK_CLIENT_ID__{0}', env.CREDENTIALS_VERSION )] }}" >> $GITHUB_ENV
|
68
|
-
echo "LOOKERSDK_CLIENT_SECRET=${{ secrets[format('LOOKERSDK_CLIENT_SECRET__{0}', env.CREDENTIALS_VERSION )] }}" >> $GITHUB_ENV
|
69
|
-
|
70
58
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
71
59
|
uses: ruby/setup-ruby@v1
|
72
60
|
with:
|
73
61
|
ruby-version: ${{ matrix.ruby-version }}
|
74
|
-
bundler-cache:
|
62
|
+
bundler-cache: false
|
75
63
|
|
76
64
|
- name: Install dependencies
|
77
65
|
run: bundle install
|
@@ -80,5 +68,51 @@ jobs:
|
|
80
68
|
run: |
|
81
69
|
${{ github.workspace }}/.github/scripts/wait_for_looker.sh
|
82
70
|
|
71
|
+
- name: Report Failure
|
72
|
+
run: |
|
73
|
+
curl --request POST \
|
74
|
+
--url https://api.github.com/repos/looker-open-source/sdk-codegen/check-runs \
|
75
|
+
--header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
76
|
+
--header "content-type: application/json" \
|
77
|
+
--header "Accept: application/vnd.github.v3+json" \
|
78
|
+
--data '{
|
79
|
+
"name": "Ruby-CI Tests",
|
80
|
+
"head_sha": "${{ github.event.pull_request.head.sha || github.sha }}",
|
81
|
+
"conclusion": "failure"
|
82
|
+
}' \
|
83
|
+
--fail
|
84
|
+
if: failure()
|
85
|
+
|
83
86
|
- name: Run tests
|
84
87
|
run: bundle exec rake
|
88
|
+
|
89
|
+
- name: Upload ts unit test results
|
90
|
+
if: ${{ always() }}
|
91
|
+
uses: actions/upload-artifact@v2
|
92
|
+
with:
|
93
|
+
name: ruby-ci-test-results-${{ matrix.looker }}
|
94
|
+
path: rspec.xml
|
95
|
+
|
96
|
+
publish-test-results:
|
97
|
+
needs: [test]
|
98
|
+
if: success() || failure()
|
99
|
+
runs-on: ubuntu-latest
|
100
|
+
|
101
|
+
steps:
|
102
|
+
- name: Download Artifacts
|
103
|
+
uses: actions/download-artifact@v2
|
104
|
+
with:
|
105
|
+
path: artifacts
|
106
|
+
|
107
|
+
- name: Publish Test Results
|
108
|
+
uses: EnricoMi/publish-unit-test-result-action@v1.12
|
109
|
+
with:
|
110
|
+
# Cosmetic issue with `check_name` being associated to the wrong
|
111
|
+
# workflow: https://github.com/EnricoMi/publish-unit-test-result-action/issues/12
|
112
|
+
check_name: Ruby-CI Tests
|
113
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
114
|
+
report_individual_runs: true
|
115
|
+
hide_comments: orphaned commits
|
116
|
+
check_run_annotations: 'none'
|
117
|
+
compare_to_earlier_commit: false
|
118
|
+
files: 'artifacts/**/*.xml'
|
data/.rspec
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.7.7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### [0.2.59](https://www.github.com/looker-open-source/gzr/compare/v0.2.58...v0.2.59) (2023-03-29)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* migrate to API 4.0 ([#154](https://www.github.com/looker-open-source/gzr/issues/154)) ([eecdfd4](https://www.github.com/looker-open-source/gzr/commit/eecdfd41a886f2edbac528a34f83dc7a6ea83f74))
|
9
|
+
|
10
|
+
### [0.2.58](https://www.github.com/looker-open-source/gzr/compare/v0.2.57...v0.2.58) (2023-03-16)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* temporary fix for faraday 2.x in looker-sdk ([#159](https://www.github.com/looker-open-source/gzr/issues/159)) ([d89f813](https://www.github.com/looker-open-source/gzr/commit/d89f8138587c2986352be25b59bda79d07ea2bb4))
|
16
|
+
|
17
|
+
### [0.2.57](https://www.github.com/looker-open-source/gzr/compare/v0.2.56...v0.2.57) (2023-03-16)
|
18
|
+
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* temporary fix for faraday 2.x in looker-sdk ([acdb7e8](https://www.github.com/looker-open-source/gzr/commit/acdb7e8a174cd3dde5d8c95c95e572ec331b948f))
|
23
|
+
|
3
24
|
### [0.2.56](https://www.github.com/looker-open-source/gzr/compare/v0.2.55...v0.2.56) (2022-07-14)
|
4
25
|
|
5
26
|
### Bug Fixes
|
data/Gemfile
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
RUBY_VERSION = File.read(File.join(File.dirname(__FILE__), '.ruby-version')).split('-').last.chomp
|
23
23
|
|
24
|
-
ruby '2.
|
24
|
+
ruby '2.7.7', engine: 'ruby', engine_version: '2.7.7'
|
25
25
|
|
26
26
|
source "https://rubygems.org"
|
27
27
|
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gazer (0.2.
|
5
|
-
looker-sdk (~> 0.1.1)
|
4
|
+
gazer (0.2.59)
|
5
|
+
looker-sdk (~> 0.1.1, <= 0.1.2)
|
6
6
|
net-http-persistent (~> 4.0, >= 4.0.1)
|
7
7
|
netrc (~> 0.11.0)
|
8
8
|
pastel (~> 0.8.0)
|
@@ -15,11 +15,11 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
addressable (2.8.
|
19
|
-
public_suffix (>= 2.0.2, <
|
20
|
-
connection_pool (2.
|
18
|
+
addressable (2.8.1)
|
19
|
+
public_suffix (>= 2.0.2, < 6.0)
|
20
|
+
connection_pool (2.4.0)
|
21
21
|
diff-lcs (1.4.4)
|
22
|
-
faraday (1.10.
|
22
|
+
faraday (1.10.3)
|
23
23
|
faraday-em_http (~> 1.0)
|
24
24
|
faraday-em_synchrony (~> 1.0)
|
25
25
|
faraday-excon (~> 1.1)
|
@@ -45,7 +45,7 @@ GEM
|
|
45
45
|
looker-sdk (0.1.2)
|
46
46
|
faraday (>= 1.2, < 2.0)
|
47
47
|
sawyer (~> 0.8)
|
48
|
-
multipart-post (2.
|
48
|
+
multipart-post (2.3.0)
|
49
49
|
net-http-persistent (4.0.1)
|
50
50
|
connection_pool (~> 2.2)
|
51
51
|
netrc (0.11.0)
|
@@ -66,6 +66,8 @@ GEM
|
|
66
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
67
67
|
rspec-support (~> 3.10.0)
|
68
68
|
rspec-support (3.10.2)
|
69
|
+
rspec_junit_formatter (0.6.0)
|
70
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
69
71
|
ruby2_keywords (0.0.5)
|
70
72
|
rubyzip (1.3.0)
|
71
73
|
sawyer (0.9.2)
|
@@ -89,7 +91,7 @@ GEM
|
|
89
91
|
strings (~> 0.2.0)
|
90
92
|
tty-screen (~> 0.8)
|
91
93
|
tty-tree (0.4.0)
|
92
|
-
unicode-display_width (2.2
|
94
|
+
unicode-display_width (2.4.2)
|
93
95
|
unicode_utils (1.4.0)
|
94
96
|
wisper (2.0.1)
|
95
97
|
|
@@ -102,9 +104,10 @@ DEPENDENCIES
|
|
102
104
|
gazer!
|
103
105
|
rake (~> 12.3, >= 12.3.3)
|
104
106
|
rspec (~> 3.0)
|
107
|
+
rspec_junit_formatter
|
105
108
|
|
106
109
|
RUBY VERSION
|
107
|
-
ruby 2.
|
110
|
+
ruby 2.7.7p221
|
108
111
|
|
109
112
|
BUNDLED WITH
|
110
|
-
2.
|
113
|
+
2.4.7
|
data/README.md
CHANGED
@@ -3,6 +3,16 @@
|
|
3
3
|
Gazer can be used to navigate and manage Spaces, Looks,
|
4
4
|
and Dashboards via a simple command line tool.
|
5
5
|
|
6
|
+
<br/>
|
7
|
+
|
8
|
+
## *Attention*
|
9
|
+
|
10
|
+
> This project is on a path towards deprecation in favor of (Looker Deployer)[https://github.com/looker-open-source/looker_deployer]. New users should start with Looker Deployer if possible.
|
11
|
+
>
|
12
|
+
> Looker Deployer is based on newer Looker APIs and is intended to provide a superset of CLI functionality, including content migration features.
|
13
|
+
|
14
|
+
<br/>
|
15
|
+
|
6
16
|
## Status and Support
|
7
17
|
|
8
18
|
As of November 2021, Gazer is supported, but not warrantied by Bytecode IO, Inc. Issues and feature requests can be reported via https://github.com/looker-open-source/gzr/issues, which will be regularly monitored and prioritized by Bytecode IO, Inc., a preferred Looker consulting partner.
|
data/gzr.gemspec
CHANGED
@@ -59,10 +59,11 @@ Gem::Specification.new do |spec|
|
|
59
59
|
spec.add_runtime_dependency 'thor', '~> 1.1', '>= 1.1.0'
|
60
60
|
spec.add_dependency 'netrc', "~> 0.11.0"
|
61
61
|
spec.add_runtime_dependency 'rubyzip', '~> 1.3', '>= 1.3.0'
|
62
|
-
spec.add_dependency 'looker-sdk', "~> 0.1.1"
|
62
|
+
spec.add_dependency 'looker-sdk', "~> 0.1.1", "<= 0.1.2"
|
63
63
|
spec.add_runtime_dependency 'net-http-persistent', '~> 4.0', '>= 4.0.1'
|
64
64
|
|
65
65
|
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.10'
|
66
66
|
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
67
67
|
spec.add_development_dependency "rspec", "~> 3.0"
|
68
|
+
spec.add_development_dependency "rspec_junit_formatter"
|
68
69
|
end
|
data/lib/gzr/modules/session.rb
CHANGED
@@ -51,7 +51,7 @@ module Gzr
|
|
51
51
|
|
52
52
|
def sufficient_version?(given_version, minimum_version)
|
53
53
|
return true unless (given_version && minimum_version)
|
54
|
-
versions = @versions.
|
54
|
+
versions = @versions.sort
|
55
55
|
!versions.drop_while {|v| v < minimum_version}.reverse.drop_while {|v| v > given_version}.empty?
|
56
56
|
end
|
57
57
|
|
@@ -154,8 +154,8 @@ module Gzr
|
|
154
154
|
|
155
155
|
begin
|
156
156
|
versions_response = agent.call(:get,"/versions")
|
157
|
-
@versions = versions_response.data.supported_versions
|
158
|
-
@current_version = "
|
157
|
+
@versions = versions_response.data.supported_versions.map {|v| v.version}
|
158
|
+
@current_version = versions_response.data.current_version.version || "4.0"
|
159
159
|
rescue Faraday::SSLError => e
|
160
160
|
raise Gzr::CLI::Error, "SSL Certificate could not be verified\nDo you need the --no-verify-ssl option or the --no-ssl option?"
|
161
161
|
rescue Faraday::ConnectionFailed => cf
|
@@ -166,13 +166,13 @@ module Gzr
|
|
166
166
|
end
|
167
167
|
|
168
168
|
say_warning "API current_version #{@current_version}" if @options[:debug]
|
169
|
-
say_warning "API versions #{@versions
|
169
|
+
say_warning "API versions #{@versions}" if @options[:debug]
|
170
170
|
|
171
171
|
raise Gzr::CLI::Error, "Operation requires API v#{min_api_version}, but user specified version #{@options[:api_version]}" unless sufficient_version?(@options[:api_version],min_api_version)
|
172
172
|
|
173
173
|
api_version = [min_api_version, @current_version].max
|
174
|
-
raise Gzr::CLI::Error, "Operation requires API v#{api_version}, which is not available from this host" if api_version && !@versions.any? {|v| v
|
175
|
-
raise Gzr::CLI::Error, "User specified API v#{@options[:api_version]}, which is not available from this host" if @options[:api_version] && !@versions.any? {|v| v
|
174
|
+
raise Gzr::CLI::Error, "Operation requires API v#{api_version}, which is not available from this host" if api_version && !@versions.any? {|v| v == api_version}
|
175
|
+
raise Gzr::CLI::Error, "User specified API v#{@options[:api_version]}, which is not available from this host" if @options[:api_version] && !@versions.any? {|v| v == @options[:api_version]}
|
176
176
|
|
177
177
|
conn_hash = build_connection_hash(@options[:api_version] || api_version)
|
178
178
|
@secret = nil
|
data/lib/gzr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gazer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike DeAngelo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-reader
|
@@ -127,6 +127,9 @@ dependencies:
|
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: 0.1.1
|
130
|
+
- - "<="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 0.1.2
|
130
133
|
type: :runtime
|
131
134
|
prerelease: false
|
132
135
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -134,6 +137,9 @@ dependencies:
|
|
134
137
|
- - "~>"
|
135
138
|
- !ruby/object:Gem::Version
|
136
139
|
version: 0.1.1
|
140
|
+
- - "<="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 0.1.2
|
137
143
|
- !ruby/object:Gem::Dependency
|
138
144
|
name: net-http-persistent
|
139
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -208,6 +214,20 @@ dependencies:
|
|
208
214
|
- - "~>"
|
209
215
|
- !ruby/object:Gem::Version
|
210
216
|
version: '3.0'
|
217
|
+
- !ruby/object:Gem::Dependency
|
218
|
+
name: rspec_junit_formatter
|
219
|
+
requirement: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - ">="
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '0'
|
224
|
+
type: :development
|
225
|
+
prerelease: false
|
226
|
+
version_requirements: !ruby/object:Gem::Requirement
|
227
|
+
requirements:
|
228
|
+
- - ">="
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '0'
|
211
231
|
description: This tool will help manage the content of a Looker instance.
|
212
232
|
email:
|
213
233
|
- drstrangelove@google.com
|
@@ -392,8 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
392
412
|
- !ruby/object:Gem::Version
|
393
413
|
version: '0'
|
394
414
|
requirements: []
|
395
|
-
|
396
|
-
rubygems_version: 2.7.6.2
|
415
|
+
rubygems_version: 3.1.6
|
397
416
|
signing_key:
|
398
417
|
specification_version: 4
|
399
418
|
summary: Command line tool to manage the content of a Looker instance.
|