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

[TT-1078] allow to pass run id to remove function #918

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Apr 16, 2024


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes improve the run ID generation and removal logic by making it more robust and context-aware. Specifically, enhancing the run ID to include a "local_" prefix for locally generated IDs and adjusting the removal logic to check if the run ID indicates local execution.

What

  • utils/runid/run_id.go
    • Added fmt and strings packages to support new logic.
    • Updated GetOrGenerateRunId function to prefix the generated UUID with "local_" indicating it was generated in a local context.
    • Changed RemoveLocalRunId function to accept a runId parameter and updated logic to only remove the .run.id file if the runId contains the substring "local", making the removal conditional on the run ID indicating it's from a local context. This change ensures that cleanup happens only when appropriate, avoiding unintended deletions in non-local environments.

@cl-sonarqube-production
Copy link

@Tofel Tofel changed the title allow to pass run id to remove function [TT-1078] allow to pass run id to remove function Apr 16, 2024
@Tofel Tofel marked this pull request as ready for review April 16, 2024 16:39
@Tofel Tofel requested review from sebawo and a team as code owners April 16, 2024 16:39
@Tofel Tofel merged commit 4ab4e80 into main Apr 16, 2024
22 checks passed
@Tofel Tofel deleted the tt_1078_run_id_toml branch April 16, 2024 17:22
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.

2 participants