Skip to content

chore(jetbrains-gateway): make agent_name unused #383

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

Merged
merged 7 commits into from
Jan 10, 2025

Conversation

phorcys420
Copy link
Member

@phorcys420 phorcys420 commented Jan 8, 2025

agent_name is not necessary in the URL when the agent ID is provided, this PR aims to remove the need to specify the agent's name to improve the UX of the module.

@phorcys420
Copy link
Member Author

@phorcys420 phorcys420 enabled auto-merge (squash) January 8, 2025 22:32
@phorcys420 phorcys420 requested a review from matifali January 8, 2025 22:32
@phorcys420 phorcys420 changed the title chore: make agent_name unused chore(jetbrains_gateway): make agent_name unused Jan 8, 2025
@phorcys420 phorcys420 changed the title chore(jetbrains_gateway): make agent_name unused chore(jetbrains-gateway): make agent_name unused Jan 8, 2025
@matifali matifali requested a review from code-asher January 9, 2025 07:20
phorcys420 and others added 3 commits January 10, 2025 19:27
Co-authored-by: Muhammad Atif Ali <[email protected]>
Co-authored-by: Muhammad Atif Ali <[email protected]>
Co-authored-by: Muhammad Atif Ali <[email protected]>
@phorcys420
Copy link
Member Author

@matifali I was wondering, is there a way to add a warning to a template so that the template admins will notice?
Like a coder_warning resource or something.

@phorcys420 phorcys420 requested a review from matifali January 10, 2025 19:29
@phorcys420 phorcys420 merged commit c8a42f6 into main Jan 10, 2025
1 of 2 checks passed
@phorcys420 phorcys420 deleted the phorcys/gateway-remove-agent-name branch January 10, 2025 20:05
@matifali
Copy link
Member

You can probably hack something using a null_resource and local_exec to log something if the input is being used.

I was also thinking about a similar feature to read logs from arbitrary sources and inject them in startup logs. If we do something like that we can expand the scope to choose the sink of the logs to be either build logs (i.e. terraform) or agent logs (i.e. startup_script logs)

@phorcys420
Copy link
Member Author

@matifali providers also support emitting warnings:
image

I think a coder_warning thing would be nice just so that you can choose to display warnings to either the user, or template admin, or both.

@code-asher
Copy link
Member

code-asher commented Jan 13, 2025

Ahh wait we tried this once already, did something change about the ID? It did not work before because the ID here (of the resource, I think it was changing every rebuild) is not necessarily the same as the ID in the API response (of the agent in the database, this one I think was not changing).

@matifali
Copy link
Member

Ahh wait we tried this once already, did something change about the ID? It did not work before because the ID here (of the resource, I think it was changing every rebuild) is not necessarily the same as the ID in the API response (of the agent in the database, this one I think was not changing).

@phorcys420 have you tested by rebuilding/restarting the workspace too?

@phorcys420
Copy link
Member Author

Ahh wait we tried this once already, did something change about the ID? It did not work before because the ID here (of the resource, I think it was changing every rebuild) is not necessarily the same as the ID in the API response (of the agent in the database, this one I think was not changing).

@phorcys420 have you tested by rebuilding/restarting the workspace too?

I haven't, I only tried starting it once, i'll check if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants