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

Fake pull request #240

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Fake pull request #240

wants to merge 11 commits into from

Conversation

Stelios123
Copy link
Contributor

@Stelios123 Stelios123 commented Apr 28, 2023

GitHub Metadata
Number Created On Created By Assignees
#5 Jun 08, 2023 08:33:48 UTC gsaslis Archimidis

The concourse implementation:

  • relies on a pre-downloaded fly CLI from the concourse server that the CI broker has been configured with

with that in place, it has 3 (or maybe 2) roles to fill:

Setup: Create and unpause a pipeline in concourse

  • acquires token from concourse with fly login
    • need some kind of mechanism that handles re-authenticating / authentication errors (and re-logins).
  • creates pipeline (more on this later)

Trigger jobs

There are 2 alternative approaches we are considering:

  • let the broker trigger the jobs (using the fly CLI or concourse HTTP API)
  • set up a pipeline in concourse that uses a git resource to watch for events triggering the pipeline. This has the added benefit that we don't need to do the triggering, but we would still need to find out about these events somehow, so we can watch for them later on and update the job status.

Triggering should only trigger the job in concourse without watching for the output. We need to capture the build ID from the output and then add this build ID to a data structure of "patches with pending builds".

Watch for results and update Patch with outcome

In terms of watching for the results, we should create some worker thread pool that:

  • looks at pending builds
  • for each build, uses some polling policy on the job status endpoint to verify whether the build has finished (whether failed or succeeded)
  • once the job has finished, it is time to update the patch with a comment.

In terms of "updating the Patch", we will be adding a simple comment to the Patch for now.

NOTES:

  • it might make sense to use the API that the fly CLI and web app uses as opposed to wrapping the fly CLI itself.
  • try to maintain flat hierarchy of projects (under which pipelines get created) in concourse to match flat hierarchy in radicle
  • we don't want to persist job logs in radicle (can get very messy - very fast)
  • we discussed at length about what would be the best way to expose a ci_server-agnostic HTTP API endpoint that can be used by clients (web, etc.) to show job status, etc. Most preferred approach for the time being is to have the radicle-ci-broker write to an sqlite database the information about pending jobs and for radicle-httpd to read from that (with an added benefit that the rad cli could then read that information and incorporate that into the Terminal User Interface (TUI).

Signed-off-by: Stelios Mavrommatakis <steliosmavr@cytech.gr>
Signed-off-by: Stelios Mavrommatakis <steliosmavr@cytech.gr>
Signed-off-by: Stelios Mavrommatakis <steliosmavr@cytech.gr>
@@ -14,7 +14,7 @@ public RadRemote(GitRepository repo) {

@Override
public String getActionName() {
return "Remote";
return "Remotee";

Choose a reason for hiding this comment

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

do this "Remote"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

jj

@@ -130,14 +130,14 @@ private boolean isRadHomeValidPath(String radPath, String radHome) {
private void unlockOrCreateIdentity() {
msgLabel.setText("");
ApplicationManager.getApplication().executeOnPooledThread(() -> {
var radHome = getPathFromTextField(radHomeField);
var radHome = getPathFromTextField(radHomeField);

Choose a reason for hiding this comment

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

delete spaces

var radPath = getPathFromTextField(radPathField);
var radSelf = new RadSelf(radHome, radPath, myProject);
var radSelf = new RadSelf(radHome, radPath, myProject);

Choose a reason for hiding this comment

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

delete spaces

@JChrist JChrist marked this pull request as draft May 2, 2023 05:25
@manolisziCy
Copy link

Hey

hey

@Stelios123 Stelios123 requested review from giorgosap and removed request for giorgosap July 6, 2023 09:50
@Stelios123 Stelios123 assigned giorgosap and unassigned giorgosap Jul 7, 2023
@Stelios123 Stelios123 changed the title Fake pull request Start broker as a new process that listens to node events Sep 12, 2023
@Stelios123 Stelios123 changed the title Start broker as a new process that listens to node events Fake pull request Sep 12, 2023
@Stelios123
Copy link
Contributor Author

chrome_klSdi30WtV.mp4

@Stelios123
Copy link
Contributor Author

test.txt

@@ -31,7 +31,9 @@ public String getActionName() {
return "AuthCreateIdentity";
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
return "AuthUnlockedIdentity";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ha

}
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
return "AuthUnlockedIdentity";
}
return "";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test

}
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
return "AuthUnlockedIdentity";
}
return "";
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gg

@@ -31,7 +31,9 @@ public String getActionName() {
return "AuthCreateIdentity";
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
return "AuthUnlockedIdentity";
}
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test

Signed-off-by: Stelios Mavrommatakis <steliosmavr@cytech.gr>
@Override
public String getActionName() {
return "";
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

change this

public String getActionName() {
return "";
}

public List<Peer> findTrackedPeers() {
var out = this.perform();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

change

Signed-off-by: Stelios Mavrommatakis <steliosmavr@cytech.gr>
@Override
public String getActionName() {
return "Remote";
}

@Override
public ProcessOutput run() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test

Signed-off-by: Stelios Mavrommatakis <steliosmavr@cytech.gr>
@@ -31,7 +31,9 @@ public String getActionName() {
return "AuthCreateIdentity";
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
return "AuthUnlockedIdentity";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Installation

@@ -31,7 +31,9 @@ public String getActionName() {
return "AuthCreateIdentity";
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
return "AuthUnlockedIdentity";
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test

Copy link
Contributor Author

@Stelios123 Stelios123 left a comment

Choose a reason for hiding this comment

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

test

@Stelios123
Copy link
Contributor Author

my comment

@KostasC22
Copy link

Dokimastiko comment

@Stelios123
Copy link
Contributor Author

Stelios123 commented Apr 9, 2024

Dokimastiko commentt

hello

Signed-off-by: stelios maurommatakis <steliosmavr@cytech.gr>
@@ -0,0 +1 @@
test file
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test comment

Signed-off-by: stelios maurommatakis <steliosmavr@cytech.gr>
Signed-off-by: stelios maurommatakis <steliosmavr@cytech.gr>
Signed-off-by: stelios maurommatakis <steliosmavr@cytech.gr>
Signed-off-by: stelios maurommatakis <steliosmavr@cytech.gr>
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.

6 participants