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

Bugfix make podman work on fedora, apple silicone and windows OS #74

Merged
merged 23 commits into from
Feb 5, 2024

Conversation

tjololo
Copy link
Member

@tjololo tjololo commented Jan 24, 2024

Description

This started out as a fix for new apple silicone but got bigger as problems in other OSes was discovered.

  • Fixed some issues that surfaced when trying to run app-localtest on an Mac-M3 machine.
  • Also added some commands to help those running old versions of podman.
  • Make localtest work with podman and compose on windows
  • Provide a hack for fixing the problem with bind mounts giving permission denied inside containers

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@tjololo tjololo changed the title Bugfix/podman macos applehv and outdated podman versions Bugfix make podman work on fedora, apple silicone and windows OS Jan 26, 2024
podman-compose.yml Outdated Show resolved Hide resolved
@tjololo tjololo self-assigned this Jan 31, 2024
Copy link
Contributor

@olemartinorg olemartinorg left a comment

Choose a reason for hiding this comment

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

Reserving 8080 for something else all of a sudden is a bold move, I think. We'll need to update lots of Cypress tests in app-frontend, as this change will break them all - and will even break them in a way where our changes will be broken unless people upgrade their localtest. Could you select an other port, for example 8000?

.env.template Outdated Show resolved Hide resolved
src/Controllers/FrontendVersionController.cs Outdated Show resolved Hide resolved
@tjololo
Copy link
Member Author

tjololo commented Jan 31, 2024

Reserving 8080 for something else all of a sudden is a bold move, I think. We'll need to update lots of Cypress tests in app-frontend, as this change will break them all - and will even break them in a way where our changes will be broken unless people upgrade their localtest. Could you select an other port, for example 8000?

Not hell bent on 8080 so if this leads to alot of problems we can find another default port for localtest.
Any suggestions as to what port we should choose? 8180, 8181?
Is there any way we can check if there is a running frontend locally, we can "scan" a range of ports in localtest and just make them available in the list if they are present

@olemartinorg
Copy link
Contributor

olemartinorg commented Jan 31, 2024

I'd suggest something simple and easy to remember, such as 8000 or 3000 (although that is frequently used by other projects).

Is there any way we can check if there is a running frontend locally, we can "scan" a range of ports in localtest and just make them available in the list if they are present

Great idea! You can start at 8080 and the next ports as far as it goes (8081, 8082, 8083+). One way to 'detect' webpack is to just request http://localhost:8080/ and see if you get this back:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /</pre>
</body>
</html>

Otherwise you can request http://localhost:8080/altinn-app-frontend.css. That takes far less time to return a value than the js file, at least.

Detect running local dev servers of app-frontend-react instead of static value
Copy link
Contributor

@olemartinorg olemartinorg left a comment

Choose a reason for hiding this comment

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

Looks good now! 🥳
I added this to app-frontend to make the current branch show up in the frontend-version-picker:

@tjololo tjololo merged commit 1d23de2 into main Feb 5, 2024
1 check passed
@tjololo tjololo deleted the bugfix/podman-macos-applehv branch February 5, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants