aptible-cli 0.24.1 → 0.24.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57fd2762ecb6e2608548c08837ffa4c9cc3b233b4c4c12aae197001acd6c090a
4
- data.tar.gz: a9612cf83e1fbd680b6b0cc41daab09a7028f581b3f52bb6663b176e77b9a321
3
+ metadata.gz: a86dab95f37f3e63919dd105b9eca70af63753165bfa6fb2436e626844831bdd
4
+ data.tar.gz: 01ee1b79365b6a8cbb1399843de3abbc7857e061c6b376ac57b355a55c34e8f6
5
5
  SHA512:
6
- metadata.gz: b044b0ead595595831ec2608c48cfe0782de00272f424b21c5e2c4c8f384d2d3778d5f1aa331ff3e55e77e3670582f49d13245ca10b77a6986efc4d360fb847e
7
- data.tar.gz: 0a8a57cfd54a701edd13355b3048d570d0ba6a8f4d64199c95ec24130c34e1baf7a08afc79142df48f6d3cc37099a75bb452a7ae22c32c3dac53a753b9ce17f6
6
+ metadata.gz: 404722114100e706aee73134ad66100f5ddeaf71417eea3b8ac065c493acd17f5a2464a0542233fc0fe20af3b26d4b0fc3598ac87b799396238cbf05bc559738
7
+ data.tar.gz: 2c3a6d45e49401f49ef01985a927f221c029c724ef79993388a42dded813989a57868636d4c4b313a6decb756255dbbb9bce08e67770a3ba7fea654ea18bf946
@@ -48,3 +48,18 @@ jobs:
48
48
  contains(needs.*.result, 'failure')
49
49
  || contains(needs.*.result, 'cancelled')
50
50
  }}
51
+
52
+ report-version:
53
+ runs-on: ubuntu-latest
54
+ if: github.ref == 'refs/heads/master'
55
+ steps:
56
+ - name: Report version
57
+ run: |
58
+ curl -sS -X POST -u "$ENFORCER_USERNAME:$ENFORCER_PASSWORD" \
59
+ -H "Content-Type: application/json" \
60
+ -d '{"name":"aptible-cli", "type":"client", "version": "${{ github.sha }}"}' \
61
+ "$ENFORCER_API/repo_version"
62
+ env:
63
+ ENFORCER_API: https://app-83237.aptible-test-leeroy.com
64
+ ENFORCER_USERNAME: aptible
65
+ ENFORCER_PASSWORD: ${{ secrets.ENFORCER_PASSWORD }}
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aptible-cli (0.24.1)
4
+ aptible-cli (0.24.2)
5
5
  activesupport (>= 4.0, < 6.0)
6
6
  aptible-api (~> 1.6.5)
7
7
  aptible-auth (~> 1.2.5)
@@ -38,8 +38,10 @@ module Aptible
38
38
  # operation failed, poll_for_success will immediately fall through to
39
39
  # the error message.
40
40
  unless code == 0
41
- e = 'Disconnected from logs, waiting for operation to complete'
42
- CLI.logger.warn e
41
+ msg = ['Disconnected from logs, waiting for operation to complete',
42
+ 'Once complete, the logs can be viewed here:',
43
+ " #{ui_log_url(operation)}"]
44
+ msg.each { |e| CLI.logger.warn e }
43
45
  poll_for_success(operation)
44
46
  end
45
47
  end
@@ -76,8 +78,9 @@ module Aptible
76
78
  res = http.request(Net::HTTP::Get.new(uri.request_uri, headers))
77
79
  # note: res body with a 200 is target redirect location for download
78
80
  if !res || res.code != '200' || res.body.nil?
79
- raise Thor::Error, 'Unable to retrieve the operation\'s logs. '\
80
- 'If the issue persists please contact support for assistance.'
81
+ raise Thor::Error, 'Unable to retrieve the operation\'s logs. ' \
82
+ 'If the issue persists please contact support for assistance, or ' \
83
+ "view them at #{ui_log_url(operation)}"
81
84
  end
82
85
  res
83
86
  end
@@ -96,6 +99,10 @@ module Aptible
96
99
  end
97
100
  res
98
101
  end
102
+
103
+ def ui_log_url(operation)
104
+ "https://app.aptible.com/operations/#{operation.id}"
105
+ end
99
106
  end
100
107
  end
101
108
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.24.1'.freeze
3
+ VERSION = '0.24.2'.freeze
4
4
  end
5
5
  end
@@ -142,7 +142,8 @@ describe Aptible::CLI::Agent do
142
142
 
143
143
  expect { subject.send('operation:logs', 1) }
144
144
  .to raise_error('Unable to retrieve the operation\'s logs. '\
145
- 'If the issue persists please contact support for assistance.')
145
+ 'If the issue persists please contact support for assistance, ' \
146
+ "or view them at https://app.aptible.com/operations/#{operation_id}")
146
147
  end
147
148
  it 'errors when body is empty' do
148
149
  operation_id = SecureRandom.uuid
@@ -163,7 +164,8 @@ describe Aptible::CLI::Agent do
163
164
 
164
165
  expect { subject.send('operation:logs', 1) }
165
166
  .to raise_error('Unable to retrieve the operation\'s logs. '\
166
- 'If the issue persists please contact support for assistance.')
167
+ 'If the issue persists please contact support for assistance, ' \
168
+ "or view them at https://app.aptible.com/operations/#{operation_id}")
167
169
  end
168
170
  it 'errors when s3 itself returns an error code' do
169
171
  operation_id = SecureRandom.uuid
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.1
4
+ version: 0.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-26 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport