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

Update admin password on install from tasks.py when installing with django-project #11922

Open
cesarbenjamindotnet opened this issue Feb 2, 2024 · 10 comments

Comments

@cesarbenjamindotnet
Copy link

Expected Behavior

Update admin password on install from tasks.py when installing with django-project

Actual Behavior

updateadmin() throws an "/bin/bash: line 1: django-admin.py: command not found" message.

Steps to Reproduce the Problem

  1. Install master using geonode-project
  2. view the logs
  3. look at update admin details*** in logs

Specifications

  • GeoNode version: master
  • Installation type (vanilla, geonode-project): geonode-project
  • Installation method (manual, docker): docker
  • Platform: ubuntu 22.04
  • Additional details: i think can be fixed changing line 426 in updateadmin from tasks.py changing f"django-admin loaddata /tmp/django_admin_docker.json to f"python manage.py loaddata /tmp/django_admin_docker.json
cesarbenjamindotnet added a commit to cesarbenjamindotnet/geonode that referenced this issue Feb 2, 2024
@sistein
Copy link

sistein commented Apr 9, 2024

I think I'm facing the same issue.

django4ageing_geonode | ***********************update admin details************************** django4ageing_geonode | /bin/bash: line 1: django-admin.py: command not found dependency failed to start: container django4ageing_geonode is unhealthy

@cesarbenjamindotnet
Copy link
Author

I have a lot of open issues, and contribs but they don't care. But they took my work as own on the upgrade to django 4.2 without credit on me

@cesarbenjamindotnet
Copy link
Author

Then I decide to stop working on fixing things with this approach from them, so I guess I will build my own SDI without the lot of arcane things and obsolete code. For example, in user profile there is a few counters per dataset which don't work because uses AngularJS... AngularJS! At this time! And of course mixed with react and jquery... Is a shame

@ridoo
Copy link
Contributor

ridoo commented Apr 12, 2024

I have a lot of open issues, and contribs but they don't care. But they took my work as own on the upgrade to django 4.2 without credit on me

@cesar-benjamin I saw your comments on upgrading Django version, but I cannot judge on this because I was not involved here. However, I cannot find any PR which was worth to merge and give credit for. Maybe I miss some locations where to look at. There are so many, as GeoNode is big and there are lots of components involved. If so, please point me on it.

Then I decide to stop working on fixing things with this approach from them, so I guess I will build my own SDI without the lot of arcane things and obsolete code. For example, in user profile there is a few counters per dataset which don't work because uses AngularJS... AngularJS! At this time! And of course mixed with react and jquery... Is a shame

Good luck on building your own. Curious to see, how it will look in ten years from now.

@giohappy
Copy link
Contributor

giohappy commented Apr 12, 2024

@cesar-benjamin I'm sorry to hear such feedback. I don't want to argue against your feelings but let me answer in a few points:

but they don't care. But they took my work as own on the upgrade to django 4.2 without credit on me

I'm not sure what "they" is in your perception of this project. Some of us work in a company (GeoSolutions) that uses and contributes to GeoNode. We're not the owners of GeoNode. It is and will remain a community project.
We do our best to maintain it, being the principal contributors at the moment. However, this project started way before us. Many hands worked on it, and many parts have been written by different people and groups, with multiple programming styles, mindsets, etc. There are a lot of good things but also a significant tech depth in some parts.
During the upgrade to GeoNode 4.0, which was financed by a project from my company, we did our best to refactor some parts, but not everything could be improved, otherwise a full rewrite was needed.

Let me say that if you can take advantage of the good parts of GeoNode it is thanks to many people who worked on it, spent time and money on it, and decided to keep it open for everyone.

On our side, we don't have any reason to block things and put up fences. We spend (free) time reviewing proposals and PRs. and merging or taking what looks good, considering also the many workflows that depend on the code.
For example, your proposal to change the way requirements were written was breaking some CD workflows. We have spent some time trying to figure out why your solution wasn't working for us but, I repeat, we were doing it for free and we couldn't afford digging too much.
Should we accept it blindly and let everyone adapt to such a breaking change?

Regarding the upgrade to Django 4. We were already working on it, then we saw your PRs (many of which were closed by you in a quite confusing flow, I would say). We took the good parts and integrated them into the work we were going to push.
There are no credits to GeoSolutions for this work, but if you want we can put your name in the changelog, no problem.

I don't want to start a flame for no reason, and I apologize if my answer could sound a bit harsh, but please take into account the whole thing before judging. We think your contributions are valuable and I hope you will continue to push them. I cannot guarantee we will be able to respond or review promptly. Nobody pay us for it :)

@mattiagiupponi
Copy link
Contributor

mattiagiupponi commented Apr 12, 2024

I have a lot of open issues, and contribs but they don't care. But they took my work as own on the upgrade to django 4.2 without credit on me

I give you the credit in the GNIP created for the upgrade of Django to 4.2 as you can see here: #11821
image

image

Just a couple of notes:

  • Your initial upgrade was done on the branch 4.1.x which was not mantained anymore.
  • I used the work you have done to upgrade Django on master branch as was described in more than one occasion
  • You work has been merged more than once both in geonode and in the geonode-importer
  • If a PR is in draft state, to me is not a PR ready for any review example need to remove call to command rebuild_index in tasks.py #11921
  • About this Issue i just see a PR from you that was open and closed by you without any review fixes #11922 #11923

Aside this, we encourage people to contribute in GeoNode as much as they can to make it one of the best tool available in the open source world. Ofcourse it require to be patient with the times as @giohappy say.
Ping someone for a review is never a crime. We try to do our best, but some PR / issue can be forgotten.

@giohappy
Copy link
Contributor

And a final note @cesar-benjamin about this issue: I don't see it connected to any PR.

@sistein
Copy link

sistein commented Apr 25, 2024

Coming back to my issue:

I have a fresh installation of geonode using docker. First startup fails because of the missing django-admin.py

django4ageing_geonode | ***********************update admin details************************** django4ageing_geonode | /bin/bash: line 1: django-admin.py: command not found django4ageing_geonode exited with code 0

I tried setting it up multiple times. The only difference to the how-to is using debian and docker compose instead of docker-compose.

I just cannot really believe that I'm the only person with this issue.

@mattiagiupponi
Copy link
Contributor

Hi @sistein

I just cannot really believe that I'm the only person with this issue.

I made quite few project with GeoNode and i never saw this problem, but let's try in step:

  1. GeoNode version
  2. Docker version

Then few action to try:

  • Did you try to rebuild the project ia docker with the --no-cache command? like docker compose build --no-cache
  • Please try to do a docker compose down --volumes to clean the whole project and removing all the volumes along with it
  • Once the build is done please try with docker compose up -d --force-recreate

Let me know if some of this steps helped

@cesarbenjamindotnet
Copy link
Author

Coming back to my issue:

I have a fresh installation of geonode using docker. First startup fails because of the missing django-admin.py

django4ageing_geonode | ***********************update admin details************************** django4ageing_geonode | /bin/bash: line 1: django-admin.py: command not found django4ageing_geonode exited with code 0

I tried setting it up multiple times. The only difference to the how-to is using debian and docker compose instead of docker-compose.

I just cannot really believe that I'm the only person with this issue.

i had pointed this issue too, but obviously i was ignored, but i can tell you how to fix it: you have to edit the tasks.py file and find and replace all django-admin.py entries to python manage.py and then all will go fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants