Skip to content

Conversation

@yuriyhrytsyuk
Copy link
Contributor

RATIONALE

CHANGES

PR Automation

Comment-Commands: Trigger CI by commenting on the PR:

  • /trigger-smoke-test or /trigger-test-smoke - Run smoke tests
  • /trigger-install-test or /trigger-test-install - Run installation tests

Labels: Apply labels to trigger workflows:

  • run-smoke-tests or go - Run smoke tests on demand (only works for non-forked PRs)

Important

For Forked PRs: If you're an external contributor, the run-smoke-tests label won't work. Only maintainers can trigger smoke tests on forked PRs by applying the approved-for-smoke-tests label after security review. Please comment requesting maintainer review if you need smoke tests to run.

@github-actions github-actions bot added the go Pull requests that update go code label Jan 29, 2026
@yuriyhrytsyuk yuriyhrytsyuk changed the title [CFX-4801] Detect template using answers or cli directories [CFX-4801] Detect template using answers or cli directories Jan 29, 2026
@yuriyhrytsyuk yuriyhrytsyuk force-pushed the yhr/CFX-4801-template-detection-both branch 2 times, most recently from bebdec5 to 632ae09 Compare January 29, 2026 09:30
@github-actions
Copy link
Contributor

🚀 Smoke tests triggered! Running on Linux and Windows...

@github-actions
Copy link
Contributor

🚀 Smoke tests triggered! Running on Linux and Windows...

@github-actions
Copy link
Contributor

Some smoke tests failed.

❌ Linux: cancelled
✅ Windows: success

View run details

@github-actions
Copy link
Contributor

🚀 Smoke tests triggered! Running on Linux and Windows...

@github-actions
Copy link
Contributor

All smoke tests passed!

✅ Linux: success
✅ Windows: success

View run details

@yuriyhrytsyuk yuriyhrytsyuk force-pushed the yhr/CFX-4801-template-detection-both branch from bd61a7e to 08bc512 Compare January 29, 2026 14:18
@github-actions
Copy link
Contributor

Some smoke tests failed.

❌ Linux: cancelled
✅ Windows: success

View run details

@yuriyhrytsyuk yuriyhrytsyuk force-pushed the yhr/CFX-4801-template-detection-both branch from 3d4e81b to 04a69d9 Compare January 29, 2026 16:30
@yuriyhrytsyuk yuriyhrytsyuk force-pushed the yhr/CFX-4801-template-detection-both branch from 04a69d9 to 1dcbb78 Compare January 29, 2026 16:31
@github-actions
Copy link
Contributor

🚀 Smoke tests triggered! Running on Linux and Windows...

@github-actions
Copy link
Contributor

All smoke tests passed!

✅ Linux: success
✅ Windows: success

View run details

Comment on lines 66 to 78
if fsutil.DirExists(filepath.Join(dir, DataRobotTemplateDetectAnswersPath)) {
return true
}

entries, err := os.ReadDir(filepath.Join(dir, DataRobotTemplateDetectCliPath))
if err != nil {
return false
}

// Older versions were incorrectly creating state.yaml file outside of template directories
// return true if any file other than state.yaml exists in .datarobot/cli
return slices.ContainsFunc(entries, func(entry os.DirEntry) bool {
return entry.Name() != "state.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add debug logging here? It will be important for us to keep track of these things.

DataRobotTemplateDetectPath = ".datarobot/answers"
// DataRobotTemplateDetectAnswersPath is the path to the answers folder relative to CWD
DataRobotTemplateDetectAnswersPath = ".datarobot/answers"
DataRobotTemplateDetectCliPath = ".datarobot/cli"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DataRobotTemplateDetectCliPath = ".datarobot/cli"
// path to the CLI folder relative to CWD; some older templates use this rather than answers
DataRobotTemplateDetectCliPath = ".datarobot/cli"

Copy link
Contributor

@ajalon1 ajalon1 left a comment

Choose a reason for hiding this comment

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

I understand where this is coming from but we need to make sure @shreyaag-dr is onboard with this for older template versions, so that she can update the PRD around template root detection.

@yuriyhrytsyuk yuriyhrytsyuk force-pushed the yhr/CFX-4801-template-detection-both branch 2 times, most recently from 978e1bf to ae68b6a Compare January 29, 2026 18:22
@yuriyhrytsyuk yuriyhrytsyuk force-pushed the yhr/CFX-4801-template-detection-both branch from ae68b6a to 27d5128 Compare January 29, 2026 18:23
@yuriyhrytsyuk yuriyhrytsyuk merged commit d81fcde into main Jan 29, 2026
12 checks passed
@yuriyhrytsyuk yuriyhrytsyuk deleted the yhr/CFX-4801-template-detection-both branch January 29, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Ready for Review go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants