Code Monkey home page Code Monkey logo

pmo's People

Contributors

h1alexbel avatar hizmailovich avatar rultor avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pmo's Issues

Private project management

I suggest this model of managing private repositories in a PMO:

  • 1 free private project to try the platform
  • $10 for each private project, the user paying once

All public projects will be free forever with support of all features.

@hizmailovich WDYT?

JIRA Identity Provider

We should think about JIRA Identity Provider, so we can retrieve information from JIRA and operate there. API should be similar to existing GitHub Identity Provider

.rultor.yml:15-18: Create deploy script for rultor...

The puzzle 2-e54979ee from #2 has to be resolved:

pmo/.rultor.yml

Lines 15 to 18 in 9b49b8b

# @todo #2:90min Create deploy script for rultor configuration.
# We should create deploy script that will deliver our Java software
# into some target platform. For now, we assuming that it will be
# Cloud VM with public IP, and SSH connection.

The puzzle was created by @hizmailovich on 15-Jan-24.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

remove failsafe plugin from default maven profile

we are using

$ mvn clean install -DskipITs

to run default build cycle without integration tests, lets simplify it by removing failsafe-maven-plugin from the default maven profile, and including it only on a special profile, called simulation or something similar.

so it should look

$ mvn clean install

and for integration tests

$ mvn clean install -Psimulation

Change performer `email` to `login`

--changeset hizmailovich:4
CREATE TABLE IF NOT EXISTS projects.performers
(
id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
email CHARACTER VARYING(64) NOT NULL,
project uuid NOT NULL REFERENCES projects.projects,
permission CHARACTER VARYING(16) NOT NULL
);

Lets change email to login, since we are not operating the emails for now, only with logins on GitHub, GitLab, and other platforms.

Emails can be added lately

ProjectController.java:81-85: check if authenticated user...

The puzzle 1-ed8090c3 from tracehubpm/pmo-java-sdk#1 has to be resolved:

* @todo #1:45min/DEV check if authenticated user can access the Project.
* we need create security checks that will made a statement
* does authenticated user can access the project or not:
* if project is public, every one can see it;
* otherwise user must be individual performer or team member.

The puzzle was created by @rultor on 23-Jan-24.

Estimate: 45 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

DefaultSecrets.java:34-36: encrypt the secret value...

The puzzle 44-48bf6f8b from #44 has to be resolved:

* @todo #44:30min encrypt the secret value before saving it in the database.
* @checkstyle DesignForExtensionCheck (70 lines)
* @since 0.0.0

The puzzle was created by @hizmailovich on 20-Feb-24.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

ProjectController.java:101-105: check if authenticated...

The puzzle 1-bb3b3f26 from tracehubpm/pmo-java-sdk#1 has to be resolved:

* @todo #1:45min/DEV check if authenticated user can create a new
* project. We need to create security checks that will make a statement
* does authenticated user can create a new project or not:
* if project is public, every one can create it;
* otherwise we need to request a payment from the user.

The puzzle was created by @rultor on 23-Jan-24.

Estimate: 45 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Customize Keycloak UI

we should customize our Keycloak application, so it should use our custom color palette and icons

Define a Liquibase schema for a database

Lets define a proper database schema and create a Liquibase migrations.

We need a project that has:

  • id PRIMARY KEY, UUID
  • name VARCHAR (32) NOT NULL
  • description VARCHAR (512)
  • active is it active or not (Boolean type)
  • performers: probably we will need a new table called performer with all of the performer data and project FK

Besides things above, we need to store this data too:

  • secrets which is a simple key-value pairs a.k.a secret variables, described here
  • dependencies, I think it can just an array of strings in project table
  • tickets the same as performers, should be a separate table with project FK, these puzzles will help you understand what kind of fields we need to store:

Can be replaced with ResponseStatusException

More convenient way is RSE. It would be automatically handled by Spring

public class ResourceAlreadyExistsException extends RuntimeException {

public class ResourceNotFoundException extends RuntimeException {

Can be replaced with

public class SomeExcpetion extends ResponseStatusException { 

Response:

HTTP/1.1 404
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Sat, 26 Dec 2020 19:38:09 GMT

{
    "timestamp": "2020-12-26T19:38:09.426+00:00",
    "status": 404,
    "error": "Not Found",
    "path": "/some/path"
}

Endpoints for ticket information

We should implement a few endpoints for getting ticket information, in the database we need to store issue number, repo and full file path to the related job, and status; for instance:

issue number: #34
repo: tracehubpm/pmo
job: .trace/jobs/fix-blah-blah-blah.yml
status: status of the ticket, opened or closed.

Probably, we need 2 read-endpoints that will return us issue number by full path + repo and full path by issue number + repo.

And we need 1 write-endpoint for submitting ticket.

blocks: tracehubpm/tracehub#31, tracehubpm/tracehub#32, tracehubpm/tracehub#33

We should conduct those tickets to implement it right

IdpToken.java:58-62: fix 403 Forbidden error when trying...

The puzzle 1-ecd686dc from tracehubpm/pmo-java-sdk#1 has to be resolved:

* @todo #1:45min/DEV fix 403 Forbidden error when trying to get
* token from IDP. It seems that the user hasn't enough permissions
* to get the token from IDP. We need to configure Keycloak to allow
* the user to read the token. See the following link for more info:
* https://www.keycloak.org/docs/latest/server_admin/#retrieving-external-idp-tokens

The puzzle was created by @rultor on 23-Jan-24.

Estimate: 45 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

API for storing secrets

As I described here, we need to store secrets inside our database, to give a possibility to a user to reference the values from it:

# we are in project.yml
...
backlog:
 type: JIRA
 jira-url: ${jira-url}
...

we should create and maintain API in PMO for storing secrets, data schema probably should be something like this:

  • key: the key of the secret
  • value: the value of the secret

API should be simply stupid:

  • save the secret with key, value
  • get the value by the key

Custom exceptions instead of exception handling

now we doing something like this:

throw new ResourceAlreadyExistsException(...);

and we do support exception handling via Spring Exception Handlers:

@ExceptionHandler(ResponseStatusException.class)
public ResponseEntity<byte[]> handle(
final ResponseStatusException exception
) {
return new Logged(
exception,
new RestError(
exception.getMessage(),
HttpStatus.valueOf(exception.getStatusCode().value())
)
).value();
}

We actually can get rid of this by making all our custom exceptions extend HttpStatusException. After this all of them will be handled by Spring

@hizmailovich wdyt?

Maven build commands are outdated in #How To Contribute section

section tells us:

pmo/README.md

Lines 51 to 68 in 3f63f38

### How to contribute?
Fork repository, make changes, send us a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).
We will review your changes and apply them to the `master` branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:
```bash
$ mvn clean install -DskipITs
```
You will need Maven 3.8.7+ and Java 17+.
If you want to run an integration tests to check whole system, run:
```bash
$ mvn clean install -DGithubToken=...
```

but we have added new maven profile called simulation that runs integration tests:

pmo/pom.xml

Lines 311 to 337 in 3f63f38

<profiles>
<profile>
<id>simulation</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

needed to be fixed

.rultor.yml:8-11: Create release script to rultor...

The puzzle 2-24aad16a from #2 has to be resolved:

pmo/.rultor.yml

Lines 8 to 11 in 9b49b8b

# @todo #2:60min Create release script to rultor configuration.
# We should create release script that will be executed by Rultor.com.
# Probably it can be a release inside the GitHub with a new tag,
# and build+push Docker image to the private Docker registry.

The puzzle was created by @hizmailovich on 15-Jan-24.

Estimate: 60 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Prepare pmo for deployment

we should prepare pmo project for being deployed to cloud VM with public IPv4, I'm looking forward Yandex cloud, Selectel, and Timeweb.

Besides that, we should have PostgreSQL instance for pmo + keycloak. Timeweb cloud database service looks quite good.

On deploy, rultor should be able to pull the image with version we providing and deploy it with an environment variables bundle to the Cloud VM.

SecretController.java:39-40: create an endpoint to list...

The puzzle 44-ef410327 from #44 has to be resolved:

* @todo #44:30min create an endpoint to list all keys from the project.
* This endpoint should return a list of keys using project id.

The puzzle was created by @hizmailovich on 20-Feb-24.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

ProjectController.java:114-116: define appropriate agent...

The puzzle 1-da767492 from tracehubpm/pmo-java-sdk#1 has to be resolved:

* @todo #1:45min/DEV define appropriate agent according to location
* of the project. We need to define appropriate agent and call
* corresponding implementation to invite collaborators here.

The puzzle was created by @rultor on 23-Jan-24.

Estimate: 45 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Repo does not have README

pmo GitHub repository, does not have a README that explains how to install, run and test the pmo software, we should fix that

application.yaml:25: add support of Github Enterprise domain

The puzzle 49-dbcd9483 from #49 has to be resolved:

# @todo #49:60min add support of Github Enterprise domain

The puzzle was created by @h1alexbel on 23-Feb-24.

Estimate: 60 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

SecretController.java:41-43: create an endpoint to update...

The puzzle 44-57fcb942 from #44 has to be resolved:

* @todo #44:30min create an endpoint to update a secret. This endpoint
* should receive a secret id and a new value to update the secret.
* @since 0.0.0

The puzzle was created by @hizmailovich on 20-Feb-24.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Self hosted PMO

We should provide an alternative way of running PMO application. So, since its an open source product, each user can pull the code and run on its own servers. Lets prepare docs on how to do so. Check this one for a reference:

s3:
  region: us-east-1
  bucket: xml.0pdd.com
  key: AKIAI..........UTSQA
  secret: Z2FbKB..........viCKaYo4H..........vva21
sentry: https://[email protected]/229223
dynamo:
  region: us-east-1
  key: AKIAI..........UTSQA
  secret: Z2FbKB..........viCKaYo4H..........vva21
github:
  client_id: b96a3b5..........87e
  client_secret: be61c471154e2..........66f434d33e0f63a5f
  encryption_secret: some-random-text
  login: 0pdd
  pwd: GitHub-Password
smtp:
  host: email-smtp.us-east-1.amazonaws.com
  port: 587
  key: AKIAI..........UTSQA
  secret: Z2FbKB..........viCKaYo4H..........vva21
id_rsa: |
  -----BEGIN RSA PRIVATE KEY-----
  MIIJKAIBAAKCAgEAoE94Xy8TGMbnoK5cKJXWccr9qLLDc/liKpMAMlnQEFDCgi0l
  ...
  NaaFpowFg8LKSiwc04ERduu72Imv5GJBCkhS8F7laURXFcZiYNqBnWYzY0U=
  -----END RSA PRIVATE KEY-----

taken from https://github.com/yegor256/0pdd/?tab=readme-ov-file#how-to-contribute

Label.java:27-28: try to refactor this code to avoid such...

The puzzle 8-e2415ebf from #8 has to be resolved:

* @todo #8:30min try to refactor this code to avoid such data classes
* @since 0.0.0

The puzzle was created by @rultor on 06-Feb-24.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Sign in with GitHub is broken

I enter to the GitHub sign in in Keycloak PMO:

image
and I got following:

image

What is the problem with that?
Its maybe because backend service is not running and keycloak wants to send something, but I'm not sure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.