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

Falling back to project.status if the last project sync job was deleted #12215

Merged
merged 1 commit into from
May 12, 2022

Conversation

john-westcott-iv
Copy link
Member

SUMMARY

Co authored with @nixocio

Modify the project list UI so that its status will be displayed in the UI if the last project sync job is missing.
Pre change:
image

Post change:
image

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • UI
AWX VERSION
awx: 21.0.1.dev89+g3976c4fedb
ADDITIONAL INFORMATION

@AlanCoding
Copy link
Member

that might be a flaky API test failure

________________ TestInstanceGroupInstanceMapping.test_mapping _________________
[gw1] linux -- Python 3.9.10 /var/lib/awx/venv/awx/bin/python3.9
Traceback (most recent call last):
  File "/awx_devel/awx/main/tests/functional/task_management/test_capacity.py", line 27, in test_mapping
    instance_groups = TaskManagerInstanceGroups(instances_by_hostname=instances)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/test/testcases.py", line 84, in __exit__
    self.test_case.assertEqual(
  File "/usr/lib64/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.9/unittest/case.py", line 830, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 4 != 3 : 4 queries executed, 3 expected
Captured queries were:
1. SELECT "main_instance"."id", "main_instance"."hostname", "main_instance"."capacity", "main_instance"."enabled", "main_instance"."node_type" FROM "main_instance" WHERE ("main_instance"."enabled" AND "main_instance"."hostname" IS NOT NULL AND NOT ("main_instance"."node_type" = 'hop')) ORDER BY "main_instance"."hostname" ASC
2. SELECT "main_instancegroup"."id", "main_instancegroup"."name" FROM "main_instancegroup"
3. SELECT ("main_instancegroup_instances"."instancegroup_id") AS "_prefetch_related_val_instancegroup_id", "main_instance"."id", "main_instance"."uuid", "main_instance"."hostname", "main_instance"."ip_address", "main_instance"."created", "main_instance"."modified", "main_instance"."version", "main_instance"."cpu", "main_instance"."memory", "main_instance"."errors", "main_instance"."last_seen", "main_instance"."last_health_check", "main_instance"."capacity", "main_instance"."capacity_adjustment", "main_instance"."enabled", "main_instance"."managed_by_policy", "main_instance"."cpu_capacity", "main_instance"."mem_capacity", "main_instance"."node_type" FROM "main_instance" INNER JOIN "main_instancegroup_instances" ON ("main_instance"."id" = "main_instancegroup_instances"."instance_id") WHERE "main_instancegroup_instances"."instancegroup_id" IN (3, 2, 1) ORDER BY "main_instance"."hostname" ASC
4. SELECT "conf_setting"."id", "conf_setting"."created", "conf_setting"."modified", "conf_setting"."key", "conf_setting"."value", "conf_setting"."user_id" FROM "conf_setting" WHERE ("conf_setting"."key" IN ('ACTIVITY_STREAM_ENABLED', 'ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC', 'ORG_ADMINS_CAN_SEE_ALL_USERS', 'MANAGE_ORGANIZATION_AUTH', 'TOWER_URL_BASE', 'REMOTE_HOST_HEADERS', 'PROXY_IP_ALLOWED_LIST', 'LICENSE', 'REDHAT_USERNAME', 'REDHAT_PASSWORD', 'SUBSCRIPTIONS_USERNAME', 'SUBSCRIPTIONS_PASSWORD', 'AUTOMATION_ANALYTICS_URL', 'INSTALL_UUID', 'DEFAULT_EXECUTION_ENVIRONMENT', 'CUSTOM_VENV_PATHS', 'AD_HOC_COMMANDS', 'ALLOW_JINJA_IN_EXTRA_VARS', 'AWX_ISOLATION_BASE_PATH', 'AWX_ISOLATION_SHOW_PATHS', 'AWX_TASK_ENV', 'GALAXY_TASK_ENV', 'INSIGHTS_TRACKING_STATE', 'PROJECT_UPDATE_VVV', 'AWX_ROLES_ENABLED', 'AWX_COLLECTIONS_ENABLED', 'AWX_SHOW_PLAYBOOK_LINKS', 'AWX_MOUNT_ISOLATED_PATHS_ON_K8S', 'GALAXY_IGNORE_CERTS', 'STDOUT_MAX_BYTES_DISPLAY', 'EVENT_STDOUT_MAX_BYTES_DISPLAY', 'MAX_WEBSOCKET_EVENT_RATE', 'SCHEDULE_MAX_JOBS', 'AWX_ANSIBLE_CALLBACK_PLUGINS', 'DEFAULT_JOB_TIMEOUT', 'DEFAULT_JOB_IDLE_TIMEOUT', 'DEFAULT_INVENTORY_UPDATE_TIMEOUT', 'DEFAULT_PROJECT_UPDATE_TIMEOUT', 'ANSIBLE_FACT_CACHE_TIMEOUT', 'MAX_FORKS', 'LOG_AGGREGATOR_HOST', 'LOG_AGGREGATOR_PORT', 'LOG_AGGREGATOR_TYPE', 'LOG_AGGREGATOR_USERNAME', 'LOG_AGGREGATOR_PASSWORD', 'LOG_AGGREGATOR_LOGGERS', 'LOG_AGGREGATOR_INDIVIDUAL_FACTS', 'LOG_AGGREGATOR_ENABLED', 'LOG_AGGREGATOR_TOWER_UUID', 'LOG_AGGREGATOR_PROTOCOL', 'LOG_AGGREGATOR_TCP_TIMEOUT', 'LOG_AGGREGATOR_VERIFY_CERT', 'LOG_AGGREGATOR_LEVEL', 'LOG_AGGREGATOR_MAX_DISK_USAGE_GB', 'LOG_AGGREGATOR_MAX_DISK_USAGE_PATH', 'LOG_AGGREGATOR_RSYSLOGD_DEBUG', 'API_400_ERROR_LOG_FORMAT', 'AUTOMATION_ANALYTICS_LAST_GATHER', 'AUTOMATION_ANALYTICS_LAST_ENTRIES', 'AUTOMATION_ANALYTICS_GATHER_INTERVAL', 'SESSION_COOKIE_AGE', 'SESSIONS_PER_USER', 'DISABLE_LOCAL_AUTH', 'AUTH_BASIC_ENABLED', 'OAUTH2_PROVIDER', 'ALLOW_OAUTH2_FOR_EXTERNAL_USERS', 'LOGIN_REDIRECT_OVERRIDE', 'PENDO_TRACKING_STATE', 'CUSTOM_LOGIN_INFO', 'CUSTOM_LOGO', 'MAX_UI_JOB_EVENTS', 'UI_LIVE_UPDATES_ENABLED', 'SOCIAL_AUTH_ORGANIZATION_MAP', 'SOCIAL_AUTH_TEAM_MAP', 'SOCIAL_AUTH_USER_FIELDS', 'AUTH_LDAP_SERVER_URI', 'AUTH_LDAP_BIND_DN', 'AUTH_LDAP_BIND_PASSWORD', 'AUTH_LDAP_START_TLS', 'AUTH_LDAP_CONNECTION_OPTIONS', 'AUTH_LDAP_USER_SEARCH', 'AUTH_LDAP_USER_DN_TEMPLATE', 'AUTH_LDAP_USER_ATTR_MAP', 'AUTH_LDAP_GROUP_SEARCH', 'AUTH_LDAP_GROUP_TYPE', 'AUTH_LDAP_GROUP_TYPE_PARAMS', 'AUTH_LDAP_REQUIRE_GROUP', 'AUTH_LDAP_DENY_GROUP', 'AUTH_LDAP_USER_FLAGS_BY_GROUP', 'AUTH_LDAP_ORGANIZATION_MAP', 'AUTH_LDAP_TEAM_MAP', 'AUTH_LDAP_1_SERVER_URI', 'AUTH_LDAP_1_BIND_DN', 'AUTH_LDAP_1_BIND_PASSWORD', 'AUTH_LDAP_1_START_TLS', 'AUTH_LDAP_1_CONNECTION_OPTIONS', 'AUTH_LDAP_1_USER_SEARCH', 'AUTH_LDAP_1_USER_DN_TEMPLATE', 'AUTH_LDAP_1_USER_ATTR_MAP', 'AUTH_LDAP_1_GROUP_SEARCH', 'AUTH_LDAP_1_GROUP_TYPE', 'AUTH_LDAP_1_GROUP_TYPE_PARAMS', 'AUTH_LDAP_1_REQUIRE_GROUP', 'AUTH_LDAP_1_DENY_GROUP', 'AUTH_LDAP_1_USER_FLAGS_BY_GROUP', 'AUTH_LDAP_1_ORGANIZATION_MAP', 'AUTH_LDAP_1_TEAM_MAP', 'AUTH_LDAP_2_SERVER_URI', 'AUTH_LDAP_2_BIND_DN', 'AUTH_LDAP_2_BIND_PASSWORD', 'AUTH_LDAP_2_START_TLS', 'AUTH_LDAP_2_CONNECTION_OPTIONS', 'AUTH_LDAP_2_USER_SEARCH', 'AUTH_LDAP_2_USER_DN_TEMPLATE', 'AUTH_LDAP_2_USER_ATTR_MAP', 'AUTH_LDAP_2_GROUP_SEARCH', 'AUTH_LDAP_2_GROUP_TYPE', 'AUTH_LDAP_2_GROUP_TYPE_PARAMS', 'AUTH_LDAP_2_REQUIRE_GROUP', 'AUTH_LDAP_2_DENY_GROUP', 'AUTH_LDAP_2_USER_FLAGS_BY_GROUP', 'AUTH_LDAP_2_ORGANIZATION_MAP', 'AUTH_LDAP_2_TEAM_MAP', 'AUTH_LDAP_3_SERVER_URI', 'AUTH_LDAP_3_BIND_DN', 'AUTH_LDAP_3_BIND_PASSWORD', 'AUTH_LDAP_3_START_TLS', 'AUTH_LDAP_3_CONNECTION_OPTIONS', 'AUTH_LDAP_3_USER_SEARCH', 'AUTH_LDAP_3_USER_DN_TEMPLATE', 'AUTH_LDAP_3_USER_ATTR_MAP', 'AUTH_LDAP_3_GROUP_SEARCH', 'AUTH_LDAP_3_GROUP_TYPE', 'AUTH_LDAP_3_GROUP_TYPE_PARAMS', 'AUTH_LDAP_3_REQUIRE_GROUP', 'AUTH_LDAP_3_DENY_GROUP', 'AUTH_LDAP_3_USER_FLAGS_BY_GROUP', 'AUTH_LDAP_3_ORGANIZATION_MAP', 'AUTH_LDAP_3_TEAM_MAP', 'AUTH_LDAP_4_SERVER_URI', 'AUTH_LDAP_4_BIND_DN', 'AUTH_LDAP_4_BIND_PASSWORD', 'AUTH_LDAP_4_START_TLS', 'AUTH_LDAP_4_CONNECTION_OPTIONS', 'AUTH_LDAP_4_USER_SEARCH', 'AUTH_LDAP_4_USER_DN_TEMPLATE', 'AUTH_LDAP_4_USER_ATTR_MAP', 'AUTH_LDAP_4_GROUP_SEARCH', 'AUTH_LDAP_4_GROUP_TYPE', 'AUTH_LDAP_4_GROUP_TYPE_PARAMS', 'AUTH_LDAP_4_REQUIRE_GROUP', 'AUTH_LDAP_4_DENY_GROUP', 'AUTH_LDAP_4_USER_FLAGS_BY_GROUP', 'AUTH_LDAP_4_ORGANIZATION_MAP', 'AUTH_LDAP_4_TEAM_MAP', 'AUTH_LDAP_5_SERVER_URI', 'AUTH_LDAP_5_BIND_DN', 'AUTH_LDAP_5_BIND_PASSWORD', 'AUTH_LDAP_5_START_TLS', 'AUTH_LDAP_5_CONNECTION_OPTIONS', 'AUTH_LDAP_5_USER_SEARCH', 'AUTH_LDAP_5_USER_DN_TEMPLATE', 'AUTH_LDAP_5_USER_ATTR_MAP', 'AUTH_LDAP_5_GROUP_SEARCH', 'AUTH_LDAP_5_GROUP_TYPE', 'AUTH_LDAP_5_GROUP_TYPE_PARAMS', 'AUTH_LDAP_5_REQUIRE_GROUP', 'AUTH_LDAP_5_DENY_GROUP', 'AUTH_LDAP_5_USER_FLAGS_BY_GROUP', 'AUTH_LDAP_5_ORGANIZATION_MAP', 'AUTH_LDAP_5_TEAM_MAP', 'RADIUS_SERVER', 'RADIUS_PORT', 'RADIUS_SECRET', 'TACACSPLUS_HOST', 'TACACSPLUS_PORT', 'TACACSPLUS_SECRET', 'TACACSPLUS_SESSION_TIMEOUT', 'TACACSPLUS_AUTH_PROTOCOL', 'SOCIAL_AUTH_GOOGLE_OAUTH2_KEY', 'SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET', 'SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS', 'SOCIAL_AUTH_GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS', 'SOCIAL_AUTH_GOOGLE_OAUTH2_ORGANIZATION_MAP', 'SOCIAL_AUTH_GOOGLE_OAUTH2_TEAM_MAP', 'SOCIAL_AUTH_GITHUB_KEY', 'SOCIAL_AUTH_GITHUB_SECRET', 'SOCIAL_AUTH_GITHUB_ORGANIZATION_MAP', 'SOCIAL_AUTH_GITHUB_TEAM_MAP', 'SOCIAL_AUTH_GITHUB_ORG_KEY', 'SOCIAL_AUTH_GITHUB_ORG_SECRET', 'SOCIAL_AUTH_GITHUB_ORG_NAME', 'SOCIAL_AUTH_GITHUB_ORG_ORGANIZATION_MAP', 'SOCIAL_AUTH_GITHUB_ORG_TEAM_MAP', 'SOCIAL_AUTH_GITHUB_TEAM_KEY', 'SOCIAL_AUTH_GITHUB_TEAM_SECRET', 'SOCIAL_AUTH_GITHUB_TEAM_ID', 'SOCIAL_AUTH_GITHUB_TEAM_ORGANIZATION_MAP', 'SOCIAL_AUTH_GITHUB_TEAM_TEAM_MAP', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_URL', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_API_URL', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_KEY', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_SECRET', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORGANIZATION_MAP', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_MAP', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORG_URL', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORG_API_URL', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORG_KEY', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORG_SECRET', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORG_NAME', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORG_ORGANIZATION_MAP', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_ORG_TEAM_MAP', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_URL', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_API_URL', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_KEY', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_SECRET', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_ID', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_ORGANIZATION_MAP', 'SOCIAL_AUTH_GITHUB_ENTERPRISE_TEAM_TEAM_MAP', 'SOCIAL_AUTH_AZUREAD_OAUTH2_KEY', 'SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET', 'SOCIAL_AUTH_AZUREAD_OAUTH2_ORGANIZATION_MAP', 'SOCIAL_AUTH_AZUREAD_OAUTH2_TEAM_MAP', 'SAML_AUTO_CREATE_OBJECTS', 'SOCIAL_AUTH_SAML_SP_ENTITY_ID', 'SOCIAL_AUTH_SAML_SP_PUBLIC_CERT', 'SOCIAL_AUTH_SAML_SP_PRIVATE_KEY', 'SOCIAL_AUTH_SAML_ORG_INFO', 'SOCIAL_AUTH_SAML_TECHNICAL_CONTACT', 'SOCIAL_AUTH_SAML_SUPPORT_CONTACT', 'SOCIAL_AUTH_SAML_ENABLED_IDPS', 'SOCIAL_AUTH_SAML_SECURITY_CONFIG', 'SOCIAL_AUTH_SAML_SP_EXTRA', 'SOCIAL_AUTH_SAML_EXTRA_DATA', 'SOCIAL_AUTH_SAML_ORGANIZATION_MAP', 'SOCIAL_AUTH_SAML_TEAM_MAP', 'SOCIAL_AUTH_SAML_ORGANIZATION_ATTR', 'SOCIAL_AUTH_SAML_TEAM_ATTR', 'SOCIAL_AUTH_SAML_USER_FLAGS_BY_ATTR') AND "conf_setting"."user_id" IS NULL) ORDER BY "conf_setting"."id" ASC

@AlanCoding
Copy link
Member

would address #10625

Copy link
Contributor

@nixocio nixocio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on what I understood from the issue that we are attempting to solve, this change seems to be a solution.

@AlanCoding, please, confirm that it is working as you expected.

Copy link
Member

@AlanCoding AlanCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@cypress
Copy link

cypress bot commented May 12, 2022



Test summary

630 0 829 0Flakiness 0


Run details

Project AWX - Functional
Status Passed
Commit 3976c4f
Started May 12, 2022 1:28 PM
Ended May 12, 2022 3:26 PM
Duration 57:53 💡
OS Linux Debian - 11.3
Browser Chrome 99

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@InnocentK InnocentK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Looks good and ready to merge from QE perspective

@john-westcott-iv john-westcott-iv merged commit cfdba95 into ansible:devel May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants