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

Validate that the localtest version is new enough for the app on startup #1007

Merged
merged 14 commits into from
Jan 8, 2025

Conversation

martinothamar
Copy link
Contributor

@martinothamar martinothamar commented Jan 6, 2025

Description

Checks that the localtest version running locally (when GeneralSettings.HosteName is set to local.altinn.cloud) is new enough (version 1)

image

Logs error and shuts down if

  • Version <= 0
  • Version endpoint was not found

In other failure conditions it still logs and error and retries:

image

Related Issue(s)

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)

@martinothamar martinothamar self-assigned this Jan 6, 2025
@martinothamar martinothamar added kind/chore feature Label Pull requests with new features. Used when generation releasenotes labels Jan 6, 2025
@martinothamar
Copy link
Contributor Author

/publish

Copy link

github-actions bot commented Jan 7, 2025

@martinothamar martinothamar changed the title Validate localtest version is new enough for the app Validate that the localtest version is new enough for the app on startup Jan 7, 2025
@ivarne
Copy link
Member

ivarne commented Jan 8, 2025

This don't work for people that can't use port 80, but rather 8080 (or any other port they might want to use)

In PlatformSettings the default way to access localtest services is using http://localhost:5101/, and I have never had an instance where users had issues with that.

@martinothamar
Copy link
Contributor Author

This don't work for people that can't use port 80, but rather 8080 (or any other port they might want to use)

Oo good point I had forgotten about that. I use PlatformSettings instead in the latest commit, which I think is what you suggested here. 5101 is the default for both the docker and podman compose files, and if app devs have changed it, they will probably have changed PlatformSettings as well

@martinothamar
Copy link
Contributor Author

/publish

Copy link

github-actions bot commented Jan 8, 2025

@martinothamar
Copy link
Contributor Author

/publish

@martinothamar
Copy link
Contributor Author

/publish

Copy link

github-actions bot commented Jan 8, 2025

@martinothamar martinothamar merged commit 11f1d33 into main Jan 8, 2025
12 checks passed
@martinothamar martinothamar deleted the chore/localtest-exp branch January 8, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Label Pull requests with new features. Used when generation releasenotes kind/chore
Projects
Status: 🧪 Test
Development

Successfully merging this pull request may close these issues.

3 participants