Hyperfoil / Horreum

Benchmark results repository service
https://horreum.hyperfoil.io/
Apache License 2.0
34 stars 30 forks source link

Create initial account when there are no accounts in the system #1708

Closed barreiro closed 2 weeks ago

barreiro commented 1 month ago

This PR adds a mechanism that generates an account that can be used to bootstrap Horreum. That account should be removed once there are other accounts in the system.

Its another step towards removing dependency on keycloak and also custom dev-services.

fixes https://github.com/Hyperfoil/Horreum/issues/1719

stalep commented 1 month ago

@barreiro again, which issue is this solving?

barreiro commented 1 month ago

fixes #1719

johnaohara commented 1 month ago

@barreiro please can you take a look at the test failures?

stalep commented 4 weeks ago

@barreiro does these changes require any new/changes documentation?

barreiro commented 4 weeks ago

@stalep yes, but I'm planning to do it in a separate PR that addresses all the changes in authentication.

johnaohara commented 3 weeks ago

@barreiro if you are planning on adding documentation to cover authentication, please can you add an issue so that we do not forget and can prioritise bringing the docs in line with functionality. Ideally everything (docs, test, changes etc) should be in on PR

barreiro commented 3 weeks ago

@johnaohara created #1775 to follow up with documentation.

barreiro commented 3 weeks ago

@johnaohara I have addressed your comments but the one about the default team. I believe creating such a team is part of initial setup, but is not a requirement.

I'll take that into account in #1775

johnaohara commented 3 weeks ago

@johnaohara I have addressed your comments but the one about the default team. I believe creating such a team is part of initial setup, but is not a requirement.

I'll take that into account in #1775

Dev mode is about developer productivity. If developers have to go through manual steps to recreate a team and assign a user every time they start horreum in dev mode, that is a regression wrt productivity.

right now, i can start dev mode and immediately create a job and start pushing data into Horreum. I would even argue that we should have a default schema and test so that I do not have to complete those steps.

We can certainly have a conversation about removing the default team, but I think we need to have a conversation about what we think the behaviour should be and make changes that improves user/dev experience rather than tagging this in a PR that creates a default initial user.

Options could be;

1 - a wizard that pops up when Horreum does not contain any teams and asks the user if they want to load dummy data or walks them through creating a new team 2 - a dev mode option to persist the database between restarts, allowing developers to only create the team once on the first startup, but re-use the same database files, containing the same configuration

But lets open an issue and discuss, rather than removing it here and debating in a PR that is linked to an issue that does not refer to removing the default team in dev mode

barreiro commented 3 weeks ago

ok, fair enough. I don't have a very strong opinion about it. I do agree with your long term plans, specially number two. agree that we need an issue to track it.