Skip to content

fix(service): allow fastly service version validate to use FASTLY_SERVICE_ID env fallback - #1907

Open
Tyagiquamar wants to merge 3 commits into
fastly:mainfrom
Tyagiquamar:fix-service-version-validate-service-id-fallback-1866
Open

Tyagiquamar wants to merge 3 commits into
fastly:mainfrom
Tyagiquamar:fix-service-version-validate-service-id-fallback-1866

Conversation

@Tyagiquamar

@Tyagiquamar Tyagiquamar commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Change summary

Fixes #1866

Allow \ astly service version validate\ to fall back to the \FASTLY_SERVICE_ID\ environment variable when the --service-id\ flag is omitted or when running in non-interactive/automation environments.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

User Impact

Users executing \ astly service version validate\ can rely on \FASTLY_SERVICE_ID\ without needing to pass --service-id\ explicitly on each execution.

Are there any considerations that need to be addressed for release?

None.

…VICE_ID env fallback (fastly#1866)

Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
…VICE_ID env fallback (fastly#1866)

Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
@Tyagiquamar
Tyagiquamar requested a review from a team as a code owner September 13, 2026 17:43
@jedisct1

Copy link
Copy Markdown
Contributor

Thanks for your contribution.

Cab you add a ### Bug Fixes entry under [Unreleased], for example:

- fix(service): allow `service version validate` to use `FASTLY_SERVICE_ID`.

?

Also, maybe renamed “missing service ID” test should explicitly set:

EnvVars: map[string]string{"FASTLY_SERVICE_ID": ""},

Thank you!

@jedisct1 jedisct1 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.

Thanks!

@Tyagiquamar

Copy link
Copy Markdown
Contributor Author

Thanks! I’ll make the requested changes and push an update shortly.

Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
@rcaril

rcaril commented Sep 14, 2026

Copy link
Copy Markdown
Member

Hi @Tyagiquamar - thanks for your contribution! Please use our PR template for the initial description.

### Change summary

 <!--
Briefly describe the changes introduced in this pull request. Include context or
reasoning behind the changes, even if they seem minor. If relevant, link to any
related discussions (e.g. Slack threads, tickets, documents).
-->

All Submissions:

* [ ] Have you followed the guidelines in our Contributing document?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/fastly/cli/pulls) for the same update/change?

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### New Feature Submissions:

* [ ] Does your submission pass tests?

### Changes to Core Features:

* [ ] Have you written new tests for your core changes, as applicable?
* [ ] Have you successfully run tests with your changes locally?

### User Impact

<!-- What is the user impact of this change? -->

### Are there any considerations that need to be addressed for release?

<!-- Any breaking changes, etc -->

@Tyagiquamar

Copy link
Copy Markdown
Contributor Author

Updated the PR description to match the template. Both the changelog entry and the explicit empty env test have also been added.

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.

fastly service version validate requires --service-id flag with no env var fallback

3 participants