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

Add default envs in ScriptRunStage: SR_TRIGGERED_COMMANDER, SR_IS_ROLLBACK #5464

Merged
merged 8 commits into from
Jan 6, 2025

Conversation

t-kikuc
Copy link
Member

@t-kikuc t-kikuc commented Dec 27, 2024

What this PR does:

as title

Why we need it:

  • SR_TRIGGERED_COMMANDER: e.g. To judge if the deployment was triggered via UI or not
  • SR_IS_ROLLBACK: e.g. To call the different script when it's rollback

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 26.13%. Comparing base (17a5007) to head (2a2e0c0).
Report is 25 commits behind head on master.

Files with missing lines Patch % Lines
pkg/app/piped/executor/scriptrun/scriptrun.go 50.00% 2 Missing ⚠️
pkg/app/piped/executor/kubernetes/rollback.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5464      +/-   ##
==========================================
+ Coverage   26.10%   26.13%   +0.02%     
==========================================
  Files         451      457       +6     
  Lines       48837    49111     +274     
==========================================
+ Hits        12748    12833      +85     
- Misses      35072    35255     +183     
- Partials     1017     1023       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ffjlabo
ffjlabo previously approved these changes Dec 27, 2024
Copy link
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

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

Thank you!

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
RepositoryURL: d.GitPath.Repo.Remote,
Summary: d.Summary,
Labels: d.Labels,
IsRollback: isRollback,
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 fixed to use isRollback flag instead of d.Status.

That's because d.Status is ALWAYS PLANNED since scheduler does not update it...

@t-kikuc t-kikuc enabled auto-merge (squash) December 27, 2024 15:51
Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

LGTM

@t-kikuc t-kikuc merged commit 602bf8c into master Jan 6, 2025
18 checks passed
@t-kikuc t-kikuc deleted the scriptrun/add-fields branch January 6, 2025 00:29
@github-actions github-actions bot mentioned this pull request Jan 21, 2025
github-actions bot pushed a commit that referenced this pull request Jan 21, 2025
…LBACK (#5464)

* Add TriggeredCommandar

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add isRollback

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix name->id

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix env name

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix: specify isRollback since deployment.Status is always Planned

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix typo

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Add case of `pipectl sync`

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>
Warashi added a commit that referenced this pull request Jan 21, 2025
* [ECS] Support 5 missing fields in TaskDefinition (#5424)

* Add missing fields in RegisterTaskDef

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* remove two restrictions

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* [ECS] Enabled to configure/update `PropagateTags` and `EnableECSManagedTags` (#5425)

* Enable updating PropagateTags and specifying other than SERVICE

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Enable updating EnableECSManagedTags

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Remove default PropagateTags: unnecessary

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* support propagateTags other than SERVICE

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Enhance logging in EventWatcher (#5443)

* Add logger.Error() before returning for detailed logs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Enhance error logging in event watcher with additional context for push and commit failures

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* fixed to certainly store the startTime (#5461)

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Add default envs in ScriptRunStage: SR_TRIGGERED_COMMANDER, SR_IS_ROLLBACK (#5464)

* Add TriggeredCommandar

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add isRollback

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix name->id

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix env name

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix: specify isRollback since deployment.Status is always Planned

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix typo

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Add case of `pipectl sync`

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Release v0.50.1 (#5498)

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Co-authored-by: Tetsuya KIKUCHI <97105818+t-kikuc@users.noreply.github.com>
Co-authored-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants