[WIP] Fix failing GitHub Actions job Integration: Workflow Misc Part 2 - #58044
Merged
Conversation
…h test assertion Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Imported sample precedence and intentional-failure documentation remain incorrect.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes integration failures involving imported workflow validation and malformed engine-auth errors.
Changes:
- Allows selected feature flags in shared workflows.
- Adds imported-feature validation tests.
- Updates the expected engine-auth schema error.
File summaries
| File | Review |
|---|---|
pkg/workflow/imported_engine_auth_integration_test.go |
Updates the expected schema error. |
pkg/workflow/features_import_test.go |
Tests allowed and unsupported imported features. |
pkg/parser/schema_validation.go |
Must fix sample-precedence behavior; validation errors should use NewValidationError with actionable examples. |
pkg/constants/constants.go |
Must not claim imported intentional-failure support until classification resolves imports. |
Review details
Suppressed comments (2)
pkg/parser/schema_validation.go:115
intentional-failureis not currently import-safe. Its consumers (IsIntentionalFailure, used by health and logs reporting) read only the main Markdown file's frontmatter and never resolve imports, so declaring this flag solely in a shared file still counts failures normally. Either keep this key forbidden or update classification to resolve merged imports and cover that behavior with a test.
"intentional-failure": {},
pkg/parser/schema_validation.go:128
- The unsupported-key branch lists valid names but omits a concrete correction example and bypasses the structured validation-error format used for parser validation. Returning
NewValidationErrorkeeps this actionable while preserving the substring asserted by the test.
for key := range featuresMap {
if _, ok := sharedWorkflowAllowedFeaturesFields[key]; !ok {
return fmt.Errorf("field 'features' in shared workflows can only include import-safe fields samples and intentional-failure; found unsupported key: %s", key)
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Balanced
Comment on lines
+490
to
+492
| // The features field is partially import-safe: shared workflows may contribute | ||
| // the import-safe features.samples and features.intentional-failure flags, but | ||
| // other feature keys are rejected. |
| // import from shared workflows. Other feature keys are configuration/experimental | ||
| // settings intended only for main workflows and are rejected. | ||
| var sharedWorkflowAllowedFeaturesFields = map[string]struct{}{ | ||
| "samples": {}, |
Comment on lines
+120
to
+133
| func validateSharedWorkflowFeaturesField(featuresValue any) error { | ||
| featuresMap, ok := featuresValue.(map[string]any) | ||
| if !ok { | ||
| return errors.New("field 'features' cannot be used in shared workflows (only features.samples and features.intentional-failure are import-safe)") | ||
| } | ||
|
|
||
| for key := range featuresMap { | ||
| if _, ok := sharedWorkflowAllowedFeaturesFields[key]; !ok { | ||
| return fmt.Errorf("field 'features' in shared workflows can only include import-safe fields samples and intentional-failure; found unsupported key: %s", key) | ||
| } | ||
| } | ||
|
|
||
| return nil | ||
| } |
This was referenced Sep 3, 2026
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.