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: add symlink support, exception handling, version bump, and httpd image update #46

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

arkaprovob
Copy link
Contributor

Description:
This pull request introduces changes related to Symlink support

Commit 1 - Feature: Add support for symlinks at the SPAship operator level

  • Added a new API for handling symlinks and related data classes.
  • Enhanced support for command execution in pods.

Commit 2 - Chore: Handle symlink feature exception, bump version, and update httpd image

  • Handled exceptions related to symlink features to ensure proper error reporting and system stability during symlink processing.
  • Bumped up the application version following standard semantic versioning due to various changes and improvements.
  • Updated the HTTPD container image version for enhanced security and performance.

arkaprovob and others added 3 commits October 10, 2023 15:06
Changes made in this commit include:
- new api for symlink and related dataclasses
- support for command execution in pod
…pd image

- Handled the exception related to the symlink feature, for proper error reporting and system stability during symlink processing.
- Bumped up the application version following standard semantic versioning due to changes and improvements.
- Updated the httpd container image version for enhanced security and performance.
Update Handling of Symlink Feature Exception and Version Bump
Tuple2<String, String> sourceTargetTuple = Tuple2.of(form.metadata().get("source"),
form.metadata().get("target"));
boolean isCreated = exec.createSymlink(form.environment(), sourceTargetTuple);
return "{\"created\":"+isCreated+"}";
Copy link
Contributor

Choose a reason for hiding this comment

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

Enhancement: This is a very generic response, Specific Response to be created for the symlink operations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, we should make this change in the next iteration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#47

public class CommandExecutionService {


// todo :scope of improvement: read these two vars from the config map
Copy link
Contributor

Choose a reason for hiding this comment

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

Linked issue is #38

});
}

// todo :must do: 1. check both source and destination exists 2. Validate and sanitize the
Copy link
Contributor

Choose a reason for hiding this comment

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

Linked issue #38

Comment on lines +95 to +96
.inContainer(CONTAINER_NAME).readingInput(System.in). //TODO replace the deprecated method
// with the new method
Copy link
Contributor

Choose a reason for hiding this comment

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

To be formatted #38

Copy link
Contributor

@soumyadip007 soumyadip007 left a comment

Choose a reason for hiding this comment

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

@arkaprovob it looks good to me. I've added couple of enhancements, we can discuss on these separately

}).exec(command)) {
latch.await();
} catch (Exception e) {
throw new CommandExecutionException("Error while executing command in container", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Enhancement: In case of exception a proper message should be communicated to the user (via API response/SSE events). To be discussed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#48

@soumyadip007 soumyadip007 changed the title Add Symlink Support, Exception Handling, Version Bump, and HTTPD Image Update feat: Add Symlink Support, Exception Handling, Version Bump, and HTTPD Image Update Oct 17, 2023
@soumyadip007 soumyadip007 changed the title feat: Add Symlink Support, Exception Handling, Version Bump, and HTTPD Image Update feat: add symlink support, exception handling, version bump, and httpd image update #46 Oct 17, 2023
@soumyadip007
Copy link
Contributor

soumyadip007 commented Oct 17, 2023

@arkaprovob please do the squash and merge while performing the merge

@arkaprovob arkaprovob changed the title feat: add symlink support, exception handling, version bump, and httpd image update #46 feat: add symlink support, exception handling, version bump, and httpd image update Oct 17, 2023
@arkaprovob arkaprovob merged commit 4901a88 into spaship:main Oct 17, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants