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

Added worker ID field to build #156

Merged
merged 9 commits into from
Mar 3, 2022
Merged

Added worker ID field to build #156

merged 9 commits into from
Mar 3, 2022

Conversation

applejag
Copy link
Contributor

@applejag applejag commented Feb 28, 2022

Summary

  • Added worker ID to build
  • Added config.CI.Engine.API enum to declare what kind of engine API it is.
  • Parse worker ID from build trigger response if engine is wharf-cmd.v1

Motivation

Adds worker ID support.

wharf-cmd-watchdog needs this value, and we need this value later in #154 when cancelling builds.

Based on RFC-0025: wharf-cmd provisioning

@applejag applejag added the enhancement New feature or request label Feb 28, 2022
@applejag applejag self-assigned this Feb 28, 2022
@applejag
Copy link
Contributor Author

Wow the CodeQL scan noticed through 20 different nested function calls that we used c.GetQuery("stage") all the way down to when we construct the trigger URL where we do fmt.Sprintf("%s&%s=%s", ...)

https://github.com/iver-wharf/wharf-api/pull/156/checks?check_run_id=5361232036

However it failed to notice that we did pass the value through url.QueryEscape, so I marked it as "false positive"

Copy link
Member

@Alexamakans Alexamakans left a comment

Choose a reason for hiding this comment

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

Good stuff 👍🏻

build.go Outdated Show resolved Hide resolved
@applejag applejag merged commit 7353fa2 into master Mar 3, 2022
@applejag applejag deleted the feature/worker-id branch March 3, 2022 15:11
@applejag applejag mentioned this pull request May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants