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

feat: wait for run in resource spacelift_run #535

Merged
merged 14 commits into from
Apr 18, 2024
Merged

Conversation

truszkowski
Copy link
Contributor

Description of the change

From PR

This PR contains an extension of the resource spacelift_run, which makes it possible to wait for the completion of a run.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (non-breaking change that adds documentation)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development
  • Examples for new resources and data sources have been added
  • Default values have been documented in the description (e.g., "Dummy: (Boolean) Blah blah. Defaults to false.)
  • If the action fails that checks the documentation: Run go generate to make sure the docs are up to date

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • Pull Request is no longer marked as "draft"
  • Reviewers have been assigned
  • Changes have been reviewed by at least one other engineer

@truszkowski truszkowski changed the title Feat/wait for run feat: wait for run in resource spacelift_run Apr 11, 2024
@truszkowski
Copy link
Contributor Author

Now tests are failing because of Cannot query field "run" on type "Stack".
We're adding a new query, runResourceState, which will be outside the user scope and available for a Spacelift run.
After backend merge, I'll change query here.

@truszkowski
Copy link
Contributor Author

Now tests are failing because of Cannot query field "run" on type "Stack". We're adding a new query, runResourceState, which will be outside the user scope and available for a Spacelift run. After backend merge, I'll change query here.

Now we have a new query: runResourceState. Added more tests to cover other scenarios - "timed out", "unconfirmed state" and "finished state".

spacelift/resource_run.go Outdated Show resolved Hide resolved
spacelift/resource_run.go Outdated Show resolved Hide resolved
@marcinwyszynski marcinwyszynski removed their request for review April 16, 2024 09:00
adamconnelly
adamconnelly previously approved these changes Apr 16, 2024
@truszkowski truszkowski requested review from peterdeme and a team April 17, 2024 10:10
@truszkowski truszkowski merged commit e3a9079 into main Apr 18, 2024
7 checks passed
@truszkowski truszkowski deleted the feat/wait-for-run branch April 18, 2024 08:14
@truszkowski
Copy link
Contributor Author

@tmeckel
Version v1.11.0 has been released! Thanks for your contribution! ❤️

code:
Screenshot 2024-04-18 at 13 14 04

run:
Screenshot 2024-04-18 at 13 14 37

@tmeckel
Copy link
Contributor

tmeckel commented Apr 18, 2024

@truszkowski Awesome! 🎉 🥳

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.

4 participants