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

Closes #894 - Enhance the endpoint to list files with the possibility to specify a version #905

Merged
merged 4 commits into from
Aug 12, 2020

Conversation

fylip97
Copy link
Contributor

@fylip97 fylip97 commented Aug 10, 2020

This change is Reviewable

Copy link
Member

@mariusoe mariusoe left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @fylip97)

a discussion (no related file):
Please add some unit or integration tests where you add some files and then fetch the latest and a specific version to verify your code.



components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/file/FileManager.java, line 86 at r1 (raw file):

    /**
     * Returns the commit with the given id.

Can you format the file. It should add an empty line after this one.


components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 28 at r1 (raw file):

        if(commitId == null){
            return fileManager.getWorkingDirectory().listConfigurationFiles(path);
        }else if(commitId.equals("live")){

Please format the file.


components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 32 at r1 (raw file):

        }
        else{
            return fileManager.getCommitWithId(commitId).listConfigurationFiles(path);

Imo it is easier to read and more maintainable when you store the access object in a local variable and use this for listing the files instead of writing the action multiple times.

RevisionAccess revision;
if ( ... ) {
    revision = ....;
} else {
    revision = ....;
}

revision.listConfiguratuinFiles(path);

@mariusoe mariusoe self-assigned this Aug 10, 2020
Copy link
Member

@mariusoe mariusoe left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @fylip97)

a discussion (no related file):
The DirectoryControllerTest is not working anymore.


Copy link
Contributor Author

@fylip97 fylip97 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @mariusoe)

a discussion (no related file):

Previously, mariusoe (Marius Oehler) wrote…

Please add some unit or integration tests where you add some files and then fetch the latest and a specific version to verify your code.

Done.


a discussion (no related file):

Previously, mariusoe (Marius Oehler) wrote…

The DirectoryControllerTest is not working anymore.

Done.



components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/file/FileManager.java, line 86 at r1 (raw file):

Previously, mariusoe (Marius Oehler) wrote…

Can you format the file. It should add an empty line after this one.

Done.


components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 28 at r1 (raw file):

Previously, mariusoe (Marius Oehler) wrote…

Please format the file.

Done.


components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 32 at r1 (raw file):

Previously, mariusoe (Marius Oehler) wrote…

Imo it is easier to read and more maintainable when you store the access object in a local variable and use this for listing the files instead of writing the action multiple times.

RevisionAccess revision;
if ( ... ) {
    revision = ....;
} else {
    revision = ....;
}

revision.listConfiguratuinFiles(path);

Done.

Copy link
Member

@mariusoe mariusoe left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r2, 4 of 4 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @mariusoe)

Copy link
Member

@mariusoe mariusoe left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@mariusoe mariusoe merged commit ef2d22a into inspectIT:feature/history-view Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants