Skip to content

Commit 2b95637

Browse files
author
Jordan Mance
committed
Merge branch 'develop'
2 parents 3a282c7 + 3b3f46f commit 2b95637

File tree

9 files changed

+41
-22
lines changed

9 files changed

+41
-22
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
scripts/install.sh
3232
3333
- name: Run E2E Test Suite
34+
env:
35+
FIGGY_DISABLE_KEYRING: true
36+
OVERRIDE_KEYRING: true
3437
run: |
3538
export TERM=linux
3639
export TERMINFO=/etc/terminfo
@@ -62,6 +65,7 @@ jobs:
6265
# scripts/install.sh
6366
# - name: Run E2E Test Suite
6467
# env:
68+
# FIGGY_DISABLE_KEYRING: true
6569
# OVERRIDE_KEYRING: true
6670
# GOOGLE_IDP_ID: ${{ secrets.GOOGLE_IDP_ID }}
6771
# GOOGLE_SP_ID: ${{ secrets.GOOGLE_SP_ID }}
@@ -99,6 +103,7 @@ jobs:
99103
100104
- name: Run E2E Test Suite
101105
env:
106+
FIGGY_DISABLE_KEYRING: true
102107
OVERRIDE_KEYRING: true
103108
OKTA_SSO_USER: ${{ secrets.OKTA_SSO_USER }}
104109
OKTA_SSO_PASSWORD: ${{ secrets.OKTA_SSO_PASSWORD }}
@@ -120,8 +125,6 @@ jobs:
120125
python-version: 3.8
121126

122127
- name: Install dependencies
123-
env:
124-
FIGGY_TEST: true
125128
run: |
126129
sudo apt-get update \
127130
&& sudo apt-get install libusb-1.0-0-dev libxmu-dev libxmu-headers \
@@ -136,15 +139,19 @@ jobs:
136139
137140
- name: Run E2E Test Suite
138141
env:
142+
FIGGY_DISABLE_KEYRING: true
139143
OVERRIDE_KEYRING: true
140-
CONFIG_FILE: ${{ secrets.CONFIG_FILE }}
141-
CREDENTIALS_FILE: ${{ secrets.CREDENTIALS_FILE }}
144+
CONFIG_DEFAULT: ${{ secrets.CONFIG_FILE }}
145+
CREDENTIALS_FILE: ${{ secrets.QA_TESTER_CREDENTIALS_FILE }}
146+
CONFIG_FILE: ${{ secrets.QA_TESTER_CONFIG_FILE }}
147+
AWS_REGION: us-east-1
142148
run: |
143149
mkdir -p ~/.aws
144-
echo "$CONFIG_FILE" > ~/.aws/config
145150
echo "$CREDENTIALS_FILE" > ~/.aws/credentials
151+
echo "$CONFIG_FILE" > ~/.aws/config
146152
153+
cat ~/.aws/config
147154
export TERM=linux
148155
export TERMINFO=/etc/terminfo
149156
cd cli
150-
python run_tests.py profile default
157+
python run_tests.py profile figgy-qa-tester

cli/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Figgy Changelog:
22

3+
## 0.0.34
4+
- Forcing release to address brew issue
5+
36
## 0.0.33
47
- Adding a set of default places to search for the figgy.json file to reduce keystrokes.
58

@@ -11,7 +14,7 @@ Figgy Changelog:
1114
only with the user's locally configured & targeted AWSCLI profile. This will be very useful for CICD builds and for
1215
some teams who only have a single AWS account.
1316

14-
- Renaming `figgy` package to `figcli` to prevent name collission shenanigans with the new `figgy-lib` package.
17+
- Renaming `figgy` package to `figcli` to prevent name collission shenanigans with the new `figgy-lib` package.
1518

1619
## 0.0.30a
1720
- Naming figgy.json properties to their new 'figgy'names.

cli/figcli/commands/help/upgrade.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def __init__(self, help_context: HelpContext):
2020
self._utils = Utils(colors_enabled=help_context.defaults.colors_enabled)
2121

2222
def upgrade(self):
23+
self._utils.error_exit("This command has been deprecated and disabled. Please use the standard upgrade process"
24+
"through `homebrew` or `pip`.")
2325
latest_version: FiggyVersionDetails = self.tracker.get_version()
2426

2527
if latest_version.version == VERSION:

cli/figcli/config/constants.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pathlib import Path
22

3-
VERSION = '0.0.33'
3+
VERSION = '0.0.34'
44
CLI_NAME = 'figgy'
55
PROJECT_NAME = 'figgy'
66

@@ -13,6 +13,9 @@
1313
FIGGY_GET_VERSION_URL = f"{FIGGY_OBS_API_BASE_URL}/v1/version"
1414
FIGGY_LOG_METRICS_URL = f"{FIGGY_OBS_API_BASE_URL}/v1/log-metrics"
1515

16+
# Homebrew
17+
BREW_FORMULA = 'mancej/figgy/figgy'
18+
1619
# Role names are assumed to be prefixed with `figgy-` - Users may override by setting the below ENV variable.
1720
FIGGY_ROLE_NAME_PREFIX = 'figgy-'
1821
FIGGY_ROLE_PREFIX_OVERRIDE_ENV = 'FIGGY_ROLE_PREFIX_OVERRIDE'

cli/figcli/svcs/observability/version_tracker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ def print_new_version_msg(c: Color, new_details: FiggyVersionDetails):
9494
print(f"Current Version: {c.fg_yl}{VERSION}{c.rs}")
9595
print(f"New Version: {c.fg_bl}{new_details.version}{c.rs}")
9696
print(f"To see what the new version has in store for you, run `{CLI_NAME} --version`")
97-
print(f"To upgrade, run `brew upgrade figgy` or `pip install figgy-cli --upgrade`")
97+
print(f"To upgrade, run `brew upgrade {BREW_FORMULA}` or `pip install figgy-cli --upgrade`")
9898
print(f'{c.fg_bl}------------------------------------------{c.rs}')
9999
else:
100100
print(f'\n{c.fg_bl}------------------------------------------{c.rs}')
101-
print(f'Figgy was rolled back due to a major issue and you\'re on a bad version!')
101+
print(f'Figgy was rolled back due to an issue and you\'re on a bad version!')
102102
print(f"Current Version: {c.fg_yl}{VERSION}{c.rs}")
103103
print(f"Recommended Version: {c.fg_bl}{new_details.version}{c.rs}")
104-
print(f"To roll-back, run `brew upgrade figgy` or `pip install figgy-cli --upgrade`")
104+
print(f"To roll-back, run `brew upgrade {BREW_FORMULA}` or `pip install figgy-cli --upgrade`")
105105
print(f'{c.fg_bl}------------------------------------------{c.rs}')
106106

107107
@staticmethod

cli/figcli/test/cli/dev/validate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
2+
import time
33
import pexpect
44

55
from figcli.test.cli.config import *
@@ -23,7 +23,10 @@ def run(self):
2323

2424
def validate_success(self):
2525
sync = DevSync(extra_args=self.extra_args)
26+
sync.prep_sync()
2627
sync.sync_success()
28+
print("Sleeping to give time for replication")
29+
time.sleep(50)
2730

2831
print(f"Testing: {CLI_NAME} config {Utils.get_first(validate)} --env {DEFAULT_ENV} "
2932
f"--config figcli/test/assets/success/figgy.json {self.extra_args}")

cli/figcli/test/cli/sso/okta/configure.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
class ConfigureOkta(FiggyTest):
99
def __init__(self, role_type: str):
1010
self._role_type = role_type
11-
super().__init__(pexpect.spawn(f'{CLI_NAME} --{Utils.get_first(configure)} --skip-upgrade',
12-
encoding='utf-8', timeout=10))
13-
# self._child = pexpect.spawn(f'{CLI_NAME} --{Utils.get_first(configure)} --skip-upgrade',
14-
# encoding='utf-8', timeout=10)
11+
super().__init__(None)
12+
self._child = pexpect.spawn(f'{CLI_NAME} --{Utils.get_first(configure)} --skip-upgrade',
13+
encoding='utf-8', timeout=10)
1514

1615
def run(self):
1716
self.step(f"Testing `{CLI_NAME} --{Utils.get_first(configure)}`")

cli/run_tests.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def main():
8484
# Login to DEV Role
8585
print_test("Google DEV Login")
8686
ConfigureGoogle('dev').run()
87-
dev_tests()
87+
dev_tests(key_down_to_shared=1)
8888

8989
clear_cache()
9090

@@ -96,7 +96,7 @@ def main():
9696
# Login to DEV Role
9797
print_test("Bastion DEV Login")
9898
DevLogin(BASTION_ENV).run()
99-
dev_tests()
99+
dev_tests(key_down_to_shared=1)
100100

101101
clear_cache()
102102
# Login to data role
@@ -107,7 +107,7 @@ def main():
107107
elif auth_type.lower() == 'okta':
108108
print_test("OKTA DEV Login")
109109
ConfigureOkta('dev').run()
110-
dev_tests()
110+
dev_tests(key_down_to_shared=1)
111111

112112
clear_cache()
113113

@@ -117,11 +117,11 @@ def main():
117117
data_tests()
118118

119119
elif auth_type.lower() == 'profile':
120-
dev_tests(profile=profile)
120+
dev_tests(profile=profile, key_down_to_shared=4)
121121
clear_cache()
122122

123123

124-
def dev_tests(profile=None):
124+
def dev_tests(profile=None, key_down_to_shared=4):
125125
extra_args = f"--profile {profile}" if profile else ""
126126

127127
run_test("Dev Put", DevPut(extra_args=extra_args))
@@ -132,7 +132,8 @@ def dev_tests(profile=None):
132132
run_test("Dev Audit", DevAudit(extra_args=extra_args))
133133
run_test("Dev Sync", DevSync(extra_args=extra_args))
134134
run_test("Dev Cleanup", DevCleanup(extra_args=extra_args))
135-
run_test("Dev Browse", DevBrowse(extra_args=extra_args, key_down_to_shared=4))
135+
print(f"Key down: {key_down_to_shared}")
136+
run_test("Dev Browse", DevBrowse(extra_args=extra_args, key_down_to_shared=key_down_to_shared))
136137
run_test("Dev Restore", DevRestore(extra_args=extra_args))
137138
run_test("Dev Export", DevExport(extra_args=extra_args))
138139
run_test("Dev Edit", DevEdit(extra_args=extra_args))

things_to_figure_out.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ These are problems I intend to solve, once I figure out the best way to do it.
99
- Make CLI used shared libs.
1010
- Fix "requests" dependency on legacy botocore layer thing
1111
- CW alarm email integration
12+
- Canary rollout automation
1213

1314
## Ideas:
1415
- `figgy --reset` or `figgy reset`

0 commit comments

Comments
 (0)