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

Revert "reuse built frontend in ci, merge compose files (#6674)" #6876

Closed
wants to merge 1 commit into from

Conversation

eradman
Copy link
Collaborator

@eradman eradman commented Apr 11, 2024

What type of PR is this?

  • Bug Fix
  • Revert refactoring

Description

Revert all commits >= 3f19534

These changes were far to invasive to test properly.

Reverted command used:

git reset --hard 24dec192eed8c95560ef20f6765d96c67a5bdbbf
git reset --soft HEAD@{1}

@AndrewChubatiuk
Copy link
Contributor

@eradman what is a reason for this PR?

@eradman
Copy link
Collaborator Author

eradman commented Apr 11, 2024

@AndrewChubatiuk the server does not start up correctly after these set of changes. As posted in the commit message:

Current:

IMAGE                                PORTS
redash-server                        0.0.0.0:5000->5000/tcp, :::5000->5000/tcp, 0.0.0.0:5678->5678/tcp, :::5678->5678/tcp
redis:7-alpine                       6379/tcp
pgautoupgrade/pgautoupgrade:latest   0.0.0.0:15432->5432/tcp, :::15432->5432/tcp
maildev/maildev                      0.0.0.0:1025->1025/tcp, :::1025->1025/tcp, 0.0.0.0:1080->1080/tcp, :::1080->1080/tcp

Expected:

IMAGE                                PORTS
redash-worker                        5000/tcp
redash-scheduler                     5000/tcp
redash-server                        0.0.0.0:5678->5678/tcp, :::5678->5678/tcp, 0.0.0.0:5001->5000/tcp, :::5001->5000/tcp
redis:7-alpine                       6379/tcp
maildev/maildev                      0.0.0.0:1025->1025/tcp, :::1025->1025/tcp, 0.0.0.0:1080->1080/tcp, :::1080->1080/tcp
pgautoupgrade/pgautoupgrade:latest   0.0.0.0:15432->5432/tcp, :::15432->5432/tcp

Commit 3f19534 is a large change, and needs to broken into separate commits so that we can more easily test it and evaluate changes to behavior.

@AndrewChubatiuk
Copy link
Contributor

AndrewChubatiuk commented Apr 11, 2024

for a local setup you need to use docker compose local profile

docker compsoe --profile local up -d

I've added a PR, where added some fixes. #6877
It'll take less time to fix, than to revert

@eradman
Copy link
Collaborator Author

eradman commented Apr 11, 2024

The dev instructions need to be updated if make up is not used any more.

Also, the server appears to be reachable on port 5000, not port 5001 as it was before.

@AndrewChubatiuk
Copy link
Contributor

The dev instructions need to be updated if make up is not used any more.

Also, the server appears to be reachable on port 5000, not port 5001 as it was before.

updated makefile in #6877 and changed port number in Readme to 5000

@justinclift
Copy link
Member

If we get the Makefile issues sorted out + change the port number back to 5001, would that be ok with you @eradman?

A lot of the changes in the commit this is reverting seemed pretty rational. The port number change is an easy one to change back though. 😄

@eradman
Copy link
Collaborator Author

eradman commented Apr 12, 2024

@justinclift if make up works again then I'd say we can proceed.

Moving the port back to 5001 is a good idea, but not necessary.

Also, node:18.1-bookworm does not resolve for me

$ make
docker compose build
[+] Building 0.7s (4/4) FINISHED
 => [server internal] load build definition from Dockerfile                               0.0s
 => => transferring dockerfile: 3.54kB                                                    0.0s
 => [server internal] load .dockerignore                                                  0.1s
 => => transferring context: 203B                                                         0.0s
 => CANCELED [server internal] load metadata for docker.io/library/python:3.8-slim-bookw  0.6s
 => ERROR [server internal] load metadata for docker.io/library/node:18.1-bookworm        0.6s
------

@justinclift
Copy link
Member

No worries. 😄

Looking at the tags lists on the Node page on Docker Hub, we should probably go with 18-bookworm. There are few variations of that (eg 18.20.2-bookworm) so I'm guessing the 18.1-bookworm thing was a typo.

@justinclift
Copy link
Member

I've just directly pushed a commit to master to fix the Dockerfile image for NodeJS: 9601660

@justinclift
Copy link
Member

justinclift commented Apr 12, 2024

@eradman The follow up PR (#6877) should resolve the technical problems. It also makes the Redash webUI port configurable too.

We still need to update our wiki docs, which will be over the next few hours.

@eradman
Copy link
Collaborator Author

eradman commented Apr 12, 2024

The port should be changed back to 5001. The build succeeds now, but Cypress will not run

Cypress could not verify that this server is running:

  > http://localhost:5001

@justinclift
Copy link
Member

justinclift commented Apr 12, 2024

@eradman Good catch. The port number Cypress is trying to connect to comes from here:

baseUrl: 'http://localhost:5001',

That being said, I'm in favour of updating the default port to be 5001 too, especially after changing the setup.sh script to use that a few days ago. 😄

I'll throw something together shortly to get that done. Getting it done in #6883.

@justinclift
Copy link
Member

@eradman The default port for the webUI has been changed back to 5001 now (062a70c). 😄

@eradman
Copy link
Collaborator Author

eradman commented Apr 12, 2024

Build and tests work now from master. Closing

@eradman eradman closed this Apr 12, 2024
@eradman eradman deleted the last-stable branch April 12, 2024 17:21
@eradman eradman restored the last-stable branch April 29, 2024 19:24
@eradman
Copy link
Collaborator Author

eradman commented Apr 29, 2024

Reopening since I continue to spend time (days) debugging problems with this.

The latest issue is that the server does not auto-reload when changes are made, probably because of the changes to the docker volume mounts.

@eradman eradman reopened this Apr 29, 2024
@AndrewChubatiuk
Copy link
Contributor

where do you expect auto reload?
why don't you create an issue instead?
lot's of useful progress and fixes were done in this PR and in the work after it to revert it just because of local env issues, which should be easy to fix

@AndrewChubatiuk
Copy link
Contributor

need to add REDASH_PRODUCTION=false to .env file. it'll use other scripts for services, which support hot reload

@eradman
Copy link
Collaborator Author

eradman commented Apr 30, 2024

why don't you create an issue instead?

I will some issues as well

@eradman
Copy link
Collaborator Author

eradman commented Apr 30, 2024

Updated this PR to include all changes from April 8, 2024 - April 29.

@AndrewChubatiuk
Copy link
Contributor

@eradman please try these changes
#6933
it should help with hot reload on a server

…)"

Revert all commits >= 3f19534

These changes were far to invasive to test properly.
@eradman
Copy link
Collaborator Author

eradman commented May 7, 2024

Rebasing to resolve conflicts. It is still my view that we should revert to the last stable condition.

@AndrewChubatiuk
Copy link
Contributor

AndrewChubatiuk commented May 7, 2024

@eradman what issues do you have? you do not maintain any communication, so it's impossible to understand your point. if you local environment is not working it doesn't mean it's not stable

@justinclift
Copy link
Member

It is still my view that we should revert to the last stable condition.

Ouch. That'll be a pretty major reversion, but not impossible if there's serious stuff happening that doesn't look resolvable.

@eradman
Copy link
Collaborator Author

eradman commented May 7, 2024

It is still my view that we should revert to the last stable condition.

Ouch. That'll be a pretty major reversion, but not impossible if there's serious stuff happening that doesn't look resolvable.

For context: I have used the major part of three weeks hitting a series of new problems, some of which have been reported and fixed

#6883
#6927
#6937

Some of which still need work

#6933
#6940

I don't have more time (in the short term) to test fixes to functionality that existed prior to April 10, so reverting is the only way I can think to make progress with available resources.

@AndrewChubatiuk
Copy link
Contributor

AndrewChubatiuk commented May 7, 2024

@eradman for both issues you've mentioned, there're PR's with fixes and they are ready
#6940
#6933

@justinclift
Copy link
Member

justinclift commented May 7, 2024

@eradman Understood. I'll take a look at rolling things back tomorrow (too sleepy right now), then figure out what other PRs we'll probably need to apply on top of it afterwards. There's been a few PRs that seem constructive and useful (dependabot, some of mine, and some others that seem useful).

@justinclift
Copy link
Member

As a general note to everyone, this "reverting back to a known working state" approach is likely to go ahead.

We (@getredash/maintainers) are just figuring out how to do it well.

It might take us a few days to really work out the right process. 😄


Further reviews of PRs before that's completed is kind of useless, so don't anyone expect reviews to be happening over the next few days.

I'm not real sure how well that's going to fit any currently happening reviews (sorry @masayuki038). Might be best to hold off on those until this large PR reverting is finished.

@eradman
Copy link
Collaborator Author

eradman commented May 10, 2024

Will try to refactor this as a series of commits to give the CI a chance to pass.

@eradman eradman closed this May 10, 2024
@eradman eradman deleted the last-stable branch May 10, 2024 12:51
@justinclift justinclift mentioned this pull request May 12, 2024
10 tasks
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

Successfully merging this pull request may close these issues.

3 participants