GithubHelp home page GithubHelp logo

Comments (10)

amityweb avatar amityweb commented on June 15, 2024

Following on from this...

I think its working for me OK when I use Saleor Platform, and I expected something visible to happen when I typed "docker compose build" but nothing did. But if I proceed with the instructions it seems work then. I guess the issue above was I was only using Saleor Core but expected the database to be setup inside also? Maybe its not.

Although its working, during the build there are more errors now. Issues with the database tables?

worker-1     | 2024-05-05 12:03:50,095 INFO celery.beat beat: Starting... [PID:23:MainThread]
db-1         | 2024-05-05 12:03:50.922 UTC [60] ERROR:  relation "discount_promotion" does not exist at character 436
db-1         | 2024-05-05 12:03:50.922 UTC [60] STATEMENT:  SELECT "discount_promotion"."private_metadata", "discount_promotion"."metadata", "discount_promotion"."id", "discount_promotion"."name", "discount_promotion"."type", "discount_promotion"."description", "discount_promotion"."old_sale_id", "discount_promotion"."start_date", "discount_promotion"."end_date", "discount_promotion"."created_at", "discount_promotion"."updated_at", "discount_promotion"."last_notification_scheduled_at" FROM "discount_promotion" WHERE ((("discount_promotion"."last_notification_scheduled_at" IS NULL OR "discount_promotion"."last_notification_scheduled_at" < "discount_promotion"."start_date") AND "discount_promotion"."start_date" <= '2024-05-05T12:03:50.890496+00:00'::timestamptz) OR (("discount_promotion"."last_notification_scheduled_at" IS NULL OR "discount_promotion"."last_notification_scheduled_at" < "discount_promotion"."end_date") AND "discount_promotion"."end_date" <= '2024-05-05T12:03:50.892480+00:00'::timestamptz)) ORDER BY "discount_promotion"."name" ASC, "discount_promotion"."id" ASC
worker-1     | Process Beat:
worker-1     | Traceback (most recent call last):
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
worker-1     |     return self.cursor.execute(sql, params)
worker-1     | psycopg2.errors.UndefinedTable: relation "discount_promotion" does not exist
worker-1     | LINE 1: ..._promotion"."last_notification_scheduled_at" FROM "discount_...
worker-1     |                                                              ^
worker-1     | 
worker-1     | 
worker-1     | The above exception was the direct cause of the following exception:
worker-1     | 
worker-1     | Traceback (most recent call last):
worker-1     |   File "/usr/local/lib/python3.9/site-packages/billiard/process.py", line 323, in _bootstrap
worker-1     |     self.run()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 718, in run
worker-1     |     self.service.start(embedded_process=True)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 643, in start
worker-1     |     interval = self.scheduler.tick()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 339, in tick
worker-1     |     self.populate_heap()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 313, in populate_heap
worker-1     |     is_due, next_call_delay = entry.is_due()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 161, in is_due
worker-1     |     return self.schedule.is_due(self.last_run_at)
worker-1     |   File "/app/saleor/core/schedules.py", line 80, in is_due
worker-1     |     if len(staring_promotions | ending_promotions) > PROMOTION_TOGGLE_BATCH_SIZE:
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 262, in __len__
worker-1     |     self._fetch_all()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
worker-1     |     self._result_cache = list(self._iterable_class(self))
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
worker-1     |     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
worker-1     |     cursor.execute(sql, params)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
worker-1     |     return super().execute(sql, params)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
worker-1     |     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
worker-1     |     return executor(sql, params, many, context)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
worker-1     |     return self.cursor.execute(sql, params)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
worker-1     |     raise dj_exc_value.with_traceback(traceback) from exc_value
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
worker-1     |     return self.cursor.execute(sql, params)
worker-1     | django.db.utils.ProgrammingError: relation "discount_promotion" does not exist
worker-1     | LINE 1: ..._promotion"."last_notification_scheduled_at" FROM "discount_...
worker-1     |                                                              ^
worker-1     | 
worker-1     | 2024-05-05 12:03:52,025 WARNING py.warnings /usr/local/lib/python3.9/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
worker-1     | whether broker connection retries are made during startup in Celery 6.0 and above.
worker-1     | If you wish to retain the existing behavior for retrying connections on startup,
worker-1     | you should set broker_connection_retry_on_startup to True.
worker-1     |   warnings.warn(
worker-1     |  [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:52,047 INFO celery.worker.consumer.connection Connected to redis://redis:6379/1 [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:52,048 WARNING py.warnings /usr/local/lib/python3.9/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
worker-1     | whether broker connection retries are made during startup in Celery 6.0 and above.
worker-1     | If you wish to retain the existing behavior for retrying connections on startup,
worker-1     | you should set broker_connection_retry_on_startup to True.
worker-1     |   warnings.warn(
worker-1     |  [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:52,051 INFO celery.worker.consumer.mingle mingle: searching for neighbors [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:53,063 INFO celery.worker.consumer.mingle mingle: all alone [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:53,096 INFO celery.apps.worker celery@a66f6388d5de ready. [PID:1:MainThread]

from saleor.

amityweb avatar amityweb commented on June 15, 2024

We've abandoned Saleor now. I'm a web developer and its crazy the amount of time I spent trying to fix issues, or figure out the correct documentation etc. I switched to something else in a couple of days and all works fine now so I can get onto actually building the website.

from saleor.

faizan2700 avatar faizan2700 commented on June 15, 2024
  1. When you are using docker compose it is kind of expected that it iwll have mulitple containers including different one for db and different one for other services including web api, redis and everything. You can definitely configure this setup using dockerfile but for that you will have to do little bit of setup of setup for database, by default docker allows container to communicate with localhost, other than that you will have to take care of migrations (may be write entrypoint.sh file and run it once container is started to run migrations)

  2. In above setup where you have ran docker-compose, it is giving error that particular relation does not exists, it is because you have not run migrations. once run the command:
    docker-compose run --rm api python3 manage.py migrate
    It will run all the migrations to the database and now your saleor will start to work on port localhost:9000
    Optionally you can also populate database using this command:
    docker-compose run --rm api python3 manage.py populatedb

Works fine for me.

from saleor.

amityweb avatar amityweb commented on June 15, 2024

Dont want to waste any more time setting something up that has so many issues when other systems exist that do the exact same thing.

from saleor.

mirekm avatar mirekm commented on June 15, 2024

@faizan2700, thanks for providing your support!

@amityweb Thanks for the feedback; we will continue making our Docker setup bullet-proof and effortless for local Saleor development. There are systems with a lower entry threshold, for sure, and if you don't really aim for tech-agnostic, API-based extensibility, and your use case is fairly regular, Saleor may not be the first choice. In any case, keep us posted if you continue exploring it.

from saleor.

amityweb avatar amityweb commented on June 15, 2024

What does "lower entry threshold" even mean?! You mean systems that are easier to deply?

What does "tech-agnostic, API-based extensibility" even mean? You mean less technical than other systems, and that has an API? That statement is not true.

If using impressive non-layman terms gets companies to sign up to your expensive monthly fee then good on you! But ultimately, all the features Saleor has, can be done in many other common eCommerce systems. We need a backend solution for customers to take orders of products on a website. It must have standard features like stock control, variation's etc. Due to Saleor being such a PITA to setup, and the fact it is a backend system that no end user sees, and because we just need to build the website and not faff about with making systems work and struggling with documentation, we switched to WooCommerce for now nd it just works out of the box. I'd rather use something else but we can switch again in the future, but only to something that can be setup in an hour or two, not days or weeks. Customers dont really care what systems they use, as long as it works. Developers want something easy to build.

Thank you.

from saleor.

mirekm avatar mirekm commented on June 15, 2024

What does "lower entry threshold" even mean?! You mean systems that are easier to deploy?

It would be great to know if you encountered issues with the database migrations (as Faizan suggested above) or if there was something else that posed a challenge.

What does "tech-agnostic, API-based extensibility" even mean? You mean less technical than other systems, and that has an API? That statement is not true.

I'm not sure which statement you're referring to as untrue. What we mean by "tech-agnostic, API-based extensibility" is that Saleor allows you to extend its capabilities and execution flows using publicly available APIs in any language and stack of your choice, rather than relying on a plugin architecture. You can read more about the benefits (and disadvantages) of this approach here: Benefits of extending commerce via API over plugins

If using impressive non-layman terms gets companies to sign up to your expensive monthly fee then good on you!

I understand some things may look like unnecessary jargon. We use the term internally to differentiate our extensibility model (more in the link above). Anyway, feedback taken.

Saleor is fully open source. Companies (and individuals) use it for free and without limitation whenever and however they want. We don't discriminate between our open source API and Cloud version. Organizations can choose what works best for them: either investing in their own operations or opting for our Cloud service to focus on their customers instead of platform maintenance and reliability. In the case of Saleor, the evaluation is typically done by larger technical teams, and I believe marketing plays a minimal role in their decision.

But ultimately, all the features Saleor has, can be done in many other common eCommerce systems. We need a backend solution for customers to take orders of products on a website. It must have standard features like stock control, variation's etc.

That’s most probably true. Most features found in Saleor can be implemented in other ecommerce systems as well, just as they have been in the past. While we aim for Saleor to be the best choice for development teams dealing with all sorts of commerce complexities, we always advocate for finding the best fit for your specific requirements. E-commerce companies differ greatly in complexity and needs.

from saleor.

amityweb avatar amityweb commented on June 15, 2024

About "tech-agnostic, API-based extensibility" not being true, sorry I should have explained more. The statement implies if you want that then you use Saleor. But what I mean is, other systems have that too. Including "any language and stack of your choice, rather than relying on a plugin architecture". So its "untrue" to claim you use Saleor if you need a "tech-agnostic, API-based extensibility" system. I am using WooCommerce and use its API which allows me to build a website in Next.js. Its API and documentation and support is far better than Saleors!

I would have used Saleor if the installation and documentation was straight forward, but its not. I am not interested in wasting all the setup time, when I can have another system installed and working within an hour, and have the same features. If you want to expand your customer base you need to sort that out. My customer is a very large international agency and maybe we could have switched to your paid version but I told them to abandon Saleor because its too difficult to work with and provides no added benefits to other systems. Ultimately we have the same functionality now without Saleor.

I have had other issues, I have posted other GitHub topics and requested support over the past year or so on a couple of places, but no replies come, so support is also not good. I am using the free version not paid one, but if a company release a free/community one I expect them to support it and have good documentation, otherwise just dont provide it.

from saleor.

amityweb avatar amityweb commented on June 15, 2024

By the way, we did start with Saleor over a year ago, when the deploy process was via GitHub to Heroku. That just worked. I now have all these issues since your switch to Docker. So we switched eCommerce system and I just needed to update all my GraphQL queries to get data from elsewhere. Now I dont have the headaches of Docker.

from saleor.

mirekm avatar mirekm commented on June 15, 2024

Thank you for the additional context!

On the extensibility model – we don't mean API and async webhooks only. It's true that creating a storefront with Next.js should be possible with nearly any e-commerce API. This part is not always straightforward, but all you need is an API from which you can pull your data, plus all the basic cart and checkout mutations. By extensibility, in a nutshell, we mean the number of standard execution flows that you can influence in Saleor with our sync webhooks: Payment events, Shipping events, Tax events, Transaction events, Stored payment method events. This enables developers to plug into all standard execution flows in Saleor.

This approach is crucial when you need to integrate and stitch together various systems, such as third-party SaaS solutions (PIM, ERP, OMS, etc.), custom back-office applications, and other services in your e-commerce operation.

from saleor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.