Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environments List search bar changes #4705

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
561d281
Added searchbar for Environment
chaitali-mane Feb 1, 2021
f8c6ff7
added to search bar
chaitali-mane Feb 1, 2021
b49b73c
Change name Searchbar component
chaitali-mane Feb 2, 2021
22f7083
Removed component
chaitali-mane Feb 2, 2021
331f267
Added spiner for search function
chaitali-mane Feb 2, 2021
3aa6c8d
Updated style for spinner
chaitali-mane Feb 2, 2021
310cbd0
updated searchbar
chaitali-mane Feb 3, 2021
af4f6e5
No data for searchbar updated
chaitali-mane Feb 8, 2021
8ff135f
Document that ldap/msad bind password can be passed via environment v…
Feb 8, 2021
dc80d3b
Fix workflow build (#4706)
Feb 8, 2021
bc59cdf
Set data_collector to true only if external automate or local automat…
PrajaktaPurohit Feb 8, 2021
7cde594
Allow nginx to start even if external automate upstream fails to reso…
PrajaktaPurohit Feb 8, 2021
d208c4d
Add Integration Testing for the Notifications Service (#4674)
danielsdeleo Feb 8, 2021
70f0022
Fix links (#4671)
IanMadd Feb 9, 2021
1371ace
Notifications Rewrite: Service Stub (#4712)
danielsdeleo Feb 9, 2021
09121a6
[infra-proxy-service] Add integration testing for infra-proxy-service…
Feb 10, 2021
2012294
Update the license control service tests to not panic (#4676)
Feb 11, 2021
96800f0
[infra-proxy-service] reset node client key, create client & delete c…
Feb 11, 2021
ff4400e
Bump automate-compliance-profiles (#4694)
chef-expeditor[bot] Feb 11, 2021
566e077
[infra-proxy-service] Client list using search API (#4660)
Feb 11, 2021
e640b91
[infra-proxy-service] Environments list using search API with paginat…
Feb 12, 2021
0020661
Updated variable name
chaitali-mane Feb 12, 2021
dce21f1
Added searchbar for Environment
chaitali-mane Feb 1, 2021
3147984
added to search bar
chaitali-mane Feb 1, 2021
b71c542
Change name Searchbar component
chaitali-mane Feb 2, 2021
17e7137
Removed component
chaitali-mane Feb 2, 2021
81b9205
Added spiner for search function
chaitali-mane Feb 2, 2021
97a873b
Updated style for spinner
chaitali-mane Feb 2, 2021
fa431fe
updated searchbar
chaitali-mane Feb 3, 2021
97ad593
No data for searchbar updated
chaitali-mane Feb 8, 2021
d6db1e7
Updated variable name
chaitali-mane Feb 12, 2021
504c767
lint error
chaitali-mane Feb 12, 2021
03e193f
Merge branch 'Chaitali/searchBox-Environments' of https://github.com/…
chaitali-mane Feb 12, 2021
e22490c
Added no list data changes
chaitali-mane Feb 12, 2021
a65770f
No list data updated
chaitali-mane Feb 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .expeditor/verify_private.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,23 @@ steps:
- HAB_STUDIO_SUP=false
- HAB_NONINTERACTIVE=true

- label: "infra-proxy-service"
command:
- . scripts/verify_setup.sh
- hab studio run "source scripts/verify_studio_init.sh && start_deployment_service && chef-automate dev deployinate && infra_service_integration"
timeout_in_minutes: 20
retry:
automatic:
limit: 1
expeditor:
executor:
docker:
privileged: true
environment:
- HAB_STUDIO_SUP=false
- HAB_NONINTERACTIVE=true
- CONTAINER_HOSTNAME=localhost

#
# The following tests all use the integration test framework for
# end-to-end testing. These tests all test full deployments of
Expand Down
24 changes: 20 additions & 4 deletions .studio/infra-proxy-service
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ function start_infra_proxy_service() {
chef-automate dev deploy-some $HAB_ORIGIN/infra-proxy-service --with-deps
}

document "infra_service_integration" <<DOC
run the infra service's integration tests
DOC
function infra_service_integration() {
check_if_deployinate_started || return 1;
export CONTAINER_HOSTNAME=localhost
# Setup local chef server
# loads data which resides in dev-docs/adding-data/infra/chef-repo
infra_service_load_chef_repo
A2_SVC_NAME="infra-proxy-service" A2_SVC_PATH="/hab/svc/infra-proxy-service" go_test "github.com/chef/automate/components/infra-proxy-service/integration_test"
}

document "infra_service_load_sample_data" <<DOC
Before running this command make sure either run 'start_infra_proxy_service' or 'start_all_services'
Hits the create server & org endpoint inside the infra-proxy-service. (CreateServer & CreateOrg)
Expand Down Expand Up @@ -73,17 +85,17 @@ function infra_service_load_sample_data() {
}

function infra_service_create_servers_orgs() {
chef-automate dev grpcurl automate-gateway -- -d \
chef-automate dev grpcurl infra-proxy-service -- -d \
"$(cat << EOF
{"id": "$1", "name": "$2", "ip_address": "$3", "fqdn": "$4"}
EOF
)" chef.automate.api.infra_proxy.InfraProxy.CreateServer >/dev/null
)" chef.automate.domain.infra_proxy.service.InfraProxyService.CreateServer >/dev/null

chef-automate dev grpcurl automate-gateway -- -d \
chef-automate dev grpcurl infra-proxy-service -- -d \
"$(cat << EOF
{"id": "$5", "name": "$6", "admin_user": "$7", "admin_key": "$8", "server_id": "$1", "projects": []}
EOF
)" chef.automate.api.infra_proxy.InfraProxy.CreateOrg >/dev/null
)" chef.automate.domain.infra_proxy.service.InfraProxyService.CreateOrg >/dev/null
}

function infra_service_load_chef_repo() {
Expand Down Expand Up @@ -159,6 +171,10 @@ EOH
source "https://supermarket.chef.io"

cookbook "audit"
cookbook "chef-client"
cookbook "iptables"
cookbook "netdev"
cookbook "sudo"
EOH

if ! hab pkg exec chef/chef-dk knife opc user list -c ${chef_server_pivotal_rb_path} | grep ${chef_server_test_node_name} &> /dev/null; then
Expand Down
18 changes: 12 additions & 6 deletions .studio/notifications-service
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ function notifications_lint() {
return $EXIT_CODE
}

document "notifications_integration" <<DOC
run the notifications service's integration tests
DOC
function notifications_integration() {
check_if_deployinate_started || return 1;
A2_SVC_NAME="notifications-service" A2_SVC_PATH="/hab/svc/notifications-service" go_test "github.com/chef/automate/components/notifications-service/integration_test"
}

document "notifications_compile_protobuf" <<DOC
create the protobuf files for the notifications-service and notifications-client.
This was copied from both of the components Make files.
Expand Down Expand Up @@ -105,10 +113,8 @@ document "notifications_update_component" <<DOC
Warning: this does not work for new files. If you create a new file run rebuild components/notifications-service
DOC
function notifications_update_component() {
component_path=$(hab pkg path "$HAB_ORIGIN"/notifications-service 2> /dev/null)
if [[ $? -ne 0 ]]; then
component_path=$(hab pkg path chef/notifications-service 2> /dev/null)
if [[ $? -ne 0 ]]; then
if ! component_path=$(hab pkg path "$HAB_ORIGIN"/notifications-service 2> /dev/null); then
if ! component_path=$(hab pkg path chef/notifications-service 2> /dev/null); then
error "Could not find notifications-service deployed under either your origin ($HAB_ORIGIN) or chef origin."
error "Deploy A2 and try again."
return 1
Expand All @@ -117,12 +123,12 @@ function notifications_update_component() {

elixir_install

pushd /src/components/notifications-service/server >/dev/null
pushd /src/components/notifications-service/server >/dev/null || return 1
mix local.hex --force
mix local.rebar --force
MIX_ENV=habitat mix "do" deps.get, compile
returnStatus=$?
popd >/dev/null
popd >/dev/null || return 1

if [[ $returnStatus == 0 ]]; then
log_line "reload the notifications-service binary."
Expand Down
10 changes: 10 additions & 0 deletions api/config/erchef/config_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import (
"strings"

ac "github.com/chef/automate/api/config/shared"
config "github.com/chef/automate/api/config/shared"
w "github.com/chef/automate/api/config/shared/wrappers"
"github.com/chef/automate/lib/stringutils"
)

// NewConfigRequest returns a new instance of ConfigRequest with zero values.
Expand Down Expand Up @@ -144,3 +146,11 @@ func (c *ConfigRequest) PrepareSystemConfig(creds *ac.TLSCredentials) (ac.Prepar

return c.V1.Sys, nil
}

func (c *ConfigRequest) ConfigureProduct(productConfig *config.ProductConfig) {
if len(productConfig.Products) > 0 {
if !c.V1.Sys.GetExternalAutomate().GetEnable().GetValue() && !stringutils.SliceContains(productConfig.Products, "automate") {
c.V1.Sys.DataCollector.Enabled = w.Bool(false)
}
}
}
31 changes: 31 additions & 0 deletions api/config/erchef/config_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,42 @@ package erchef
import (
"testing"

"github.com/chef/automate/api/config/shared"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

w "github.com/chef/automate/api/config/shared/wrappers"
)

func TestValidateConfigRequestValid(t *testing.T) {
c := NewConfigRequest()
err := c.Validate()
assert.Nil(t, err)
}

func TestDataCollector(t *testing.T) {
t.Run("enabled when External Automate is enabled and Internal Automate is disabled", func(t *testing.T) {
c := DefaultConfigRequest()
c.V1.Sys.ExternalAutomate = &shared.External_Automate{
Enable: w.Bool(true),
}
c.ConfigureProduct(&shared.ProductConfig{
Products: []string{"chef-server"},
})
require.True(t, c.V1.Sys.GetDataCollector().GetEnabled().GetValue())
})
t.Run("enabled when External Automate is disabled and Internal Automate is enabled", func(t *testing.T) {
c := DefaultConfigRequest()
c.ConfigureProduct(&shared.ProductConfig{
Products: []string{"automate", "chef-server"},
})
require.True(t, c.V1.Sys.GetDataCollector().GetEnabled().GetValue())
})
t.Run("disabled when External Automate is disabled and Internal Automate is disabled", func(t *testing.T) {
c := DefaultConfigRequest()
c.ConfigureProduct(&shared.ProductConfig{
Products: []string{"chef-server"},
})
require.False(t, c.V1.Sys.GetDataCollector().GetEnabled().GetValue())
})
}
Loading