Skip to content

feat: add allow version not found parameter#18

Open
demeyerthom wants to merge 1 commit intov2from
feat/allow-component-not-found
Open

feat: add allow version not found parameter#18
demeyerthom wants to merge 1 commit intov2from
feat/allow-component-not-found

Conversation

@demeyerthom
Copy link
Copy Markdown
Contributor

This pull request introduces code improvements and new functionality to enhance maintainability and flexibility. The most important changes include enforcing consistent formatting, adding a new input parameter allowComponentNotFound, and updating the MCC client to handle missing components gracefully.

Code Formatting and Consistency:

  • Added semicolons to ensure consistent formatting across the src/check.ts file. [1] [2] [3] [4]
  • Reformatted multi-line expressions for better readability, such as the dependencies mapping in getTurboChangedPackages.
  • Updated environment variable values in getTurboPlan to use double quotes for consistency.

New Input Parameter:

  • Added a new allowComponentNotFound boolean input to the Inputs type and updated the readInputs function to read this value from the workflow inputs. [1] [2]
  • Passed the allowComponentNotFound parameter to the getLatestVersion method in src/main.ts.

MCC Client Enhancements:

  • Updated the getLatestVersion method in the MCC client to accept the allowComponentNotFound parameter.
  • Added logic to handle 404 errors gracefully when allowComponentNotFound is true, logging a warning instead of throwing an error.

@demeyerthom demeyerthom force-pushed the feat/allow-component-not-found branch 5 times, most recently from d42f221 to 2128971 Compare June 20, 2025 13:19
allow_component_not_found:
description: "Allow component not found in MCC. This will cause the component to always be marked as changed."
required: false
default: "false"
Copy link
Copy Markdown

@tleguijt tleguijt Jul 2, 2025

Choose a reason for hiding this comment

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

shouldn't the default just be true?
It won't break any of the existing functionality I suppose

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It might cause some unexpected side effect. Without it will just pipe down the error to a later stage when building and registering the component happens. This would probably break in a run on main instead. That is obviously fixable by adding the --create-component flag in mach, but I don't know if we want that to happen as a default now?

@demeyerthom demeyerthom force-pushed the feat/allow-component-not-found branch from 2128971 to 9d5b522 Compare July 2, 2025 11:47
@demeyerthom demeyerthom changed the base branch from main to v2 July 2, 2025 11:51
@demeyerthom demeyerthom changed the title feat: add allow component not found parameter feat: add allow version not found parameter Jul 2, 2025
@demeyerthom demeyerthom marked this pull request as ready for review July 2, 2025 12:01
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