vidar 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81b5542b60e88f4165e152cc98bc69d9dd2d3ba34c5d151981a31e23464d9f62
4
- data.tar.gz: c2d3521c07098cccd4a8a4b3dcf68f7b347acbb5ecbf54ce6e4b541a5dcfa945
3
+ metadata.gz: 32db9bbd5a1f6d83254a28eeac172e831877a5e9f284f7734bcc8251382ede28
4
+ data.tar.gz: 235c502c5c93e706bf796fc43964d61ceb2fdab8c8104967bc890f76f21a787f
5
5
  SHA512:
6
- metadata.gz: de96d9a6f2d6c774413e25303e5fd79a2b665a261e42cf72122372ec765d5f2f47f1d6fece991e951ec917c6f7f1b2aa80bc260f3b00938bf91170baaf3899f0
7
- data.tar.gz: 440e62b327e460fe185b8e7a5ceea33a8a57ed4e15f2d9653eceb77527510d6636b8792b4f9275fd67ecac662e3382c796f5739fac31c56ba5ea746b66f75453
6
+ metadata.gz: 74077f1ffeb2d51399b366a675f2f1336dad7ddaecbe63f7405113ce6d87b6e6210bb101076b88a65500662a53eae21b3ee5c2dd990ce287c830231b77c9f0f7
7
+ data.tar.gz: fe6eac89d2f0d3d129409db00f73cc46b2932a28f49cbc381ec75e02937ba93ec359648e3ed4b86f57dd56151ce1903340674bf70d910ec20ff2192dabf4a9a2
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to track an issue that has been identified
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Mutation/Query**
24
+
25
+ **URL and HTTP method (for non-GQL):**
26
+
27
+ **Sentry or Logs URL:**
28
+
29
+ **User/authentication details**
30
+ Impacted user name or service account
31
+
32
+ **Additional context**
33
+ Add any other context about the problem here.
@@ -0,0 +1 @@
1
+ blank_issues_enabled: false
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: New story
3
+ about: Add a new story for implementation
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the solution**
11
+ A clear and concise description of what you want to happen.
12
+ When will this feature be done?
13
+
14
+ **Describe the users**
15
+ Who are we building this feature for?
16
+
17
+ **Additional context**
18
+ Add any other context or screenshots about the feature request here.
19
+ Link to any applicable documents describing the feature.
20
+
21
+ **Designs**
22
+ Link to any applicable designs on Invision.
@@ -0,0 +1,18 @@
1
+ ## Description
2
+ <!--- Describe your changes in detail -->
3
+
4
+ ## Related issue(s)
5
+ <!--- GH issue number -->
6
+
7
+ ## Motivation and Context
8
+ <!--- Why is this change required? What problem does it solve? -->
9
+ <!--- If it fixes an open issue, please link to the issue here. -->
10
+
11
+ ## How Has This Been Tested?
12
+ <!--- Please describe in detail how you tested your changes. -->
13
+
14
+ ## Screenshots (if appropriate):
15
+ <!--- Please add any screenshots of the feature. -->
16
+
17
+ ## Related PRs
18
+ <!--- Please add links to any related PRs (backend, component packages, etc). -->
@@ -0,0 +1,16 @@
1
+ # automatically approve PRs submitted by Dependabot
2
+ # this will allow Dependabot to automatically merge dependency update PRs where CI passes
3
+ # from: https://github.com/hmarr/auto-approve-action
4
+ name: Auto approve Dependabot PRs
5
+
6
+ on:
7
+ pull_request
8
+
9
+ jobs:
10
+ auto-approve:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: hmarr/auto-approve-action@v2.0.0
14
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
15
+ with:
16
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vidar (1.1.2)
4
+ vidar (1.1.3)
5
5
  colorize
6
6
  faraday
7
7
  thor (~> 1.0)
@@ -11,18 +11,17 @@ GEM
11
11
  specs:
12
12
  ast (2.4.0)
13
13
  awesome_print (1.8.0)
14
- coderay (1.1.2)
14
+ coderay (1.1.3)
15
15
  colorize (0.8.1)
16
16
  diff-lcs (1.3)
17
17
  faraday (1.0.1)
18
18
  multipart-post (>= 1.2, < 3)
19
- jaro_winkler (1.5.4)
20
19
  method_source (1.0.0)
21
20
  multipart-post (2.1.1)
22
21
  parallel (1.19.1)
23
- parser (2.7.0.5)
22
+ parser (2.7.1.3)
24
23
  ast (~> 2.4.0)
25
- pry (0.13.0)
24
+ pry (0.13.1)
26
25
  coderay (~> 1.1)
27
26
  method_source (~> 1.0)
28
27
  rainbow (3.0.0)
@@ -32,26 +31,28 @@ GEM
32
31
  rspec-core (~> 3.9.0)
33
32
  rspec-expectations (~> 3.9.0)
34
33
  rspec-mocks (~> 3.9.0)
35
- rspec-core (3.9.1)
36
- rspec-support (~> 3.9.1)
37
- rspec-expectations (3.9.1)
34
+ rspec-core (3.9.2)
35
+ rspec-support (~> 3.9.3)
36
+ rspec-expectations (3.9.2)
38
37
  diff-lcs (>= 1.2.0, < 2.0)
39
38
  rspec-support (~> 3.9.0)
40
39
  rspec-mocks (3.9.1)
41
40
  diff-lcs (>= 1.2.0, < 2.0)
42
41
  rspec-support (~> 3.9.0)
43
- rspec-support (3.9.2)
44
- rubocop (0.81.0)
45
- jaro_winkler (~> 1.5.1)
42
+ rspec-support (3.9.3)
43
+ rubocop (0.84.0)
46
44
  parallel (~> 1.10)
47
45
  parser (>= 2.7.0.1)
48
46
  rainbow (>= 2.2.2, < 4.0)
49
47
  rexml
48
+ rubocop-ast (>= 0.0.3)
50
49
  ruby-progressbar (~> 1.7)
51
50
  unicode-display_width (>= 1.4.0, < 2.0)
52
- rubocop-performance (1.5.2)
51
+ rubocop-ast (0.0.3)
52
+ parser (>= 2.7.0.1)
53
+ rubocop-performance (1.6.0)
53
54
  rubocop (>= 0.71.0)
54
- rubocop-rspec (1.38.1)
55
+ rubocop-rspec (1.39.0)
55
56
  rubocop (>= 0.68.1)
56
57
  ruby-progressbar (1.10.1)
57
58
  thor (1.0.1)
@@ -3,18 +3,22 @@ module Vidar
3
3
  class Container
4
4
  JOB_KIND = "Job".freeze
5
5
 
6
- attr_reader :data, :state, :namespace, :kind, :pod_name
6
+ attr_reader :data, :state, :namespace,
7
+ :kind, :pod_name,
8
+ :reason, :message
7
9
 
8
10
  def initialize(data)
9
11
  @data = data
10
- @state = data["state"]
12
+ @state = data["state"] || {}
11
13
  @namespace = data["namespace"]
12
14
  @kind = data["kind"]
13
15
  @pod_name = data["pod_name"]
16
+ @reason = data["reason"]
17
+ @message = data["message"]
14
18
  end
15
19
 
16
20
  def name
17
- data["name"]
21
+ data["name"] || pod_name
18
22
  end
19
23
 
20
24
  def deployed?
@@ -40,13 +44,15 @@ module Vidar
40
44
  def to_text
41
45
  parts = []
42
46
  parts << namespace.to_s.ljust(20, " ")
43
- parts << name.to_s.ljust(25, " ")
44
- parts += text_statuses.map { |s| s.ljust(40, " ") }
47
+ parts << name.to_s.ljust(35, " ")
48
+ parts += text_statuses.map { |s| s.ljust(45, " ") }
45
49
  "| #{parts.join(' | ')} |"
46
50
  end
47
51
 
48
52
  def text_statuses
49
- if running?
53
+ if unschedulable?
54
+ [ColorizedString["Unschedulable"].light_red, ColorizedString[message].light_red]
55
+ elsif running?
50
56
  if job?
51
57
  [ColorizedString["Running"].light_yellow, "Started at: #{running_started_at}"]
52
58
  elsif ready?
@@ -97,6 +103,10 @@ module Vidar
97
103
  state.dig("terminated", "reason") == "Error" || state.dig("terminated", "exitCode")
98
104
  end
99
105
 
106
+ def unschedulable?
107
+ reason == "Unschedulable"
108
+ end
109
+
100
110
  def job?
101
111
  kind == JOB_KIND
102
112
  end
@@ -65,7 +65,7 @@ module Vidar
65
65
  owner_references = i.dig("metadata", "ownerReferences") || []
66
66
  kind = (owner_references[0] || {})["kind"]
67
67
  namespace = i.dig("metadata", "namespace")
68
- statuses = i.dig("status", "containerStatuses") || []
68
+ statuses = i.dig("status", "containerStatuses") || i.dig("status", "conditions") || []
69
69
  statuses.each do |s|
70
70
  s["namespace"] = namespace
71
71
  s["kind"] = kind
@@ -2,7 +2,7 @@ module Vidar
2
2
  class Log
3
3
  class << self
4
4
  def line
5
- puts "|" + "-" * 122 + "|"
5
+ puts "|" + "-" * 142 + "|"
6
6
  end
7
7
 
8
8
  def info(text, fill_with = "#")
@@ -1,3 +1,3 @@
1
1
  module Vidar
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vidar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-04-03 00:00:00.000000000 Z
12
+ date: 2020-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize
@@ -175,6 +175,11 @@ extensions: []
175
175
  extra_rdoc_files: []
176
176
  files:
177
177
  - ".dependabot/config.yml"
178
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
179
+ - ".github/ISSUE_TEMPLATE/config.yml"
180
+ - ".github/ISSUE_TEMPLATE/story.md"
181
+ - ".github/PULL_REQUEST_TEMPLATE.md"
182
+ - ".github/workflows/auto-approve.yml"
178
183
  - ".gitignore"
179
184
  - ".rspec"
180
185
  - ".travis.yml"