-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Username aliases #588
Username aliases #588
Conversation
Instead of removing prettier entirely, can we just disable it for the templates directory? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! I'll open a CSS PR shortly, but here are a few notes:
Steps & Feedback:
- ✅ Added a new alias
- ✅ Update display name
- When I update an alias Display Name the field clears after saving, and it's not immediately understood if it did in fact save.
- The new value should be visible in the input.
- When a Display Name is added, the page heading should show the new display name.
- Before:
Alias:@hr-dept
- After (with Display Name):
Alias: HR Department
- Before:
Current Aliases
list should show only the updated Display Name after saving
- When I update an alias Display Name the field clears after saving, and it's not immediately understood if it did in fact save.
- ✅ Added alias to directory
- Added bio and links to alias
- ✅ Bio visible in directory listing
- ⛔️ Bio not visible on profile page
- ⛔️ Links not visible on alias profile page
- ✅ Added primary user to directory
- Added bio and links to primary username
- ✅ Bio visible in directory listing
- ✅ Bio AND links visible on profile page
- ⛔️ Bio of primary username is displayed for the alias
Just noting that two of the three bugs happened because of Jinja's sloppy handling of |
3f71d7b
to
2e2d065
Compare
dd6a833
to
a5cb55d
Compare
a5cb55d
to
fd59dc7
Compare
Terraform plan in terraform/dev in the hushline-dev-username-aliases workspace With variablesbranch = "username-aliases"
name = "dev-username-aliases" Plan: 3 to add, 0 to change, 0 to destroy. Changes to Outputs.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# digitalocean_project.hush_line_dev will be created
+ resource "digitalocean_project" "hush_line_dev" {
+ created_at = (known after apply)
+ description = "Development instance based on the username-aliases branch"
+ environment = "Development"
+ id = (known after apply)
+ is_default = false
+ name = "dev-username-aliases"
+ owner_id = (known after apply)
+ owner_uuid = (known after apply)
+ purpose = "Web Application"
+ resources = (known after apply)
+ updated_at = (known after apply)
}
# module.app.digitalocean_app.app will be created
+ resource "digitalocean_app" "app" {
+ active_deployment_id = (known after apply)
+ created_at = (known after apply)
+ default_ingress = (known after apply)
+ id = (known after apply)
+ live_url = (known after apply)
+ project_id = (known after apply)
+ updated_at = (known after apply)
+ urn = (known after apply)
+ dedicated_ips (known after apply)
+ spec {
+ domains = (known after apply)
+ features = [
+ "buildpack-stack=ubuntu-22",
]
+ name = "dev-username-aliases"
+ region = "sfo"
+ alert {
+ disabled = false
+ rule = "DEPLOYMENT_FAILED"
}
+ domain (known after apply)
+ ingress (known after apply)
+ service {
+ dockerfile_path = "Dockerfile"
+ http_port = 8080
+ instance_count = 1
+ instance_size_slug = "apps-s-1vcpu-0.5gb"
+ internal_ports = (known after apply)
+ name = "app"
+ run_command = (known after apply)
+ github {
+ branch = "username-aliases"
+ deploy_on_push = true
+ repo = "scidsg/hushline"
}
+ health_check {
+ http_path = "/health.json"
}
+ routes (known after apply)
}
+ service {
+ http_port = (known after apply)
+ instance_count = 1
+ instance_size_slug = "apps-s-1vcpu-0.5gb"
+ internal_ports = [
+ 5432,
]
+ name = "db"
+ run_command = (known after apply)
+ image {
+ registry = "library"
+ registry_type = "DOCKER_HUB"
+ repository = "postgres"
+ tag = "16.4-alpine3.20"
+ deploy_on_push (known after apply)
}
+ routes (known after apply)
}
}
}
# module.app.random_password.local_db_password will be created
+ resource "random_password" "local_db_password" {
+ bcrypt_hash = (sensitive value)
+ id = (known after apply)
+ length = 16
+ lower = true
+ min_lower = 0
+ min_numeric = 0
+ min_special = 0
+ min_upper = 0
+ number = true
+ numeric = true
+ override_special = "!#$%&*()-_=+[]{}<>:?"
+ result = (sensitive value)
+ special = true
+ upper = true
}
Plan: 3 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ app_live_url = (known after apply) ✅ Plan applied in Deploy/Destroy Branch Dev Environment #277 Outputsapp_live_url = "https://dev-username-aliases-4y3kg.ondigitalocean.app" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took an initial pass through. The remote dev environment won't work until the PR has the corresponding migrations which you can generate via make revision message="username_aliases"
Various updates
c3f6497
to
247e21a
Compare
247e21a
to
ca80798
Compare
961660f
to
8b25ad1
Compare
8b25ad1
to
a6d4e96
Compare
Terraform plan in terraform/dev in the hushline-dev-username-aliases workspace With variablesbranch = "username-aliases"
name = "dev-username-aliases" Plan: 3 to add, 0 to change, 0 to destroy. Changes to Outputs.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# digitalocean_project.hush_line_dev will be created
+ resource "digitalocean_project" "hush_line_dev" {
+ created_at = (known after apply)
+ description = "Development instance based on the username-aliases branch"
+ environment = "Development"
+ id = (known after apply)
+ is_default = false
+ name = "dev-username-aliases"
+ owner_id = (known after apply)
+ owner_uuid = (known after apply)
+ purpose = "Web Application"
+ resources = (known after apply)
+ updated_at = (known after apply)
}
# module.app.digitalocean_app.app will be created
+ resource "digitalocean_app" "app" {
+ active_deployment_id = (known after apply)
+ created_at = (known after apply)
+ default_ingress = (known after apply)
+ id = (known after apply)
+ live_url = (known after apply)
+ project_id = (known after apply)
+ updated_at = (known after apply)
+ urn = (known after apply)
+ dedicated_ips (known after apply)
+ spec {
+ domains = (known after apply)
+ features = [
+ "buildpack-stack=ubuntu-22",
]
+ name = "dev-username-aliases"
+ region = "sfo"
+ alert {
+ disabled = false
+ rule = "DEPLOYMENT_FAILED"
}
+ domain (known after apply)
+ ingress (known after apply)
+ service {
+ dockerfile_path = "Dockerfile"
+ http_port = 8080
+ instance_count = 1
+ instance_size_slug = "apps-s-1vcpu-0.5gb"
+ internal_ports = (known after apply)
+ name = "app"
+ run_command = (known after apply)
+ github {
+ branch = "username-aliases"
+ deploy_on_push = true
+ repo = "scidsg/hushline"
}
+ health_check {
+ http_path = "/health.json"
}
+ routes (known after apply)
}
+ service {
+ http_port = (known after apply)
+ instance_count = 1
+ instance_size_slug = "apps-s-1vcpu-0.5gb"
+ internal_ports = [
+ 5432,
]
+ name = "db"
+ run_command = (known after apply)
+ image {
+ registry = "library"
+ registry_type = "DOCKER_HUB"
+ repository = "postgres"
+ tag = "16.4-alpine3.20"
+ deploy_on_push (known after apply)
}
+ routes (known after apply)
}
}
}
# module.app.random_password.local_db_password will be created
+ resource "random_password" "local_db_password" {
+ bcrypt_hash = (sensitive value)
+ id = (known after apply)
+ length = 16
+ lower = true
+ min_lower = 0
+ min_numeric = 0
+ min_special = 0
+ min_upper = 0
+ number = true
+ numeric = true
+ override_special = "!#$%&*()-_=+[]{}<>:?"
+ result = (sensitive value)
+ special = true
+ upper = true
}
Plan: 3 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ app_live_url = (known after apply) ✅ Plan applied in Deploy/Destroy Branch Dev Environment #285 Outputsapp_live_url = "https://dev-username-aliases-vh4ix.ondigitalocean.app" |
🚀 App successfully deployed to https://dev-username-aliases-vh4ix.ondigitalocean.app! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to follow up on future PRs with:
- alembic migrations run during CI
- UUIDs instead of DB ids for messages, users, aliases
- don't autocommit username changes
This is a draft PR that does the following:
prettier
for jinja because it keeps fucking up the jinja templates so that they produce incorrect HTMLdev_data.py
shell to populate the DBdb.create_all()
(not Alembic) so that local DB changes appear for improved dev experienceUsername
type that holds all the bio/fields for primary/secondary users and also is the target for messagesTODOs:
Closes #498