Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Conversation

lilshoff
Copy link
Contributor

@lilshoff lilshoff commented Jun 9, 2021

No description provided.

@lilshoff lilshoff self-assigned this Jun 9, 2021
@lilshoff lilshoff requested a review from Emyrk June 9, 2021 21:19
@lilshoff lilshoff requested a review from sreya June 14, 2021 18:21
@sreya
Copy link
Collaborator

sreya commented Jun 15, 2021

Similar to my comments in the other PR I would avoid adding this until we have proper Github App support.

@lilshoff
Copy link
Contributor Author

OK so do we want to (1) remove support for remote tracked policy templates or (2) not expose setting policy templates in the CLI at all?

}
}

return sb.String()
Copy link
Member

Choose a reason for hiding this comment

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

Something that might be helpful is some sort of summary at the end. I have 200 workspaces in my dogfood, and it would be nice to see something like:

102 Workspaces will not be able to be rebuilt.
152 Workspaces have warnings but are still functional.

In the future, it would be great to merge-common errors and report which users are affected maybe? But for now I think a simple summary like that would be great.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a summary at the end.

Mine isn't too exciting bc I regularly delete my workspaces in my dev deployment, so I only have like 2.
I'm curious to see what you think of the summary when there are 200 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm very curious about why @Emyrk 200 workspaces 😂

Copy link
Member

Choose a reason for hiding this comment

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

Ha, my deployment has 200 workspaces because I was testing the response times of our apis at those numbers. I made a little deployment branch to make them fast, but I never made anything to delete them in bulk haha.

I figure I'll just keep em as a bit of a "stress test" for the UI

Copy link
Member

Choose a reason for hiding this comment

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

The summary at 200 is not the most helpful thing, but I'm not worried about optimizing for 200 workspaces right now. Just thought a summary would be nice even for like ~30 workspaces which is reasonable at a company

}

for _, mc := range resp.MergeConflicts {
workspace, err := client.WorkspaceByID(ctx, mc.WorkspaceID)
Copy link
Member

Choose a reason for hiding this comment

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

I like the extra details. In my dogfood of 200 workspaces this was still pretty quick 👍

@lilshoff lilshoff changed the title feat: support setting policy template via local file or remote repo feat: support setting policy template via local file or restoring to default Jun 18, 2021
@Emyrk
Copy link
Member

Emyrk commented Jun 18, 2021

OK so do we want to (1) remove support for remote tracked policy templates or (2) not expose setting policy templates in the CLI at all?

Ah saw John's comment yea. Drop setting git tracked tracked templates.
I'm indifferent on if we should have a cli for it. You can always hide the command since it's already done 🤷

@lilshoff
Copy link
Contributor Author

lilshoff commented Jun 18, 2021

Yeah I initially didn't think this belonged in the CLI, but Ketan made a comment in the tls frontend CH ticket: "I think having the loose goal of CLI feature parity with the graphical web UI is a good default position."

Then there's also this ticket which seems to imply we want this in the CLI


if currentConflicts {
if len(mc.CurrentTemplateWarnings) != 0 {
sb.WriteString(fmt.Sprintf("Warnings: \n%s\n", strings.Join(mc.CurrentTemplateWarnings, "\n")))
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest using fmt.Fprintf(&sb here https://play.golang.org/p/21-gij80d3c

}
}

return sb.String()
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm very curious about why @Emyrk 200 workspaces 😂

@lilshoff lilshoff merged commit cdbfc48 into master Jun 21, 2021
@lilshoff lilshoff deleted the lilshoff/policy-template branch June 21, 2021 23:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants