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

Acceptance make commands not consistent #121

Open
stevepiercy opened this issue Dec 9, 2024 · 1 comment
Open

Acceptance make commands not consistent #121

stevepiercy opened this issue Dec 9, 2024 · 1 comment

Comments

@stevepiercy
Copy link
Contributor

The acceptance make commands are not consistent between the project root and backend.

root

## Acceptance
.PHONY: acceptance-backend-dev-start
acceptance-backend-dev-start:
@echo "Start acceptance backend"
$(MAKE) -C "./backend/" acceptance-backend-start
.PHONY: acceptance-frontend-dev-start
acceptance-frontend-dev-start:
@echo "Start acceptance frontend"
$(MAKE) -C "./frontend/" acceptance-frontend-dev-start

As you can see, the command to start the backend from the root is acceptance-backend-dev-start, which is different from that while in the backend directory of acceptance-backend-start.

I can submit a PR to fix this inconsistency, by inserting -dev as needed, and updating documentation that refers to it.

However, we need to be careful about the context of the documentation, specifically whether you used Cookieplone or cloned Volto to contribute. In Volto, the backend command omits -dev. Maybe we should change these commands in Volto core as well?

https://github.com/plone/volto/blob/cfea4d988d25e41779b0742606bf43fa43d2bbee/packages/volto/Makefile#L116-L129

##### Acceptance tests (Cypress)
######### Dev mode Acceptance tests


.PHONY: acceptance-frontend-dev-start
acceptance-frontend-dev-start: ## Start acceptance frontend in development mode
	RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm start


######### Core Acceptance tests


.PHONY: acceptance-backend-start
acceptance-backend-start: ## Start backend acceptance server
	#docker run -it --rm -p 55001:55001 $(DOCKER_IMAGE_ACCEPTANCE)
	# Uncomment next line and comment line above to use a custom image with the acceptance server (in case you need to use an specific backend add-on or version)
	docker run -it --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e ADDONS='$(KGS) $(TESTING_ADDONS)' -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors $(DOCKER_IMAGE) ./bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING
@davisagli
Copy link
Member

The frontend has a distinction between dev and production modes (in dev mode it watches for file changes and does hot module reloading in the browser). The backend doesn't have this distinction. So I would remove "dev" from all backend commands, but keep it for the frontend commands that use pnpm start rather than pnpm start:prod.

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

2 participants