Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ephemeral component versions #642

Merged
merged 17 commits into from Aug 4, 2022
Merged

Ephemeral component versions #642

merged 17 commits into from Aug 4, 2022

Conversation

ryan-cahill
Copy link
Member

@ryan-cahill ryan-cahill commented Jul 27, 2022

Adds support for ephemeral components by allowing a user to register a component version with an environment

@ryan-cahill ryan-cahill changed the title [WIP] Ephemeral component versions Ephemeral component versions Jul 28, 2022
register.app = this.app;
await register.run();
const component_spec = buildSpecFromPath(component);
component_names.push(`${account.name}/${component_spec.name}:${ComponentRegister.getTagFromFlags({ environment: environment.name })}`);
Copy link
Member

Choose a reason for hiding this comment

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

Remove the account name prefix. Since sometimes the account name is part of the name for older customers.

component_names.push(`${component_spec.name}:${ComponentRegister.getTagFromFlags({ environment: environment.name })}`);

@@ -56,6 +60,14 @@ export default class ComponentRegister extends BaseCommand {
description: 'Directory to write build cache to. Do not use in Github Actions: https://docs.architect.io/deployments/automated-previews/#caching-between-workflow-runs',
}),
},
environment: {
Copy link
Member

Choose a reason for hiding this comment

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

should we make this hidden: true?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had considered that, but I don't see why someone shouldn't be able to create an ephemeral component version directly rather than indirectly thorough the deploy command

Copy link
Member

Choose a reason for hiding this comment

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

What would be the reason for them to do that? My inclination is to make it hidden with the option to unhide in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe they just don't want to deploy the component immediately after it's registered? I'll hide it though

@@ -20,6 +21,8 @@ import { IF_EXPRESSION_REGEX } from '../dependency-manager/spec/utils/interpolat

tmp.setGracefulCleanup();

export const EPHEMERAL_DELIMITER = 'architect-ephemeral';
Copy link
Member

Choose a reason for hiding this comment

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

Should we make it targeted to the environment? Not really a delimiter - more a prefix.

export const ENV_TAG_PREFIX = 'architect.environment.'

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I like that

@tjhiggins tjhiggins merged commit 6d90449 into rc Aug 4, 2022
@tjhiggins tjhiggins deleted the ephemeral-component-versions branch August 4, 2022 14:42
github-actions bot pushed a commit that referenced this pull request Aug 4, 2022
# [1.22.0-rc.7](v1.22.0-rc.6...v1.22.0-rc.7) (2022-08-04)

### Features

* **deploy:** Ephemeral component versions ([#642](#642)) ([6d90449](6d90449))
github-actions bot pushed a commit that referenced this pull request Aug 4, 2022
# [1.22.0](v1.21.1...v1.22.0) (2022-08-04)

### Bug Fixes

* **dev:** Add ARC_DEV env for detecting if we are running locally ([85bc88c](85bc88c))
* **docs:** fix links to docs by making them absolute ([74ba274](74ba274))
* **exec:** Pass the proper auth header when using exec via token_type ([#646](#646)) ([54861dc](54861dc))
* **init:** debug block instead of interpolation ([#647](#647)) ([22e811c](22e811c))
* **sentry:** Sentry Refactor and Bug Fix ([#648](#648)) ([598034b](598034b))

### Features

* **deploy:** Ephemeral component versions ([#642](#642)) ([6d90449](6d90449))
* **spec:** support circular dependencies ([#641](#641)) ([86835ca](86835ca))
@github-actions
Copy link

github-actions bot commented Aug 4, 2022

🎉 This PR is included in version 1.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

TylerAldrich pushed a commit that referenced this pull request Aug 4, 2022
# [1.22.0](v1.21.1...v1.22.0) (2022-08-04)

### Bug Fixes

* **dev:** Add ARC_DEV env for detecting if we are running locally ([85bc88c](85bc88c))
* **docs:** fix links to docs by making them absolute ([74ba274](74ba274))
* **exec:** Pass the proper auth header when using exec via token_type ([#646](#646)) ([54861dc](54861dc))
* **init:** debug block instead of interpolation ([#647](#647)) ([22e811c](22e811c))
* **sentry:** Sentry Refactor and Bug Fix ([#648](#648)) ([598034b](598034b))

### Features

* **deploy:** Ephemeral component versions ([#642](#642)) ([6d90449](6d90449))
* **spec:** support circular dependencies ([#641](#641)) ([86835ca](86835ca))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants