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

Endurain file upload support #1193

Merged
merged 1 commit into from
Aug 31, 2024
Merged

Conversation

AquaWolf
Copy link
Contributor

This pull requests adds a new Synchronizer for the self-hostable endurain software.
This PR solves #1185

I would love to add some unit tests but I can't find some examples where Synchronizers are tested.

To test this implementation I've keeped some commits to use it against a http endurain instance for example with an emulator and docker compose locally.

I used following config of endurain locally:

services:
  # frontend logic
  frontend:
    container_name: frontend
    image: ghcr.io/joaovitoriasilva/endurain/frontend:latest
    environment:
      - MY_APP_BACKEND_PROTOCOL=http
      - MY_APP_BACKEND_HOST=localhost:98
      - MY_APP_STRAVA_CLIENT_ID=REPLACE
    ports:
      - "8081:80" # frontend port, change per your needs
    restart: unless-stopped
    
  # API logic
  backend:
    container_name: backend
    image: ghcr.io/joaovitoriasilva/endurain/backend:latest
    environment:
      - DB_PASSWORD=YkVenw
      - SECRET_KEY=SECRET # openssl rand -hex 32
      - STRAVA_CLIENT_ID=REPLACE
      - STRAVA_CLIENT_SECRET=REPLACE
      - STRAVA_AUTH_CODE=REPLACE
      - GEOCODES_MAPS_API=REPLACE
      - FRONTEND_PROTOCOL=http # default is http
      - FRONTEND_HOST=localhost:8081 # frontend host or local ip (example: 192.168.1.10:8080), default is frontend:8080
    ports:
      - "98:80" # API port, change per your needs
    volumes:
      -  REPLACE:/app/user_images # necessary for user image persistence on container image updates
    depends_on:
      - mariadb
    restart: unless-stopped
  # mysql mariadb logic
  mariadb:
    image: mariadb:latest
    container_name: mariadb
    environment:
      - MYSQL_ROOT_PASSWORD=SECRET
      - MYSQL_DATABASE=endurain
      - MYSQL_USER=endurain
      - MYSQL_PASSWORD=SECRET
    ports:
      - "3306:3306"
    volumes:
      - /var/lib/mysql
    restart: unless-stopped
networks:
  default:
    external: true
    name: backend_network

If you have further questions how to test that with endurain I could provide more information.

Copy link
Collaborator

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only browsed the code, did not react to anything. It is basically EndurainSynch that need to be reviewed.

When adding an account with dummy url/user, it was still added as an active account, should only be added at success.

Not sure I want to run this myself, any user that can join?

app/AndroidManifest.xml Outdated Show resolved Hide resolved
app/res/drawable/service_endurain.xml Outdated Show resolved Hide resolved
@AquaWolf
Copy link
Contributor Author

AquaWolf commented Aug 31, 2024

I could provide you an endurain test instance if you don't want to spin it up.
But I dont want to put the domain here for public.

@gerhardol
Copy link
Collaborator

I could provide you an endurain test instance if you don't want to spin it up.
But I dont want to put the domain here for public.

Maybe. But I would prefer that someone that will use this functionality also would test take it for a spin, to make sure it works as expected.

Dont misunderstand me: It is great that features are added, this open source. But if am a very sporadic user, I can only say if it seems to work or not. A regular user could have usage comments.

@AquaWolf
Copy link
Contributor Author

Totally agree 👍 would also like to see someone who would like to use/test it
By the way is there an beta/alpha channel or is there only the live app?

Copy link
Collaborator

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please autoformat EndurainSynchronizer.java in AS

app/src/main/org/runnerup/export/EndurainSynchronizer.java Outdated Show resolved Hide resolved
@gerhardol
Copy link
Collaborator

Someone else to test?
Email info to me and I will make a brief test: gerhard dot nospam (as is) at gmail

Copy link
Collaborator

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brief usage myself, works fine for me.
Squash merge?

@AquaWolf
Copy link
Contributor Author

AquaWolf commented Aug 31, 2024

I could squash the commits sure 😃
Or you could directly make a squash merge then I don't have to squash them :)

@gerhardol
Copy link
Collaborator

I could squash the commits sure 😃 Or you could directly make a squash merge then I don't have to squash them :)

I can do that but then I set the commit message.

@AquaWolf
Copy link
Contributor Author

done 👍

@gerhardol gerhardol merged commit f32722e into jonasoreland:master Aug 31, 2024
@AquaWolf AquaWolf deleted the endurain branch August 31, 2024 20:01
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.

2 participants