Runner: Unwanted warning for undefined input variable in action.yml

Created on 4 Jun 2020  路  6Comments  路  Source: actions/runner

Customer developed an action with dynamic inputs, when specify inputs which not mentioned in action.yml, warning will show on logs:

##[warning]Unexpected input 'service', valid inputs are ['file']

Is there a way to avoid this warning? The issue is also happened in octokit/request-action .

There is the ticket in community forum.

question

Most helpful comment

@TingluoHuang I have two actions in particular that depend on undefined inputs:

  1. https://github.com/octokit/request-action/
  2. https://github.com/octokit/graphql-action/

There is no way I can define all possible inputs. Several users complained about the warnings.

Could you please add an option that allows me to explicitly allow undefined inputs?

All 6 comments

My PR #506 will at least reduce the number of warnings from 1 per input, per action to 1 per action. My workflow summaries are now just noise and worthless because I have dozens of the same Unexpected input... warnings for dynamic inputs that are expected.

@nick-invision thanks for your feedback and contribution, I have merged your PR and will include in the next runner release.

We add the warning to help the customer better debug their workflow runs like you have a typo when providing inputs in the workflow YAML file.

@TingluoHuang I have two actions in particular that depend on undefined inputs:

  1. https://github.com/octokit/request-action/
  2. https://github.com/octokit/graphql-action/

There is no way I can define all possible inputs. Several users complained about the warnings.

Could you please add an option that allows me to explicitly allow undefined inputs?

It confuses my developers

It would be great if there was a way to suppress this warning. This was the original behaviour when I created my action, but changed after https://github.com/actions/runner/pull/429 was merged.

I now have an open issue https://github.com/allenevans/set-env/issues/7 that I cannot resolve since the input parameters cannot be known ahead of time in action.yml

Was this page helpful?
0 / 5 - 0 ratings