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

Project delete-on-update option may not be working correctly #11733

Closed
AlanCoding opened this issue Feb 12, 2022 · 5 comments
Closed

Project delete-on-update option may not be working correctly #11733

AlanCoding opened this issue Feb 12, 2022 · 5 comments

Comments

@AlanCoding
Copy link
Member

ISSUE TYPE
  • Bug Report
SUMMARY

This output should probably never be allowed to happen:

Screenshot from 2022-02-11 21-26-43

If the deletion was successful, then the git task should always be changed. Instead, it is "ok" - no change.

I suspect this is because the deletion task may not be deleting hidden folders, including the .git folder, which the git module detects, so it then does a checkout, as opposed to a new clone. This is not the intention. The folder should be genuinely empty after the deletion task.

@WebSpider
Copy link

WebSpider commented Mar 2, 2022

You seem to be correct, sir.

command: "rm -rf {{project_path}}/*" # volume mounted, cannot delete folder itself

does not seem to remove hidden files and/or directories

@sarabrajsingh
Copy link
Contributor

sarabrajsingh commented May 6, 2022

@AlanCoding - ran integration tests and they were a-ok.

@CFSNM CFSNM self-assigned this May 9, 2022
@CFSNM
Copy link
Contributor

CFSNM commented May 10, 2022

Using latest devel awx:

PLAY [Update source tree if necessary] *****************************************
    
TASK [delete project directory before update] **********************************
changed: [localhost]
    
TASK [update project using git] ************************************************
ok: [localhost]

TASK [Set the git repository version] ******************************************
ok: [localhost]

TASK [Repository Version] ******************************************************
ok: [localhost] => {
 "msg": "Repository Version 98b8dc2d4d6671ddceab73a5d3958e94fcdba419"
 }

PLAY [Install content with ansible-galaxy command if necessary] ****************

TASK [debug] *******************************************************************
ok: [localhost] => {
"msg": "Collection and role syncing disabled. Check the AWX_ROLES_ENABLED and AWX_COLLECTIONS_ENABLED settings and Galaxy credentials on the project's organization.\\n"

TASK [meta] ********************************************************************

PLAY RECAP *********************************************************************
localhost                  : ok=5    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

The task is still showing Ok as result

@sarabrajsingh
Copy link
Contributor

@CFSNM i just introduced a new fix with #12205 - can you retest again please?

@CFSNM
Copy link
Contributor

CFSNM commented May 13, 2022

Using last devel kit:

PLAY [Update source tree if necessary] *****************************************
  
  TASK [delete project directory before update] **********************************
  changed: [localhost]
  
  TASK [update project using git] ************************************************
  changed: [localhost]
  
  TASK [Set the git repository version] ******************************************
  ok: [localhost]
  
  TASK [Repository Version] ******************************************************
  ok: [localhost] => {
      "msg": "Repository Version 98b8dc2d4d6671ddceab73a5d3958e94fcdba419"
  }
  
  PLAY [Install content with ansible-galaxy command if necessary] ****************
  
  TASK [debug] *******************************************************************
  ok: [localhost] => {
      "msg": "Collection and role syncing disabled. Check the AWX_ROLES_ENABLED and AWX_COLLECTIONS_ENABLED settings and Galaxy credentials on the project's organization.\\n"
  }
  
  TASK [meta] ********************************************************************
  
  PLAY RECAP *********************************************************************
  localhost                  : ok=5    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

Closing this issue

@CFSNM CFSNM closed this as completed May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants