Skip to content

Feat/118 - #124

Merged
Gerrrr merged 3 commits into
masterfrom
feat/118
Feb 24, 2026
Merged

Gerrrr merged 3 commits into
masterfrom
feat/118

Conversation

@Gerrrr

@Gerrrr Gerrrr commented Jan 31, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains my understanding of what we want to achieve in #118.

Changes:

  • regressions command is removed as a Datastax-specific thing. analyze covers all interesting use cases.
  • analyze --branch is ConfigArgParsified and can be configured via BRANCH env variable.
  • Configuration syntax for analyze --branch is unified as much as possible across importers. As a standard, I used Graphite %BRANCH syntax. It is reused it in Postgres and BigQuery importers plus. Csv importer has its own thing. It looks at a branch column and behaves in the following way:
    1. If there is no branch column and --branch is not specified, it works as before.
    2. If there is a branch column and --branch is not specified, the importer checks that that column contains a unique value a guardrail against mixing results between different branches.
    3. If there is a branch column and --branch is specified, the importer will filter out values for rows where the value in branch column is not equal to the passed value.
    4. If there is no branch column and --branch is specified, the importer throws.
  • There is no default value for --branch now and a test config has at least one %BRANCH, a user must pass it.
  • %{BRANCH} is escaped against SQL injections in PostgreSQL and BigQuery, just in case.

@Gerrrr
Gerrrr requested a review from henrikingo January 31, 2026 20:19
@Gerrrr

Gerrrr commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

Bump @henrikingo :)

@henrikingo henrikingo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Thanks Alex. I think this is as discussed in #118 and with these changes I'm good to go for a next release. Two comments just to highlight where there's future work:

This is actualy a fairly superficial change, yet it ends up being hundreds of lines changed. Ok, so half of that is test coverage, which is good, but the other half is ust because we copypasted the same code around each new importer. This aspect of the code deserves a serious refactoring. But let's release this first. The new e-divisive implementation deserves to get out there!

What's the difference between --branch and --attrs branch? The truth is, there's no need for a separate --branch option, it's just a dimension/label like many other attributes. (repository url, operating system, etc...)

@Gerrrr

Gerrrr commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor Author

This aspect of the code deserves a serious refactoring.

+1, I plan to refactor the importer code soon as a step towards #55.

What's the difference between --branch and --attrs branch

hmmm, I did not realize one can pass attributes via CLI. Let me experiment with it; we may not need --branch after all.

@Gerrrr

Gerrrr commented Feb 24, 2026

Copy link
Copy Markdown
Contributor Author

What's the difference between --branch and --attrs branch

--attrs only works with GraphiteImporter. Also, attrs does not allow you to overwrite a parameter from CLI - it just filters out attributes that are not explicitly specified -

otava/otava/importer.py

Lines 163 to 181 in 2bb687f

run_ids = []
commits = []
versions = []
branches = []
for t in time:
event = events_by_time.get(t)
run_ids.append(event.run_id if event is not None else None)
commits.append(event.commit if event is not None else None)
versions.append(event.version if event is not None else None)
branches.append(event.branch if event is not None else None)
attributes = {
"run": run_ids,
"branch": branches,
"version": versions,
"commit": commits,
}
if selector.attributes is not None:
attributes = {a: attributes[a] for a in selector.attributes}
.

Additionally, this attribute list is Fallout-specific with run_id and version there.

@Gerrrr

Gerrrr commented Feb 24, 2026

Copy link
Copy Markdown
Contributor Author

On a slightly different topic, after the conversation in #127 I am having second thoughts about only doing string replacement with --branch and not addressing "A/B" testing in Otava CLI in any way. I will share an idea in #118 in order not to block this PR.

@Gerrrr
Gerrrr merged commit f78bfee into master Feb 24, 2026
6 checks passed
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