Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

initial support for .tag files for native isolation - #334

Merged
pnickolov merged 2 commits into
mainfrom
pn/isolation-tag-file
Apr 2, 2024
Merged

pnickolov merged 2 commits into
mainfrom
pn/isolation-tag-file

Conversation

@pnickolov

@pnickolov pnickolov commented Mar 30, 2024 •

Copy link
Copy Markdown
Contributor

Description

Added support for default solution tag for push, validate and a few others to be taken from a .tag file in the solution directory, similar to .env files. This default tag eliminates the need to always specify the --tag value when pushing developer-specific solution versions, reducing effort and likelihood of mistakes. In addition, the use of FSOC_SOLUTION_TAG environment variable is now extended to solutions with native isolation.

The tag priority, from highest to lowest:

  1. Explicit flag --tag=value (or --stable, which means --tag=stable)
  2. Environment variable FSOC_SOLUTION_TAG set to a non-empty tag value
  3. Tag found in a .tag file in the same directory as the solution manifest

Note that this default tag applies only to commands that (a) need a tag value and (b) rely on the presence of a solution in the directory (i.e., manifest and objects). This specifically excludes commands, such as subscribe, which also take tags but don't need local solution files, as well as commands like solution extend, which require local files but not tags.

Note that the .tag file is a developer convenience (just like the environment variable) and, as such, will not be included in solution's bundle. Additionally, as the workflow intent is for .tag files to be local/per developer, fsoc will warn if the .tag file in the solution is not excluded in .gitignore (in cases the solution is in a git repo), to reduce the chance of inadvertently checking the .tag file into the solution repo.

The support for .tag file is also propagated to pseudo-isolated solutions, in order to allow moving away from env.json-type files and aligning with native isolation. For pseudo-isolation, which is now deprecated and new solutions should not use, the priorities include:
...
1.5. Explicit flag --env-file
...
4. Presence of env.json in the solution root directory.

Note that support for env files remains available only for pseudo-isolation and is expected to be removed with it. This streamlines the tag support and also avoids conflict and confusion with env/ directory files used in native isolation.

This is a non-breaking change.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@pnickolov
pnickolov merged commit fbd4c2e into main Apr 2, 2024
@pnickolov
pnickolov deleted the pn/isolation-tag-file branch April 2, 2024 15:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址