Skip to content

Conversation

@ursulaflorianczyk
Copy link
Owner

Added support for the new parameter both from app configuration and sealights user-provided service
Searching for jar which name starts with 'sl-test-listener' in zip downloaded from customAgentUrl
Overwrite sl.enableUpgrade to false when agent is downloaded from customAgentUrl
'enable_upgrade' parameter name fix in config yml file ('auto_upgrade' was not used in sealights framework)

@ursulaflorianczyk ursulaflorianczyk force-pushed the supporting-customAgentUrl branch from 49812b4 to 557d2aa Compare January 9, 2024 07:26
build_session_id:
lab_id:
proxy:
auto_upgrade: false

Choose a reason for hiding this comment

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

Wouldn't it break backward compatibility?

Copy link
Owner Author

Choose a reason for hiding this comment

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

We had defined 'auto_upgrade' parameter, but in buildpack code we checked if 'enable_upgrade' is set in app configuration. I removed 'auto_upgrade' parameter and added definition for 'enable_upgrade'.

It can affect present configurations in two ways:

  • if it happened that customer has configured 'enable_upgrade': true in app configuration then this parameter will start working now
  • if customer has configured 'auto_upgrade' in app configuration then he will start to see warning [ConfigurationUtils] WARN User config value for 'auto_upgrade' is not valid, existing property not present. The actual value of this parameter was ignored by our code anyway.

download('custom', custom_download_uri, name) do |file|
with_timing "Expanding #{name} to #{target_directory.relative_path_from(@droplet.root)}" do
FileUtils.mkdir_p target_directory
shell "unzip -qq #{file.path} -d #{target_directory} 2>&1"

Choose a reason for hiding this comment

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

is there unzip command available?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I just used the fragment of code from download_zip from base_component.rb (I could not call it because this function was overwritten in versioned_dependency_component.rb)

@ursulaflorianczyk ursulaflorianczyk force-pushed the supporting-customAgentUrl branch from 557d2aa to 9fb55a7 Compare January 9, 2024 10:06
@ursulaflorianczyk ursulaflorianczyk force-pushed the supporting-customAgentUrl branch from d1dfd9d to 8c1d937 Compare January 9, 2024 13:29
Copy link

@gregoryfuta gregoryfuta left a comment

Choose a reason for hiding this comment

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

If I understand the Ruby syntax corectly... :D

@ursulaflorianczyk ursulaflorianczyk force-pushed the supporting-customAgentUrl branch 2 times, most recently from 4a3692d to 3457554 Compare January 11, 2024 13:00
Added support for the new parameter both from app configuration and sealights user-provided service
Searching for jar which name starts with 'sl-test-listener' in zip downloaded from customAgentUrl
Overwrite sl.enableUpgrade to false when agent is downloaded from customAgentUrl
'enable_upgrade' parameter name fix in config yml file ('auto_upgrade' was not used in sealights framework)
Modified adding system property sl.tag to contain buildpack version
@ursulaflorianczyk ursulaflorianczyk force-pushed the supporting-customAgentUrl branch from 3457554 to 1a3aa19 Compare January 11, 2024 13:05
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.

4 participants